Re: [Boost-bugs] [Boost C++ Libraries] #7666: Boost Thread SIGSEGV on join() when -D_GLIBCXX_DEBUG is used

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7666: Boost Thread SIGSEGV on join() when -D_GLIBCXX_DEBUG is used
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-18 09:18:52


#7666: Boost Thread SIGSEGV on join() when -D_GLIBCXX_DEBUG is used
-------------------------------------+-------------------------------------
  Reporter: Antonio Di Monaco | Owner: viboes
  <tony@…> | Status: assigned
      Type: Bugs | Component: thread
 Milestone: Boost 1.55.0 | Severity: Problem
   Version: Boost 1.52.0 | Keywords: thread SIGSEGV C++11
Resolution: | -D_GLIBCXX_DEBUG
-------------------------------------+-------------------------------------

Comment (by Antonio Di Monaco <tony@…>):

 Maybe there's something here. I applied the patch, I started with a full
 run, just to be sure that SIGSEGV was still present, and then I printed
 out notify variable.


 {{{
 (gdb) b boost::detail::thread_data_base::~thread_data_base()
 Breakpoint 1 at 0x40188c
 (gdb) r
 Starting program: C:\Documents and
 Settings\dev\Documenti\Downloads\test.exe
 [New Thread 2356.0xed0]
 [New Thread 2356.0xf28]

 Breakpoint 1, 0x0040188c in
 boost::detail::thread_data_base::~thread_data_base()
  ()
 (gdb) c
 Continuing.

 Breakpoint 1, boost::detail::thread_data_base::~thread_data_base (
     this=0x243330, __in_chrg=<optimized out>)
     at libs\thread\src\win32\thread.cpp:40
 40 thread_data_base::~thread_data_base()
 (gdb) c
 Continuing.

 Program received signal SIGSEGV, Segmentation fault.
 0x67e81517 in boost::detail::thread_data_base::~thread_data_base (
     this=0x243330, __in_chrg=<optimized out>)
     at libs\thread\src\win32\thread.cpp:45
 45 i->second->unlock();
 (gdb) r
 The program being debugged has been started already.
 Start it from the beginning? (y or n) y

 Starting program: C:\Documents and
 Settings\dev\Documenti\Downloads\test.exe
 [New Thread 3604.0x834]
 [New Thread 3604.0x58c]

 Breakpoint 1, 0x0040188c in
 boost::detail::thread_data_base::~thread_data_base()
  ()
 (gdb) s
 Single stepping until exit from function
 _ZN5boost6detail16thread_data_baseD2Ev,
 which has no line number information.
 boost::detail::thread_data_base::~thread_data_base (
     this=0x6ced3354 <libgcc_s_sjlj-1!_Unwind_SjLj_Register+116>,
     __in_chrg=<optimized out>) at libs\thread\src\win32\thread.cpp:40
 40 thread_data_base::~thread_data_base()
 (gdb) s

 Breakpoint 1, boost::detail::thread_data_base::~thread_data_base (
     this=0x243330, __in_chrg=<optimized out>)
     at libs\thread\src\win32\thread.cpp:40
 40 thread_data_base::~thread_data_base()
 (gdb) s
 42 for (notify_list_t::iterator i = notify.begin(), e =
 notify.end(
 );
 (gdb) p notify
 $1 = std::vector of length 0, capacity 0 = {Cannot access memory at
 address 0x0
 (gdb) p async_states_
 $2 = std::vector of length 0, capacity 0
 }}}

 Seems that internal buffer of notify vector has been lost. Move operation
 somewhere??? (just guessing...)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7666#comment:17>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC