[master] 9efd7fc Include the current time of the panic in the panic output

Martin Blix Grydeland martin at varnish-software.com
Fri Nov 4 13:23:05 CET 2016

commit 9efd7fca94a65a8d4774e61ac4a4f923b69d47ec
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Thu Oct 27 14:02:43 2016 +0200

    Include the current time of the panic in the panic output
    Show both the real and the monotonic time in the panic output when the
    panic is created. This is useful to have something to compare other
    panic timestamps against.
    The existing timestamp in the panic output is recorded by the
    management process at the time of receiving the panic from the child
    process. Due to processing and possible core dump creation, this time
    isn't very useful for comparison purposes.

diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index ffe6fd1..fb57e86 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -39,6 +39,8 @@
 #include <stdlib.h>
 #include <signal.h>
+#include "vtim.h"
 #include "cache.h"
 #include "cache_transport.h"
@@ -629,6 +631,8 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
 	VSB_printf(pan_vsb, "version = %s\n", VCS_version);
 	VSB_printf(pan_vsb, "ident = %s,%s\n",
 	    VSB_data(vident) + 1, Waiter_GetName());
+	VSB_printf(pan_vsb, "now = %f (mono), %f (real)\n",
+	    VTIM_mono(), VTIM_real());

More information about the varnish-commit mailing list