Branch: Tag:

2011-11-23

2011-11-23 10:12:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

ABS: Dump the handler queue after the thread backtraces.

This ensures that the backtraces are actually dumped even if it takes
more than 20 seconds to dump the handler_queue.

Fixes InfoKOM 712638.

Rev: server/base_server/roxen.pike:1.1092

6:   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.1091 2011/11/14 00:13:57 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1092 2011/11/23 10:12:46 grubba Exp $";      //! @appears roxen   //!
3320: Inside #if undefined(__NT__)
   // Paranoia exit in case describe_all_threads below hangs.    signal(signum("SIGALRM"), low_engage_abs);    int t = alarm(20); +  report_debug("\nTrying to dump backlog: \n"); +  if (mixed err = catch { +  // Catch for paranoia reasons. +  describe_all_threads(); +  }) +  werror (describe_backtrace (err));   #ifdef THREADS -  report_debug("Handler queue:\n"); +  report_debug("\nHandler queue:\n");    if (mixed err = catch { -  +  t = alarm(20); // Restart the timeout timer.    array(mixed) queue = handle_queue->buffer[handle_queue->r_ptr..];    foreach(queue, mixed v) {    if (!v) continue;
3335: Inside #if undefined(__NT__) and #if defined(THREADS)
   })    werror (describe_backtrace (err));   #endif -  report_debug("Trying to dump backlog: \n"); -  if (mixed err = catch { -  // Catch for paranoia reasons. -  describe_all_threads(); -  }) -  werror (describe_backtrace (err)); +     low_engage_abs();   }