[Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()

2010-01-13 Thread paolo dot carlini at oracle dot com
--- Comment #11 from paolo dot carlini at oracle dot com 2010-01-13 21:42 --- If you have serious reasons to believe that GCC may be using pthreads in the wrong way in its thin gthreads wrapper, please file a PR about that, with a testcase. The component of course would not be libstdc++

[Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()

2010-01-13 Thread appfault at hotmail dot com
--- Comment #10 from appfault at hotmail dot com 2010-01-13 21:09 --- I didn't mean a test that the pthread_atfork() call works at the pthread layer, but that GCC's use of pthread_atfork() etc was appropriate, given GCC's use of pthread_mutex. -- http://gcc.gnu.org/bugzilla/show_bug

[Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()

2010-01-13 Thread paolo dot carlini at oracle dot com
--- Comment #9 from paolo dot carlini at oracle dot com 2010-01-13 20:34 --- Maybe, but pthread_atfork isn't part of GCC. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42733

[Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()

2010-01-13 Thread appfault at hotmail dot com
--- Comment #8 from appfault at hotmail dot com 2010-01-13 20:07 --- Is there already a test case somewhere else to ensure that pthread_atfork and such works? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42733

[Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()

2010-01-13 Thread paolo dot carlini at oracle dot com
--- Comment #7 from paolo dot carlini at oracle dot com 2010-01-13 18:56 --- It's resolved as WORKSFORME not as "in all possible circumstances, with all possible compilers and libraries that we delivered in the past and we deliver now and all the possible CPUs and underlying glibcs and

[Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()

2010-01-13 Thread appfault at hotmail dot com
--- Comment #6 from appfault at hotmail dot com 2010-01-13 18:52 --- How could this be marked resolved when no one has even speculated on what the fix could be? It may still be broken, but more difficult to repro for some reason. -- appfault at hotmail dot com changed: W

[Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()

2010-01-13 Thread appfault at hotmail dot com
--- Comment #5 from appfault at hotmail dot com 2010-01-13 18:50 --- I see that it's auto-generated, but when I did so the file was only 53 lines long. The function is assembler anyway, so I'm not sure the line numbers would mean much. As far as the asm goes, it loops between offsets 1

[Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()

2010-01-13 Thread paolo dot carlini at oracle dot com
--- Comment #4 from paolo dot carlini at oracle dot com 2010-01-13 18:49 --- In your sources you will find it named atomicity.h. But really, please try again with a maintained compiler, preferably 4.4.x, and in case report back, thanks. -- paolo dot carlini at oracle dot com changed

[Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()

2010-01-13 Thread appfault at hotmail dot com
--- Comment #3 from appfault at hotmail dot com 2010-01-13 18:30 --- #0 __gnu_cxx::__exchange_and_add (__mem=0xb3e005a8, __val=-1) at atomicity.cc:58 #1 0x0804957f in std::string::reserve (this=0xbfffbe20, __res=3017803168) at basic_string.h:217 #2 0x08049aa2 in std::string::append (t

[Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()

2010-01-13 Thread jwakely dot gcc at gmail dot com
--- Comment #2 from jwakely dot gcc at gmail dot com 2010-01-13 18:23 --- Can you attach a debugger or produce a core file to see where it hangs? In any case, 3.4.6 is unsupported now and it seems to work OK on 4.4.2 Unless you can show where it hangs and/or reproduce it on a current

[Bug libstdc++/42733] Use of std::string with threads causes process hanging following a fork()

2010-01-13 Thread appfault at hotmail dot com
--- Comment #1 from appfault at hotmail dot com 2010-01-13 17:56 --- Created an attachment (id=19577) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19577&action=view) code to reproduce Strangely double-forking seems to also make this go away. I can't find any previous zilla that