Index: server/mpm/event/event.c
===================================================================
--- server/mpm/event/event.c	(Revision 1891311)
+++ server/mpm/event/event.c	(Arbeitskopie)
@@ -596,13 +596,19 @@
     listener_may_exit = 1;
     disable_listensocks();
 
+    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO()
+                 "wakeup_listener: start");
     /* Unblock the listener if it's poll()ing */
     if (event_pollset && listener_is_wakeable) {
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO()
+                     "wakeup_listener: apr_pollset_wakeup");
         apr_pollset_wakeup(event_pollset);
     }
 
     /* unblock the listener if it's waiting for a worker */
     if (worker_queue_info) {
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO()
+                     "wakeup_listener: ap_queue_info_term");
         ap_queue_info_term(worker_queue_info);
     }
 
@@ -620,10 +626,14 @@
      * with SIGHUP unblocked, but that doesn't work on Linux
      */
 #ifdef HAVE_PTHREAD_KILL
+    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO()
+                 "wakeup_listener: pthread_kill");
     pthread_kill(*listener_os_thread, LISTENER_SIGNAL);
 #else
     kill(ap_my_pid, LISTENER_SIGNAL);
 #endif
+    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO()
+                 "wakeup_listener: end");
 }
 
 #define ST_INIT              0
@@ -1947,6 +1957,11 @@
                  * the loop).
                  */
                 if (!listener_may_exit && !listeners_disabled()) {
+                    ap_log_error(APLOG_MARK, APLOG_DEBUG, rc, ap_server_conf,
+                                 APLOGNO()
+                                 "interrupted, but continuing "
+                                 "listener_may_exit=%d !listeners_disabled()=%d",
+                                 listener_may_exit, !listeners_disabled());
                     continue;
                 }
                 timeout_time = 0;
@@ -1967,6 +1982,8 @@
                 || apr_atomic_read32(&connection_count) == 0)
                 break;
         }
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, rc, ap_server_conf,
+                     APLOGNO() "pollset returned listener_may_exit=0");
 
         for (user_chain = NULL; num; --num, ++out_pfd) {
             listener_poll_type *pt = (listener_poll_type *) out_pfd->client_data;
@@ -2705,6 +2722,8 @@
         iter = 0;
         while (iter < 10 && !dying) {
             /* listener has not stopped accepting yet */
+            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO()
+                         "listener has not stopped accepting yet (%d iter)", iter);
             apr_sleep(apr_time_make(0, 500000));
             wakeup_listener();
             ++iter;
@@ -2918,7 +2937,12 @@
          *   If the worker hasn't exited, then this blocks until
          *   they have (then cleans up).
          */
+        ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, ap_server_conf,
+                     "%s termination received, join workers",
+                     AP_MPM_PODX_GRACEFUL ? "graceful" : "ungraceful");
         join_workers(ts->listener, threads);
+        ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, ap_server_conf,
+                     "termination, workers joined, exiting");
     }
 
     free(threads);
