Error in my_thread_global_end(): 1 threads didn't exit

Bug #633306 reported by Andrew Hutchings
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Low
Brian Aker
7.0
Fix Released
Low
Brian Aker

Bug Description

When running drizzled on Mac OSX the following occurs during shutdown:

Error in my_thread_global_end(): 1 threads didn't exit

Related branches

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

Backtrace when this happens, signal handler thread in a while loop:

Thread 2 (process 84778):
#0 0x00007fff81d12b3e in __sigwait ()
#1 0x00007fff81d12b17 in sigwait ()
#2 0x000000010036210b in signal_hand () at plugin/signal_handler/signal_handler.cc:160
#3 0x00007fff81cea456 in _pthread_start ()
#4 0x00007fff81cea309 in thread_start ()

Thread 1 (process 84778):
#0 drizzled::internal::my_thread_global_end () at drizzled/internal/my_thr_init.cc:123
#1 0x00000001001c9803 in drizzled::internal::my_end () at drizzled/internal/my_init.cc:95
#2 0x0000000100058b7d in drizzled::unireg_abort (exit_code=1) at drizzled/drizzled.cc:485
#3 0x000000010005b453 in drizzled::init_server_components (plugins=<value temporarily unavailable, due to optimizations>) at drizzled/drizzled.cc:953
#4 0x000000010004b375 in main (argc=2, argv=<value temporarily unavailable, due to optimizations>) at drizzled/main.cc:264

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

Backtrace is bad, this is for a different (but similar) scenario

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

Real stack:

Thread 2 (process 84814):
#0 0x00007fff81d12b3e in __sigwait ()
#1 0x00007fff81d12b17 in sigwait ()
#2 0x000000010036210b in signal_hand () at plugin/signal_handler/signal_handler.cc:160
#3 0x00007fff81cea456 in _pthread_start ()
#4 0x00007fff81cea309 in thread_start ()

Thread 1 (process 84814):
#0 0x00007fff81cebeb6 in __semwait_signal ()
#1 0x00007fff81cefcd1 in _pthread_cond_wait ()
#2 0x00000001001cabc0 in drizzled::internal::my_thread_global_end () at drizzled/internal/my_thr_init.cc:115
#3 0x00000001001c9803 in drizzled::internal::my_end () at drizzled/internal/my_init.cc:95
#4 0x000000010004b668 in main (argc=1, argv=<value temporarily unavailable, due to optimizations>) at drizzled/main.cc:330

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

Basically for some reason the signal handler destructor is not called during shutdown so the thread never terminates. This doesn't seem to be the case in GDB.

Changing to low priority as the only problem to the user is the annoyance of a 5 second shutdown time and a message.

Revision history for this message
David Shrewsbury (dshrews) wrote :

Maybe related.... drizzled doesn't seem to be shutting down on OS X now with revno 1777. Attached to the hung process and dumped the backtrace:

(gdb) bt
#0 0x00007fff8005deb6 in __semwait_signal ()
#1 0x00007fff80061cd1 in _pthread_cond_wait ()
#2 0x00000001013f3c5b in boost::thread::join ()
#3 0x0000000100441562 in SignalHandler::~SignalHandler (this=0x10b014c70) at plugin/signal_handler/signal_handler.cc:227
#4 0x0000000100168e7f in drizzled::module::Registry::~Registry (this=0x10171e3a0) at drizzled/module/registry.cc:44
#5 0x00000001001691f1 in drizzled::module::Registry::shutdown () at drizzled/module/registry.cc:71
#6 0x0000000100078e27 in main (argc=3, argv=0x7fff5fbff638) at drizzled/main.cc:330

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.