Sunday, 15 March 2015

c++ - glibc malloc deadlock during string reserve -


The

For some time now I'm trying to catch a problem with hanging your product it calls stack Jikor me with mixed after processing:

  /lib64/libc.so.6 # 1 0x00007f36fb339ba6 _L_lock_12192 () in /lib64/libc.so.6 /lib64/libc.so.6 from # 2 # From 0x00007f36fb337121 (# 3) in malloc from operator 0x00007f36fbbef0cd new (unsigned long) () /lib64/libstdc++.so.6 # to 4xx00007f36fbc4d7e9 std :: string in :: _ Rep: _ S_create (unsigned long, unsigned long, Std :: communicator & lt; four & gt; Irank & amp;) () /lib64/libstdc++.so.6 # std :: from 5 0x00007f36fbc4e42b string :: _ Rep :: _ M_clone (std :: allocator & LT; four & gt; constant & amp;, unsigned long) () in 6 0x00007f36fbc4e4d4 STD /lib64/libstdc++.so.6 # :: string :: /lib64/libstdc++.so.6 # Reserve (unsigned or std :: basic_stringbuf long ()) 7 & lt 0x00007f36fbc2b3c6 ; Four, std :: char_traits & lt; Char & gt ;, std :: allocator & lt; Char & gt; & Gt; :: std :: basic_streambuf & lt; at overlove (int) () to /lib64/libstdc++.so.6 # 8xx00007f36fbc2fb36 Char, std :: char_traits & lt; Char & gt; & Gt; :: xsputn (four constant *, long) () /lib64/libstdc++.so.6 # 9xx00007f36fbc26885 to std :: basic_ostream & lt; Four, std :: char_traits & lt; Four & gt; & Gt; & Amp; Std :: __ ostream_insert & lt; Char, std :: char_traits & lt; Char & gt; & Gt; (Std :: basic_ostream & LT; char, std :: char_traits & LT; four & gt; & gt; & amp;, four constants *, long) (the 0x00007f36fe85c83a in /lib64/libstdc++.so.6 # 10)? ? () # 11 vfprintf (in 0x00007f36fb2ffdff) from /lib64/libc.so.6 # 12 @ plt (fgetc in 0x000000000055c110) # 13 in 0xffffffffffffa8 ?? () # 14 in 0xffffffffffa8 ?? () # 15 in 0x0000000000bc42a0 ?? () Setsockopt @ plt # 16 0x000000000055b8b0 () # 17 0x0000000000555bf30 in log4cxx :: NDC :: push ()  

This multi code appears after forking a process in log4cxx ndc push Is killed. All other thread sleeps on the position variable and this is only a deadlocked What could possibly make Molok Deadlock?

You should not perform procedures using threading.

If one lock is acquired in one of the other threads (Walk, lock in malloc ) during the fork, lock is cloned in locked state , but the thread that is locked is not running in the curved process. This means that the lock will never be released.


No comments:

Post a Comment