Opened 11 years ago

Closed 7 years ago

Last modified 6 years ago

#5520 closed Bugs (fixed)

read_json causes segfault when called from multiple threads

Reported by: Laszlo Kustra <kl223hun@…> Owned by: Sebastian Redl
Milestone: To Be Determined Component: property_tree
Version: Boost 1.46.1 Severity: Problem
Keywords: Cc:

Description

Distro: Debian 5.0.6 Linux host 2.6.26-2-amd64 #1 SMP Sun Jun 20 20:16:30 UTC 2010 x86_64 GNU/Linux

I'm going to attach a short example to trigger the bug. I can also provide a core dump if needed.

Attachments (1)

trigger_bug.cpp (1.2 KB ) - added by Laszlo Kustra <kl223hun@…> 11 years ago.
Short example to trigger segfault in read_json.

Download all attachments as: .zip

Change History (11)

by Laszlo Kustra <kl223hun@…>, 11 years ago

Attachment: trigger_bug.cpp added

Short example to trigger segfault in read_json.

comment:1 by Sebastian Redl, 11 years ago

Can you post your compiler version?

comment:2 by Sebastian Redl, 11 years ago

Component: property_treespirit
Owner: changed from Sebastian Redl to Joel de Guzman

Never mind, could reproduce it. This appears to be a problem in Spirit.Classic. It crashes in boost::spirit::classic::impl::object_with_id_base_supply<unsigned long>::acquire ().

Reassigning.

comment:3 by Laszlo Kustra <kl223hun@…>, 11 years ago

Ok. Anyway, I used gcc 4.3.2 with glibc 2.7.

comment:4 by Joel de Guzman, 11 years ago

This is a known "classic" bug. The best course of action really is to switch to Spirit V2 which does not have these threading issues. Chances are very remote this will ever be fixed in "classic". A JSON parser is easy. It's about time to port to Spirit V2.

comment:5 by Sebastian Redl, 11 years ago

Component: spiritproperty_tree
Owner: changed from Joel de Guzman to Sebastian Redl

OK, taking the bug back then.

comment:6 by thomas.kister@…, 10 years ago

Hello,

I just hit this bug on boost 1.49.0 on a Raspbian system, and it looks like no progress was made on boost 1.50.0. Is there any milestone set for porting the parser to Spirit V2?

comment:7 by amur@…, 9 years ago

Hello,

having same bug on other ARM platform. boost 1.55.0 gcc 4.8.1.

comment:8 by vipul, 8 years ago

I am hitting this bug on mac x86_64 with boost 1.54 :(

comment:9 by Sebastian Redl, 7 years ago

Resolution: fixed
Status: newclosed

The JSON parser rewrite has landed on master, so this will be fixed in 1.59.

comment:10 by anonymous, 6 years ago

Was this resolved?

Note: See TracTickets for help on using tickets.