Using the Naviserver head on Linux, the installed "conf/nsd-config.tcl"
and "conf/simple-config.tcl" config fieles both work fine for testing
that a newly compliled server starts up correctly.  However, simple-config.tcl
includes a commented-out line loading the nscp module, like so:

    #ns_param   nscp            nscp

If you uncomment that line, then the server crashes every time on startup.
If you ALSO copy this "module/nscp/users" section from nsd-config.tcl,
then the crash goes away and server again starts fine:

ns_section ns/server/default/module/nscp/users {
    ns_param user "::"
}

Probably nscp shouldn't segfault if it's missing that section?  Or
maybe we should either just add that section into simple-config.tcl,
or remove the commented-out nscp line entirely.

When the server crashes because of the missing nscp configuration, the
backtrace looked like this:

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007f4a13c2c859 in __GI_abort () at abort.c:79
#2  0x00007f4a13ea4288 in Panic () from 
/usr/local/pkg/nsd-20230317-1/lib/libnsd.so
#3  0x00007f4a13af358d in Tcl_PanicVA (format=<optimized out>, 
argList=argList@entry=0x7ffcecfc0b40) at 
/home/nobackup/co/tcl/tcl-core-8-6-branch/generic/tclPanic.c:99
#4  0x00007f4a13af36ff in Tcl_Panic (format=<optimized out>) at 
/home/nobackup/co/tcl/tcl-core-8-6-branch/generic/tclPanic.c:160
#5  0x00007f4a13f096c7 in Abort () from 
/usr/local/pkg/nsd-20230317-1/lib/libnsd.so
#6  <signal handler called>
#7  0x00007f4a13ebd18d in Ns_SetFindCmp () from 
/usr/local/pkg/nsd-20230317-1/lib/libnsd.so
#8  0x00007f4a13ebd287 in Ns_SetFind () from 
/usr/local/pkg/nsd-20230317-1/lib/libnsd.so
#9  0x00007f4a13ebc951 in Ns_SetUpdateSz () from 
/usr/local/pkg/nsd-20230317-1/lib/libnsd.so
#10 0x00007f4a13e22a6e in LoadUsers () from 
/home/local-20.04/pkg/nsd-20230317-1/bin/nscp.so
#11 0x00007f4a13e22eb0 in Ns_ModuleInit () from 
/home/local-20.04/pkg/nsd-20230317-1/bin/nscp.so
#12 0x00007f4a13ea6e61 in Ns_ModuleLoad () from 
/usr/local/pkg/nsd-20230317-1/lib/libnsd.so
#13 0x00007f4a13ea7141 in NsTclModuleLoadObjCmd () from 
/usr/local/pkg/nsd-20230317-1/lib/libnsd.so

-- 
Andrew Piskorski <a...@piskorski.com>


_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to