gearmand segfaults on exit

Bug #1052795 reported by Sven Nierlein
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman
Fix Released
Critical
Brian Aker

Bug Description

when i run
.../gearmand --port=54730 --verbose=DEBUG --log-file=stderr

and send a shutdown:
echo -e "shutdown\n" | nc localhost 54730

gearmand segfaults:

  DEBUG 2012-08-17 21:56:43.097375 [ main ] Received SHUTDOWN wakeup event -> libgearman-server/gearmand.cc:929
   INFO 2012-08-17 21:56:43.097396 [ main ] Clearing event for listening socket (6)
   INFO 2012-08-17 21:56:43.097414 [ main ] Clearing event for listening socket (7)
  DEBUG 2012-08-17 21:56:43.097431 [ main ] Clearing event for wakeup pipe -> libgearman-server/gearmand.cc:859
  DEBUG 2012-08-17 21:56:43.097450 [ main ] Exited main event loop -> libgearman-server/gearmand.cc:395
  DEBUG 2012-08-17 21:56:43.097467 [ main ] shutting down Epoch thread -> libgearman-server/timer.cc:111
  DEBUG 2012-08-17 21:56:43.097733 [ main ] shutdown of Epoch completed -> libgearman-server/timer.cc:120
   INFO 2012-08-17 21:56:43.097755 [ main ] Closing listening socket (6)
   INFO 2012-08-17 21:56:43.097788 [ main ] Closing listening socket (7)
  DEBUG 2012-08-17 21:56:43.097819 [ main ] Closing wakeup pipe -> libgearman-server/gearmand.cc:828
  DEBUG 2012-08-17 21:56:43.097845 [ main ] Shutting down all threads -> libgearman-server/gearmand.cc:235
  DEBUG 2012-08-17 21:56:43.097862 [ main ] Shutting down thread 4 -> libgearman-server/gearmand_thread.cc:182
  DEBUG 2012-08-17 21:56:43.097895 [ 4 ] Received RUN wakeup event -> libgearman-server/gearmand_thread.cc:448
   INFO 2012-08-17 21:56:43.097915 [ 4 ] Gear connection disconnected
  DEBUG 2012-08-17 21:56:43.097930 [ 4 ] free() packet's data -> libgearman-server/packet.cc:394
  DEBUG 2012-08-17 21:56:43.097950 [ 4 ] free() packet's data -> libgearman-server/packet.cc:394
  ERROR 2012-08-17 21:56:43.097978 [ 4 ] GEARMAND_WAKEUP_SHUTDOWN(Bad file descriptor) -> libgearman-server/gearmand.cc:411
  DEBUG 2012-08-17 21:56:43.097996 [ 4 ] Received SHUTDOWN wakeup event -> libgearman-server/gearmand_thread.cc:438
  DEBUG 2012-08-17 21:56:43.098012 [ 4 ] Clearing event for IO thread wakeup pipe 4 -> libgearman-server/gearmand_thread.cc:381
  DEBUG 2012-08-17 21:56:43.098034 [ 4 ] Exiting thread event loop -> libgearman-server/gearmand_thread.cc:303
  DEBUG 2012-08-17 21:56:43.098087 [ main ] Closing IO thread wakeup pipe -> libgearman-server/gearmand_thread.cc:369
  DEBUG 2012-08-17 21:56:43.098189 [ main ] Thread 4 shutdown complete -> libgearman-server/gearmand_thread.cc:226
  DEBUG 2012-08-17 21:56:43.098212 [ main ] Shutting down thread 3 -> libgearman-server/gearmand_thread.cc:182
  DEBUG 2012-08-17 21:56:43.098250 [ 3 ] Received SHUTDOWN wakeup event -> libgearman-server/gearmand_thread.cc:438
  DEBUG 2012-08-17 21:56:43.098270 [ 3 ] Clearing event for IO thread wakeup pipe 3 -> libgearman-server/gearmand_thread.cc:381
  DEBUG 2012-08-17 21:56:43.098290 [ 3 ] Exiting thread event loop -> libgearman-server/gearmand_thread.cc:303
  DEBUG 2012-08-17 21:56:43.098368 [ main ] Closing IO thread wakeup pipe -> libgearman-server/gearmand_thread.cc:369
  DEBUG 2012-08-17 21:56:43.098419 [ main ] Thread 3 shutdown complete -> libgearman-server/gearmand_thread.cc:226
  DEBUG 2012-08-17 21:56:43.098438 [ main ] Shutting down thread 2 -> libgearman-server/gearmand_thread.cc:182
  DEBUG 2012-08-17 21:56:43.098478 [ 2 ] Received SHUTDOWN wakeup event -> libgearman-server/gearmand_thread.cc:438
  DEBUG 2012-08-17 21:56:43.098499 [ 2 ] Clearing event for IO thread wakeup pipe 2 -> libgearman-server/gearmand_thread.cc:381
  DEBUG 2012-08-17 21:56:43.098520 [ 2 ] Exiting thread event loop -> libgearman-server/gearmand_thread.cc:303
  DEBUG 2012-08-17 21:56:43.098969 [ main ] Closing IO thread wakeup pipe -> libgearman-server/gearmand_thread.cc:369
  DEBUG 2012-08-17 21:56:43.099022 [ main ] Thread 2 shutdown complete -> libgearman-server/gearmand_thread.cc:226
  DEBUG 2012-08-17 21:56:43.099042 [ main ] Shutting down thread 1 -> libgearman-server/gearmand_thread.cc:182
  DEBUG 2012-08-17 21:56:43.099082 [ 1 ] Received SHUTDOWN wakeup event -> libgearman-server/gearmand_thread.cc:438
  DEBUG 2012-08-17 21:56:43.099102 [ 1 ] Clearing event for IO thread wakeup pipe 1 -> libgearman-server/gearmand_thread.cc:381
  DEBUG 2012-08-17 21:56:43.099122 [ 1 ] Exiting thread event loop -> libgearman-server/gearmand_thread.cc:303
  DEBUG 2012-08-17 21:56:43.099186 [ main ] Closing IO thread wakeup pipe -> libgearman-server/gearmand_thread.cc:369
  DEBUG 2012-08-17 21:56:43.099234 [ main ] Thread 1 shutdown complete -> libgearman-server/gearmand_thread.cc:226
Segmentation fault

I tried the latest lp:gearmand.

Brian Aker (brianaker)
Changed in gearmand:
importance: Undecided → Medium
importance: Medium → Critical
assignee: nobody → Brian Aker (brianaker)
milestone: none → 0.39
status: New → In Progress
Brian Aker (brianaker)
Changed in gearmand:
status: In Progress → Fix Released
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.