tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
freeradius startup crash
I experience a startup crash on freeradius 3 startup:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0xbb3bce15 in read (d=3, buf=0xbf7fe83f, nbytes=1)
at /usr/src/lib/libpthread/pthread_cancelstub.c:485
#2 0xbb680076 in fr_get_debug_state ()
from /usr/pkg/lib/libfreeradius-radius.so
#3 0xbb680346 in fr_store_debug_state ()
from /usr/pkg/lib/libfreeradius-radius.so
#4 0x0808d357 in main ()
This happens in code that tests if freeradius is being debugger by gdb.
And indeed, running inside gdb does not crash.
There is a very simple workaround: disable the test. Freeradius works
fine this way. Does that look reasonable?
--- src/lib//debug.c.orig
+++ src/lib/debug.c
@@ -105,9 +105,12 @@
static TALLOC_CTX *talloc_null_ctx;
static TALLOC_CTX *talloc_autofree_ctx;
-#ifdef HAVE_SYS_PTRACE_H
+/*
+ * That test crashes on startup for NetBSD
+ */
+#if defined(HAVE_SYS_PTRACE_H) && !defined(__NetBSD__)
# ifdef __linux__
# define _PTRACE(_x, _y) ptrace(_x, _y, NULL, NULL)
# else
# define _PTRACE(_x, _y) ptrace(_x, _y, NULL, 0)
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index