2007-08-14
2007-08-14 13:54:03 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
082b5eba105955a9cc7fd8d6ed3358f4b65fe40c
(25 lines)
(+20/-5)
[
Show
| Annotate
]
Branch: 5.2
engage_abs() now dumps the content of the handler queue.
The handler installed by the abs now uses time() instead of time(1), to reduce risk of the time(1) value being stale.
Rev: server/base_server/roxen.pike:1.965
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.964 2007/07/31 11:24:53 noring Exp $";
+ constant cvs_version="$Id: roxen.pike,v 1.965 2007/08/14 13:54:03 grubba Exp $";
//! @appears roxen
//!
2727: Inside #if undefined(__NT__)
return;
}
report_debug("**** %s: ABS engaged!\n"
- "Waited more than %d minute(s).\n"
- "Trying to dump backlog: \n",
+ "Waited more than %d minute(s).\n",
ctime(time()) - "\n",
query("abs_timeout"));
// Paranoia exit in case describe_all_threads below hangs.
signal(signum("SIGALRM"), low_engage_abs);
int t = alarm(20);
-
+ #ifdef THREADS
+ report_debug("Handler queue:\n");
catch {
-
+ array(mixed) queue = handle_queue->buffer[handle_queue->rptr..];
+ foreach(queue; mixed v) {
+ if (!v) continue;
+ if (!arrayp(v)) {
+ report_debug(" *** Strange entry: %O ***\n", v);
+ } else {
+ report_debug(" %{%O, %}\n", v);
+ }
+ }
+ };
+ #endif
+ report_debug("Trying to dump backlog: \n");
+ catch {
// Catch for paranoia reasons.
describe_all_threads();
};
2751: Inside #if undefined(__NT__)
if(!abs_started)
{
abs_started = 1;
- handlers_alive = time(1);
+ handlers_alive = time();
report_debug("Anti-Block System Enabled.\n");
}
call_out (restart_if_stuck,10);
2766: Inside #if undefined(__NT__)
ctime(time()) - "\n");
engage_abs(0);
}
- handle(lambda() { handlers_alive = time(1); });
+ handle(lambda() { handlers_alive = time(); });
}
#endif