(gdb) bt
Thread 57 (process 7047 thread 0xaf0f):
#0 0x926f0136 in __semwait_signal_nocancel ()
#1 0x926efd1b in nanosleep$NOCANCEL$UNIX2003 ()
#2 0x926e9013 in usleep$NOCANCEL$UNIX2003 ()
#3 0x92700685 in abort ()
#4 0x90afa005 in __gnu_cxx::__verbose_terminate_handler ()
#5 0x90af810c in __gxx_personality_v0 ()
#6 0x90af806c in __gxx_personality_v0 ()
#7 0x9060f5ee in _Unwind_Backtrace ()
#8 0x9060f794 in _Unwind_RaiseException ()
#9 0x90af8254 in __cxa_throw ()
#10 0x001ab627 in Thread::testCancel (this=0x1045320) at /Users/ejt/todo/Tekkotsu/IPC/Thread.cc:216
#11 0x001abc9e in Thread::popNoCancel () at /Users/ejt/todo/Tekkotsu/IPC/Thread.cc:346
#12 0x0037dcd5 in Thread::NoCancelScope::~NoCancelScope (this=0xb0bbdc5e) at Thread.h:88
#13 0x0036e3a0 in Simulator::sendSensor (this=0xb0206b68, syncCall=true) at /Users/ejt/todo/Tekkotsu/local/tekkotsu/Simulator.cc:630
#14 0x00377149 in Simulator::SyncDataThread::sync (this=0xb0206bc0) at Simulator.h:123
#15 0x0037720e in Simulator::syncSensors () at Simulator.h:150
#16 0x003c737c in SensorState::releaseResource (this=0xe5d49c, d=@0x60e164) at /Users/ejt/todo/Tekkotsu/local/DataSource.cc:32
#17 0x00050822 in MarkScope::~MarkScope (this=0xb0bbde68) at MarkScope.h:31
#18 0x0039ddc7 in DynamixelDriver::CommThread::runloop (this=0x1045320) at /Users/ejt/todo/Tekkotsu/local/DeviceDrivers/Dynamixel.cc:557
#19 0x001acc38 in Thread::run (this=0x1045320) at /Users/ejt/todo/Tekkotsu/IPC/Thread.cc:82
#20 0x001ac8e5 in Thread::launch (msg=0x1045320) at /Users/ejt/todo/Tekkotsu/IPC/Thread.cc:263
#21 0x92645095 in _pthread_start ()
#22 0x92644f52 in thread_start ()
Here's the current content of Thread::testCancel():
void Thread::testCancel() {
if(noCancelDepth!=0)
return;
if(cancelRequested)
throw std::runtime_error("thread cancel");
}
And the call to Thread::run() from Thread::launch():
try {
cur->returnValue = cur->run();
} catch(const Thread::cancellation_exception&) {
cancelDetected=true;
} catch(const std::exception& e) {
std::cout << "WTF is this exception? " << e.what() << std::endl;
cancelDetected=true;
} catch(...) {
std::cout << "WTF is this unknown exception?" << std::endl;
}
return (cancelDetected) ? CANCELLED : cur->returnValue;
Normally I throw the private Thread::cancellation_exception struct, but I'm testing with std::runtime_error just to make sure there's not symbol visibility issues. So now I see lots of "WTF is this exception? thread cancel" as expected, but then eventually still the SIGABRT. :(
What the heck is going on? How is it possible to get by the catch(...)? It only sometimes happens, so it's hard for me to track down to a particular change in software, hardware, or system update...
Thanks again,
-Ethan