title: Why is Celery not shutting down cleanly?
body: <p>After issuing TERM signal to the Celery worker twice (Warm shutdown and cold shutdown) using Ctlr-C keyboard interrupt, the Celery worker is just hung up. It's not consuming messages or executing tasks (as expected) but it's not shutting down either.</p>
  
  <p>I ran <code>strace</code> on the Celery processes to see what's going on behind the scene. Here's the <code>strace</code> output on the PID of the Celery main process</p>
  
  <pre><code>strace -p 27867
  Process 27867 attached - interrupt to quit
  futex(0xb966a78, FUTEX_WAIT, 0, NULL
  </code></pre>
  
  <p>And here's what I found doing <code>strace</code> on the child processes:</p>
  
  <pre><code>strace -p 27874
  Process 27874 attached - interrupt to quit
  select(4, [3], NULL, NULL, {0, 562000}) = 0 (Timeout)
  futex(0x871a808, FUTEX_WAKE, 1)         = 0
  select(4, [3], NULL, NULL, {1, 0})      = 0 (Timeout)
  futex(0x871a808, FUTEX_WAKE, 1)         = 0
  ......................................................
  </code></pre>
  
  <p>I know I could issue a KILL signal to the processes to get rid of them. But I'm curious to learn what is actually preventing these processes to be shutdown, and if it's possible to do something about it.</p>
  
  <p>Software stack: Python 2.6.2, Celery 2.4.6, CentOS 5.0</p>
  
  <p>UPDATE: The CPU usage is down to almost 0%. These tasks are quite CPU intensive, so this confirms no tasks are currently active.</p>