Could you try getting the call trace from the core file ? Assuming the core file is in the current directory, you should do this:
$ gdb /usr/local/hobbit/server/bin/bb-eventlog.cgi core [messages from gdb] gdb> bt
The output from the "bt" command would be very helpful in narrowing down the problem.
Below is the output from gdb, I apoligize for the formatting, I'm using a rather awkward web client. Interestingly, I found that it runs fine as user 'hobbit', but users root and apache get a segfault.
Core was generated by `/usr/local/hobbit/server/bin/bb-eventlog.cgi'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/tls/libc.so.6...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 #0 0x08049502 in do_eventlog (output=0x9145c0, maxcount=100, maxminutes=140, allowallhosts=1) at eventlog.c:170 170 fprintf(output, "<TD ALIGN=CENTER BGCOLOR=%s><FONT COLOR=black>%s</FONT></TD>\n", (gdb) bt #0 0x08049502 in do_eventlog (output=0x9145c0, maxcount=100, maxminutes=140, allowallhosts=1) at eventlog.c:170 #1 0x08049c5b in main (argc=160256136, argv=0x98d50a3) at eventlog.c:338
On Sun, Apr 03, 2005 at 06:20:53PM -0400, Schwimmer, Eric E *HS wrote:
Could you try getting the call trace from the core file ? Assuming the core file is in the current directory, you should do this:
$ gdb /usr/local/hobbit/server/bin/bb-eventlog.cgi core [messages from gdb] gdb> bt
The output from the "bt" command would be very helpful in narrowing down the problem.
Below is the output from gdb
Thanks, that pin-pointed the problem nicely. Your eventlog has an entry from a host that is not in the bb-hosts file; these are ignored by the normal eventlog shown on the bb2 page, but the CGI script tried to include them with fatal consequences.
I've attached a patch to fix this. To apply, save the patch to /tmp/eventlog-crash.patch, then
cd hobbit-4.0.1 patch -p0 </tmp/eventlog-crash.patch make make install # as root
Regards, Henrik
participants (2)
-
EES2Y@hscmail.mcc.virginia.edu
-
henrik@hswn.dk