[master] 410354f14 add pthread_self() to panic output

Nils Goroll nils.goroll at uplex.de
Wed Apr 1 08:14:02 UTC 2020


commit 410354f143fb9f27ad30a3d765827d2849cea1ae
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Mar 20 16:32:49 2020 +0100

    add pthread_self() to panic output
    
    This should help locating the panicking thread in a core dump when when
    the principle thread as determined by the debugger is a different one.

diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index 8707ab51c..d4cfc8293 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -783,6 +783,8 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
 	if (err)
 		VSB_printf(pan_vsb, "errno = %d (%s)\n", err, vstrerror(err));
 
+	VSB_printf(pan_vsb, "pthread.self = %p\n", (void *)pthread_self());
+
 	q = THR_GetName();
 	if (q != NULL)
 		VSB_printf(pan_vsb, "pthread.name = (%s)\n", q);


More information about the varnish-commit mailing list