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-19 20:45:53
#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@â¦>):
Well, I tried stepping, but it was not feasible for me.
Anyway, I tried to "watch" notify variable, and something weird happens
even before the thread is created and launched:
{{{
Breakpoint 1 at 0x40b6bc: file
C:/x32-481-win32-sjlj-r2/include/boost/thread/win32/thread_data.hpp, line
123.
Starting program: C:\Users\Tony\Downloads\boost_1_54_0\test.exe
[New Thread 3940.0xb20]
Breakpoint 1, boost::detail::thread_data_base::thread_data_base (
this=0x7748d8)
at
C:/x32-481-win32-sjlj-r2/include/boost/thread/win32/thread_data.hpp:123
123 , interruption_enabled(true)
$1 = std::vector of length 0, capacity 0
Watchpoint 2: notify
$2 = std::vector of length 0, capacity 0
Continuing.
Watchpoint 2: notify
Old value = std::vector of length 0, capacity 0
New value = Cannot access memory at address 0x0
#0 0x00407e4c in __gnu_debug::_Safe_sequence_base::_Safe_sequence_base (
this=0x774900)
at
c:/x32-481-win32-sjlj-r2/lib/gcc/i686-w64-mingw32/4.8.1/include/c++/debug/safe_base.h:192
#1 0x00407db3 in __gnu_debug::_Safe_sequence<std::__debug::map<void
const*, boost::detail::tss_data_node, std::less<void const*>,
std::allocator<std::pair<void const* const, boost::detail::tss_data_node>
> > >::_Safe_sequence (
this=0x774900)
at
c:/x32-481-win32-sjlj-r2/lib/gcc/i686-w64-mingw32/4.8.1/include/c++/debug/safe_sequence.h:111
#2 0x00410754 in std::__debug::map<void const*,
boost::detail::tss_data_node, std::less<void const*>,
std::allocator<std::pair<void const* const, boost::detail::tss_data_node>
> >::map (this=0x7748e8, __comp=..., __a=...)
at
c:/x32-481-win32-sjlj-r2/lib/gcc/i686-w64-mingw32/4.8.1/include/c++/debug/map.h:77
#3 0x0040b71b in _fu4___ZTVN5boost6detail16thread_data_baseE ()
at
C:/x32-481-win32-sjlj-r2/include/boost/thread/win32/thread_data.hpp:123
#4 0x0040b483 in boost::detail::thread_data<void (*)()>::thread_data(void
(*&&)()) (this=0x7748d8,
f_=<unknown type in C:\Users\Tony\Downloads\boost_1_54_0\test.exe, CU
0x0, DIE 0x4f591>)
at C:/x32-481-win32-sjlj-r2/include/boost/thread/detail/thread.hpp:98
#5 0x0040bc75 in boost::detail::heap_new<boost::detail::thread_data<void
(*)()>, void (*)()>(void (*&&)()) (
a1=<unknown type in C:\Users\Tony\Downloads\boost_1_54_0\test.exe, CU
0x0, DIE 0x4f591>)
at
C:/x32-481-win32-sjlj-r2/include/boost/thread/win32/thread_heap_alloc.hpp:100
#6 0x0040c0b5 in boost::thread::make_thread_info (f=0x401637 <myFunc()>)
at C:/x32-481-win32-sjlj-r2/include/boost/thread/detail/thread.hpp:220
#7 0x0040c229 in boost::thread::thread<void (&)()> (this=0x28fe8c,
f=@0x401637: {void (void)} 0x401637 <myFunc()>)
at C:/x32-481-win32-sjlj-r2/include/boost/thread/detail/thread.hpp:265
#8 0x00401720 in main () at test.cpp:10
Continuing.
Watchpoint 2: notify
Old value = Cannot access memory at address 0x0
Continuing.
Watchpoint 2: notify
Old value = Cannot access memory at address 0x0
Continuing.
Watchpoint 2 deleted because the program has left the block in
which its expression is valid.
Watchpoint 2 deleted because the program has left the block in
which its expression is valid.
Watchpoint 2 deleted because the program has left the block in
which its expression is valid.
0x779cdd84 in ?? ()
Continuing.
[New Thread 3940.0x700]
Program received signal SIGSEGV, Segmentation fault.
0x67e81537 in boost::detail::thread_data_base::~thread_data_base (
this=0x7748d8, __in_chrg=<optimized out>)
at libs\thread\src\win32\thread.cpp:45
45 i->second->unlock();
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x67e81537 in boost::detail::thread_data_base::~thread_data_base (
this=0x7748d8, __in_chrg=<optimized out>)
at libs\thread\src\win32\thread.cpp:45
45 i->second->unlock();
A debugging session is active.
Inferior 1 [process 3940] will be killed.
}}}
Constructor thread_data_base::thread_data_base is called for the first
time, and notify variable seems in a clean state. Then, it breaks again
there, and now seems corrupted or something similar. Only after 3
"continue" the thread is created, sleep, and join, and SIGSEGV triggers.
Can you provide some methods where I can set up breakpoints, and print
"notify" values each time that they're triggered?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7666#comment:21> 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