Premature end of script headers: bb-histlog.sh
list Asif Iqbal
I am getting the following error when I was trying to access the port history of the client cer1cc-012.clientcare.example.net Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, user-3ce5d188ef8b@xymon.invalid and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.7d DAV/2 Server at apa-xymon-01.ip.example.net Port 80 [Fri Mar 26 19:43:11 2010] [error] [client 208.47.0.94] Premature end of script headers: bb-histlog.sh, referer: http://apa-xymon-01.ip.example.net/hobbit-cgi/bb-hist.sh?HISTFILE=cer1cc-012.clientcare.example.net.ports&ENTRIES=50&IP=10.240.66.212&DISPLAYNAME=cer1cc-012.clientcare.example.net (root)@apa-xymon-01:/etc/apache2# REQUEST_METHOD=GET SCRIPT_NAME=bb-histlog.sh QUERY_STRING="HOST=cer1cc-012.clientcare.example.net&SERVICE=ports&TIMEBUF=Wed_Mar_24_13:03:57_2010" ~hobbit/cgi-bin/bb-histlog.sh Content-type: text/html Segmentation Fault (core dumped) (root)@apa-xymon-01:/etc/apache2# ls core httpd-std.conf httpd.conf.20100326 magic ssl.conf highperformance-std.conf httpd.conf httpd.conf.orig mime.types ssl.crt highperformance.conf httpd.conf-example httpd.conf.small ssl-std.conf ssl.key (root)@apa-xymon-01:/etc/apache2# file core core: ELF 32-bit LSB core file 80386 Version 1, from 'hobbitsvc.cgi' (root)@apa-xymon-01:/etc/apache2# gdb GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-pc-solaris2.8". (gdb) quit (root)@apa-xymon-01:/etc/apache2# gdb ~hobbit/server/bin/hobbitsvc.cgi core GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-pc-solaris2.8"... Reading symbols from /lib/libpcre.so.0...done. Loaded symbols for /lib/libpcre.so.0 Reading symbols from /lib/libresolv.so.2...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib/libsocket.so.1...done. Loaded symbols for /lib/libsocket.so.1 Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/librt.so.1...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libc.so.1...done. Loaded symbols for /lib/libc.so.1 Reading symbols from /lib/libaio.so.1...done. Loaded symbols for /lib/libaio.so.1 Reading symbols from /lib/libmd.so.1...done. Loaded symbols for /lib/libmd.so.1 Reading symbols from /lib/ld.so.1...done. Loaded symbols for /lib/ld.so.1 Core was generated by `/home/hobbit/server/bin/hobbitsvc.cgi --env=/home/hobbit/server/etc/hobbitserve'. Program terminated with signal 11, Segmentation fault. #0 0xfed64fa1 in realfree () from /lib/libc.so.1 (gdb) bt #0 0xfed64fa1 in realfree () from /lib/libc.so.1 #1 0xfed655bf in cleanfree () from /lib/libc.so.1 #2 0xfed64adb in _malloc_unlocked () from /lib/libc.so.1 #3 0xfed64a04 in malloc () from /lib/libc.so.1 #4 0x08065762 in xmalloc (size=12) at memory.c:119 #5 0x08059748 in expand_env (s=0x8071c75 "4.2.3") at environ.c:296 #6 0x08059ce7 in xgetenv (name=0x8072aca "HOBBITDREL") at environ.c:165 #7 0x0805cd62 in headfoot (output=0x8087590, template=0x8072cc9 "histlog", pagepath=0x8072c2a "", head_or_foot=0x8072c23 "header", bgcolor=0) at headfoot.c:1114 #8 0x0805e0af in generate_html_log (hostname=0x808eb10 "cer1cc-012.clientcare.example.net", displayname=0x808eb10 "cer1cc-012.clientcare.example.net", service=0x80881f8 "ports", ip=0x8092718 "10.240.66.212", color=0, sender=0x80a64b8 "10.240.66.212", flags=0x80714c9 "", logtime=0, timesincechange=0x8047b80 "0.00 minutes", firstline=0x808a650 "green Wed Mar 24 13:03:55 GMT 2010 - Ports OK", restofmsg=0x80a70be "&green ssh (found 1, req. 1 or more)\n\nActive Internet connections (servers and established)\nProto Recv-Q Send-Q Local Address", ' ' <repeats 11 times>, "Foreign Address State \ntcp 0 0 0.0.0.0:"..., acktime=0, ackmsg=0x0, acklist=0x0, disabletime=0, dismsg=0x0, is_history=1, wantserviceid=0, htmlfmt=0, hobbitd=0, multigraphs=0x806d548 ",disk,inode,qtree,quotas,snapshot,TblSpace,if_load,", linktoclient=0x80885a8 "bb-histlog.sh?CLIENT=cer1cc-012.clientcare.example.net&8TIMEBUF=1269435836", nkprio=0x0, nkttgroup=0x0, nkttextra=0x0, output=0x8087590) at htmllog.c:150 #9 0x0805475a in do_request () at hobbitsvc.c:421 #10 0x08055037 in main (argc=1296651320, argv=0x8047c84) at hobbitsvc.c:518 (gdb) I noticed it says --env=/home/hobbit/server/etc/hobbitserve instead of hobbitserver.cfg -- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
list Asif Iqbal
▸
On Fri, Mar 26, 2010 at 3:57 PM, Asif Iqbal <user-6f4b51ac2a40@xymon.invalid> wrote:
I am getting the following error when I was trying to access the port history of the client cer1cc-012.clientcare.example.net Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, user-3ce5d188ef8b@xymon.invalid and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.7d DAV/2 Server at apa-xymon-01.ip.example.net Port 80 [Fri Mar 26 19:43:11 2010] [error] [client 208.47.0.94] Premature end of script headers: bb-histlog.sh, referer: http://apa-xymon-01.ip.example.net/hobbit-cgi/bb-hist.sh?HISTFILE=cer1cc-012.clientcare.example.net.ports&ENTRIES=50&IP=10.240.66.212&DISPLAYNAME=cer1cc-012.clientcare.example.net
It only happens for some hosts. Plus I am using xymon 4.2.3 which has the patch that Henrik offered in 2006.
▸
(root)@apa-xymon-01:/etc/apache2# REQUEST_METHOD=GET SCRIPT_NAME=bb-histlog.sh QUERY_STRING="HOST=cer1cc-012.clientcare.example.net&SERVICE=ports&TIMEBUF=Wed_Mar_24_13:03:57_2010" ~hobbit/cgi-bin/bb-histlog.sh Content-type: text/html Segmentation Fault (core dumped) (root)@apa-xymon-01:/etc/apache2# ls core httpd-std.conf httpd.conf.20100326 magic ssl.conf highperformance-std.conf httpd.conf httpd.conf.orig mime.types ssl.crt highperformance.conf httpd.conf-example httpd.conf.small ssl-std.conf ssl.key (root)@apa-xymon-01:/etc/apache2# file core core: ELF 32-bit LSB core file 80386 Version 1, from 'hobbitsvc.cgi' (root)@apa-xymon-01:/etc/apache2# gdb GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-pc-solaris2.8". (gdb) quit (root)@apa-xymon-01:/etc/apache2# gdb ~hobbit/server/bin/hobbitsvc.cgi core GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-pc-solaris2.8"... Reading symbols from /lib/libpcre.so.0...done. Loaded symbols for /lib/libpcre.so.0 Reading symbols from /lib/libresolv.so.2...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib/libsocket.so.1...done. Loaded symbols for /lib/libsocket.so.1 Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/librt.so.1...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libc.so.1...done. Loaded symbols for /lib/libc.so.1 Reading symbols from /lib/libaio.so.1...done. Loaded symbols for /lib/libaio.so.1 Reading symbols from /lib/libmd.so.1...done. Loaded symbols for /lib/libmd.so.1 Reading symbols from /lib/ld.so.1...done. Loaded symbols for /lib/ld.so.1 Core was generated by `/home/hobbit/server/bin/hobbitsvc.cgi --env=/home/hobbit/server/etc/hobbitserve'. Program terminated with signal 11, Segmentation fault. #0 0xfed64fa1 in realfree () from /lib/libc.so.1 (gdb) bt #0 0xfed64fa1 in realfree () from /lib/libc.so.1 #1 0xfed655bf in cleanfree () from /lib/libc.so.1 #2 0xfed64adb in _malloc_unlocked () from /lib/libc.so.1 #3 0xfed64a04 in malloc () from /lib/libc.so.1 #4 0x08065762 in xmalloc (size=12) at memory.c:119 #5 0x08059748 in expand_env (s=0x8071c75 "4.2.3") at environ.c:296 #6 0x08059ce7 in xgetenv (name=0x8072aca "HOBBITDREL") at environ.c:165 #7 0x0805cd62 in headfoot (output=0x8087590, template=0x8072cc9 "histlog", pagepath=0x8072c2a "", head_or_foot=0x8072c23 "header", bgcolor=0) at headfoot.c:1114 #8 0x0805e0af in generate_html_log (hostname=0x808eb10 "cer1cc-012.clientcare.example.net", displayname=0x808eb10 "cer1cc-012.clientcare.example.net", service=0x80881f8 "ports", ip=0x8092718 "10.240.66.212", color=0, sender=0x80a64b8 "10.240.66.212", flags=0x80714c9 "", logtime=0, timesincechange=0x8047b80 "0.00 minutes", firstline=0x808a650 "green Wed Mar 24 13:03:55 GMT 2010 - Ports OK", restofmsg=0x80a70be "&green ssh (found 1, req. 1 or more)\n\nActive Internet connections (servers and established)\nProto Recv-Q Send-Q Local Address", ' ' <repeats 11 times>, "Foreign Address State \ntcp 0 0 0.0.0.0:"..., acktime=0, ackmsg=0x0, acklist=0x0, disabletime=0, dismsg=0x0, is_history=1, wantserviceid=0, htmlfmt=0, hobbitd=0, multigraphs=0x806d548 ",disk,inode,qtree,quotas,snapshot,TblSpace,if_load,", linktoclient=0x80885a8 "bb-histlog.sh?CLIENT=cer1cc-012.clientcare.example.net&8TIMEBUF=1269435836", nkprio=0x0, nkttgroup=0x0, nkttextra=0x0, output=0x8087590) at htmllog.c:150 #9 0x0805475a in do_request () at hobbitsvc.c:421 #10 0x08055037 in main (argc=1296651320, argv=0x8047c84) at hobbitsvc.c:518 (gdb) I noticed it says --env=/home/hobbit/server/etc/hobbitserve instead of hobbitserver.cfg -- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
list Asif Iqbal
ok I am still getting the premature end of script headers on hobbit 4.2.3. any one can shed some light on this?
▸
On Fri, Mar 26, 2010 at 4:43 PM, Asif Iqbal <user-6f4b51ac2a40@xymon.invalid> wrote:On Fri, Mar 26, 2010 at 3:57 PM, Asif Iqbal <user-6f4b51ac2a40@xymon.invalid> wrote:I am getting the following error when I was trying to access the port history of the client cer1cc-012.clientcare.example.net Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, user-3ce5d188ef8b@xymon.invalid and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.7d DAV/2 Server at apa-xymon-01.ip.example.net Port 80 [Fri Mar 26 19:43:11 2010] [error] [client 208.47.0.94] Premature end of script headers: bb-histlog.sh, referer: http://apa-xymon-01.ip.example.net/hobbit-cgi/bb-hist.sh?HISTFILE=cer1cc-012.clientcare.example.net.ports&ENTRIES=50&IP=10.240.66.212&DISPLAYNAME=cer1cc-012.clientcare.example.netIt only happens for some hosts. Plus I am using xymon 4.2.3 which has the patch that Henrik offered in 2006.(root)@apa-xymon-01:/etc/apache2# REQUEST_METHOD=GET SCRIPT_NAME=bb-histlog.sh QUERY_STRING="HOST=cer1cc-012.clientcare.example.net&SERVICE=ports&TIMEBUF=Wed_Mar_24_13:03:57_2010" ~hobbit/cgi-bin/bb-histlog.sh Content-type: text/html Segmentation Fault (core dumped) (root)@apa-xymon-01:/etc/apache2# ls core httpd-std.conf httpd.conf.20100326 magic ssl.conf highperformance-std.conf httpd.conf httpd.conf.orig mime.types ssl.crt highperformance.conf httpd.conf-example httpd.conf.small ssl-std.conf ssl.key (root)@apa-xymon-01:/etc/apache2# file core core: ELF 32-bit LSB core file 80386 Version 1, from 'hobbitsvc.cgi' (root)@apa-xymon-01:/etc/apache2# gdb GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-pc-solaris2.8". (gdb) quit (root)@apa-xymon-01:/etc/apache2# gdb ~hobbit/server/bin/hobbitsvc.cgi core GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-pc-solaris2.8"... Reading symbols from /lib/libpcre.so.0...done. Loaded symbols for /lib/libpcre.so.0 Reading symbols from /lib/libresolv.so.2...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib/libsocket.so.1...done. Loaded symbols for /lib/libsocket.so.1 Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/librt.so.1...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libc.so.1...done. Loaded symbols for /lib/libc.so.1 Reading symbols from /lib/libaio.so.1...done. Loaded symbols for /lib/libaio.so.1 Reading symbols from /lib/libmd.so.1...done. Loaded symbols for /lib/libmd.so.1 Reading symbols from /lib/ld.so.1...done. Loaded symbols for /lib/ld.so.1 Core was generated by `/home/hobbit/server/bin/hobbitsvc.cgi --env=/home/hobbit/server/etc/hobbitserve'. Program terminated with signal 11, Segmentation fault. #0 0xfed64fa1 in realfree () from /lib/libc.so.1 (gdb) bt #0 0xfed64fa1 in realfree () from /lib/libc.so.1 #1 0xfed655bf in cleanfree () from /lib/libc.so.1 #2 0xfed64adb in _malloc_unlocked () from /lib/libc.so.1 #3 0xfed64a04 in malloc () from /lib/libc.so.1 #4 0x08065762 in xmalloc (size=12) at memory.c:119 #5 0x08059748 in expand_env (s=0x8071c75 "4.2.3") at environ.c:296 #6 0x08059ce7 in xgetenv (name=0x8072aca "HOBBITDREL") at environ.c:165 #7 0x0805cd62 in headfoot (output=0x8087590, template=0x8072cc9 "histlog", pagepath=0x8072c2a "", head_or_foot=0x8072c23 "header", bgcolor=0) at headfoot.c:1114 #8 0x0805e0af in generate_html_log (hostname=0x808eb10 "cer1cc-012.clientcare.example.net", displayname=0x808eb10 "cer1cc-012.clientcare.example.net", service=0x80881f8 "ports", ip=0x8092718 "10.240.66.212", color=0, sender=0x80a64b8 "10.240.66.212", flags=0x80714c9 "", logtime=0, timesincechange=0x8047b80 "0.00 minutes", firstline=0x808a650 "green Wed Mar 24 13:03:55 GMT 2010 - Ports OK", restofmsg=0x80a70be "&green ssh (found 1, req. 1 or more)\n\nActive Internet connections (servers and established)\nProto Recv-Q Send-Q Local Address", ' ' <repeats 11 times>, "Foreign Address State \ntcp 0 0 0.0.0.0:"..., acktime=0, ackmsg=0x0, acklist=0x0, disabletime=0, dismsg=0x0, is_history=1, wantserviceid=0, htmlfmt=0, hobbitd=0, multigraphs=0x806d548 ",disk,inode,qtree,quotas,snapshot,TblSpace,if_load,", linktoclient=0x80885a8 "bb-histlog.sh?CLIENT=cer1cc-012.clientcare.example.net&8TIMEBUF=1269435836", nkprio=0x0, nkttgroup=0x0, nkttextra=0x0, output=0x8087590) at htmllog.c:150 #9 0x0805475a in do_request () at hobbitsvc.c:421 #10 0x08055037 in main (argc=1296651320, argv=0x8047c84) at hobbitsvc.c:518 (gdb) I noticed it says --env=/home/hobbit/server/etc/hobbitserve instead of hobbitserver.cfg -- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
list Asif Iqbal
I am getting core dump only for historical yellow data for some hosts. apache log: [Fri Jul 23 16:17:22 2010] [error] [client 192.168.0.94] Premature end of script headers: bb-histlog.sh, referer: https://xymon.example.net/hobbit-cgi/bb-hist.sh?HISTFILE=cer1cc-015.clientcare.example.net.cpu&ENTRIES=50&IP=192.168.0.209&DISPLAYNAME=cer1cc-015.clientcare.example.net (hobbit)@xymon:~$ REQUEST_METHOD=GET SCRIPT_NAME=bb-histlog.sh QUERY_STRING="HOST=cer1cc-014.clientcare.example.net&SERVICE=cpu&TIMEBUF=Wed_Jul_21_14:56:42_2010" cgi-bin/bb-histlog.sh generates core dump. (hobbit)@xymon:~$ file core core: ELF 32-bit LSB core file 80386 Version 1, from 'hobbitsvc.cgi' (hobbit)@xymon:~$ gdb server/bin/hobbitsvc.cgi core [..] (gdb) backtrace
▸
#0 0xfed64fa1 in realfree () from /lib/libc.so.1
#1 0xfed655bf in cleanfree () from /lib/libc.so.1
#2 0xfed64adb in _malloc_unlocked () from /lib/libc.so.1
#3 0xfed64a04 in malloc () from /lib/libc.so.1
#4 0x08067621 in xmalloc (size=12) at memory.c:119
#5 0x0805a1f1 in expand_env (s=0x80707bb "4.2.3") at environ.c:296
#6 0x0805a08c in xgetenv (name=0x80715c9 "HOBBITDREL") at environ.c:165
#7 0x0805db08 in headfoot (output=0x8089e28, template=0x80717d3
"histlog", pagepath=0x80716c6 "", head_or_foot=0x80717f3 "header",
bgcolor=4) at headfoot.c:1114
#8 0x0805f639 in generate_html_log (hostname=0x80913a8
"cer1cc-014.clientcare.example.net",
displayname=0x80913a8 "cer1cc-014.clientcare.example.net",
service=0x808aa90 "cpu", ip=0x8099168 "10.240.91.208", color=4,
sender=0x80ad668 "10.240.91.208", flags=0x806ff21 "", logtime=0,
timesincechange=0x8047bbc "0.00 minutes",
firstline=0x8094128 "yellow Wed Jul 21 14:56:35 GMT 2010 up: 98
days, 0 users, 624 procs, load=7.51",
restofmsg=0x80ae61f "&yellow Load is HIGH\nSystem clock is 0
seconds off\n\n\n\n\n 2:56pm up 98 days, 17:04, 0 users, load
average: 9.38, 7.51, 4.34\n624 processes: 623 sleeping, 1 running, 0
zombie, 0 stopped\nCPU states: 0"..., acktime=0, ackmsg=0x0,
acklist=0x0,
disabletime=0, dismsg=0x0, is_history=1, wantserviceid=0,
htmlfmt=0, hobbitd=0,
multigraphs=0x8073060 ",disk,inode,qtree,quotas,snapshot,TblSpace,if_load,",
linktoclient=0x808ae40
"bb-histlog.sh?CLIENT=cer1cc-014.clientcare.example.net&8TIMEBUF=1279724202",
nkprio=0x0, nkttgroup=0x0,
nkttextra=0x0, output=0x8089e28) at htmllog.c:150
#9 0x08054189 in do_request () at hobbitsvc.c:421
#10 0x0805530e in main (argc=4, argv=Cannot access memory at address 0x555202bc
) at hobbitsvc.c:518
Any one have a workaround? I tried to change the CFLAGS and recompile
with gcc 4.3.4
replaced
CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF)
with
CFLAGS = -g -O2 -Wall -D_REENTRANT $(LFSDEF) $(OSDEF)
that did not help here.
▸
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
list Asif Iqbal
▸
On Fri, Jul 23, 2010 at 1:57 PM, Asif Iqbal <user-6f4b51ac2a40@xymon.invalid> wrote:
I am getting core dump only for historical yellow data for some hosts. apache log: [Fri Jul 23 16:17:22 2010] [error] [client 192.168.0.94] Premature end of script headers: bb-histlog.sh, referer: https://xymon.example.net/hobbit-cgi/bb-hist.sh?HISTFILE=cer1cc-015.clientcare.example.net.cpu&ENTRIES=50&IP=192.168.0.209&DISPLAYNAME=cer1cc-015.clientcare.example.net (hobbit)@xymon:~$ REQUEST_METHOD=GET SCRIPT_NAME=bb-histlog.sh QUERY_STRING="HOST=cer1cc-014.clientcare.example.net&SERVICE=cpu&TIMEBUF=Wed_Jul_21_14:56:42_2010" cgi-bin/bb-histlog.sh generates core dump. (hobbit)@xymon:~$ file core core: ELF 32-bit LSB core file 80386 Version 1, from 'hobbitsvc.cgi' (hobbit)@xymon:~$ gdb server/bin/hobbitsvc.cgi core [..] (gdb) backtrace #0 0xfed64fa1 in realfree () from /lib/libc.so.1 #1 0xfed655bf in cleanfree () from /lib/libc.so.1 #2 0xfed64adb in _malloc_unlocked () from /lib/libc.so.1 #3 0xfed64a04 in malloc () from /lib/libc.so.1 #4 0x08067621 in xmalloc (size=12) at memory.c:119 #5 0x0805a1f1 in expand_env (s=0x80707bb "4.2.3") at environ.c:296 #6 0x0805a08c in xgetenv (name=0x80715c9 "HOBBITDREL") at environ.c:165 #7 0x0805db08 in headfoot (output=0x8089e28, template=0x80717d3 "histlog", pagepath=0x80716c6 "", head_or_foot=0x80717f3 "header", bgcolor=4) at headfoot.c:1114 #8 0x0805f639 in generate_html_log (hostname=0x80913a8 "cer1cc-014.clientcare.example.net", displayname=0x80913a8 "cer1cc-014.clientcare.example.net", service=0x808aa90 "cpu", ip=0x8099168 "10.240.91.208", color=4, sender=0x80ad668 "10.240.91.208", flags=0x806ff21 "", logtime=0, timesincechange=0x8047bbc "0.00 minutes", firstline=0x8094128 "yellow Wed Jul 21 14:56:35 GMT 2010 up: 98 days, 0 users, 624 procs, load=7.51", restofmsg=0x80ae61f "&yellow Load is HIGH\nSystem clock is 0 seconds off\n\n\n\n\n 2:56pm up 98 days, 17:04, 0 users, load average: 9.38, 7.51, 4.34\n624 processes: 623 sleeping, 1 running, 0 zombie, 0 stopped\nCPU states: 0"..., acktime=0, ackmsg=0x0, acklist=0x0, disabletime=0, dismsg=0x0, is_history=1, wantserviceid=0, htmlfmt=0, hobbitd=0, multigraphs=0x8073060 ",disk,inode,qtree,quotas,snapshot,TblSpace,if_load,", linktoclient=0x808ae40 "bb-histlog.sh?CLIENT=cer1cc-014.clientcare.example.net&8TIMEBUF=1279724202", nkprio=0x0, nkttgroup=0x0, nkttextra=0x0, output=0x8089e28) at htmllog.c:150 #9 0x08054189 in do_request () at hobbitsvc.c:421 #10 0x0805530e in main (argc=4, argv=Cannot access memory at address 0x555202bc ) at hobbitsvc.c:518 Any one have a workaround? I tried to change the CFLAGS and recompile with gcc 4.3.4 replaced CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) with CFLAGS = -g -O2 -Wall -D_REENTRANT $(LFSDEF) $(OSDEF) that did not help here.
forgot to mention the version
(hobbit)@xymon:~$ bb version
Hobbit version 4.2.3
on solaris 10 x86
▸
-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
list Anton Burkhalter
▸
On Fri, Jul 23, 2010 at 1:57 PM, Asif Iqbal <user-6f4b51ac2a40@xymon.invalid> wrote:
I am getting core dump only for historical yellow data for some hosts. apache log: [Fri Jul 23 16:17:22 2010] [error] [client 192.168.0.94] Premature end of script headers: bb-histlog.sh, referer: https://xymon.example.net/hobbit-cgi/bb-hist.sh?HISTFILE=cer1cc-015.clientcare.example.net.cpu&ENTRIES=50&IP=192.168.0.209&DISPLAYNAME=cer1cc-015.clientcare.example.net (hobbit)@xymon:~$ REQUEST_METHOD=GET SCRIPT_NAME=bb-histlog.sh QUERY_STRING="HOST=cer1cc-014.clientcare.example.net&SERVICE=cpu&TIMEBUF=Wed_Jul_21_14:56:42_2010" cgi-bin/bb-histlog.sh generates core dump. (hobbit)@xymon:~$ file core core: ELF 32-bit LSB core file 80386 Version 1, from 'hobbitsvc.cgi' (hobbit)@xymon:~$ gdb server/bin/hobbitsvc.cgi core [..] (gdb) backtrace #0 0xfed64fa1 in realfree () from /lib/libc.so.1 #1 0xfed655bf in cleanfree () from /lib/libc.so.1 #2 0xfed64adb in _malloc_unlocked () from /lib/libc.so.1 #3 0xfed64a04 in malloc () from /lib/libc.so.1 #4 0x08067621 in xmalloc (size=12) at memory.c:119 #5 0x0805a1f1 in expand_env (s=0x80707bb "4.2.3") at environ.c:296 #6 0x0805a08c in xgetenv (name=0x80715c9 "HOBBITDREL") at environ.c:165 #7 0x0805db08 in headfoot (output=0x8089e28, template=0x80717d3 "histlog", pagepath=0x80716c6 "", head_or_foot=0x80717f3 "header", bgcolor=4) at headfoot.c:1114 #8 0x0805f639 in generate_html_log (hostname=0x80913a8 "cer1cc-014.clientcare.example.net", displayname=0x80913a8 "cer1cc-014.clientcare.example.net", service=0x808aa90 "cpu", ip=0x8099168 "10.240.91.208", color=4, sender=0x80ad668 "10.240.91.208", flags=0x806ff21 "", logtime=0, timesincechange=0x8047bbc "0.00 minutes", firstline=0x8094128 "yellow Wed Jul 21 14:56:35 GMT 2010 up: 98 days, 0 users, 624 procs, load=7.51", restofmsg=0x80ae61f "&yellow Load is HIGH\nSystem clock is 0 seconds off\n\n\n\n\n 2:56pm up 98 days, 17:04, 0 users, load average: 9.38, 7.51, 4.34\n624 processes: 623 sleeping, 1 running, 0 zombie, 0 stopped\nCPU states: 0"..., acktime=0, ackmsg=0x0, acklist=0x0, disabletime=0, dismsg=0x0, is_history=1, wantserviceid=0, htmlfmt=0, hobbitd=0, multigraphs=0x8073060 ",disk,inode,qtree,quotas,snapshot,TblSpace,if_load,", linktoclient=0x808ae40 "bb-histlog.sh?CLIENT=cer1cc-014.clientcare.example.net&8TIMEBUF=1279724202", nkprio=0x0, nkttgroup=0x0, nkttextra=0x0, output=0x8089e28) at htmllog.c:150 #9 0x08054189 in do_request () at hobbitsvc.c:421 #10 0x0805530e in main (argc=4, argv=Cannot access memory at address 0x555202bc ) at hobbitsvc.c:518 Any one have a workaround? I tried to change the CFLAGS and recompile with gcc 4.3.4 replaced CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) with CFLAGS = -g -O2 -Wall -D_REENTRANT $(LFSDEF) $(OSDEF) that did not help here.forgot to mention the version (hobbit)@xymon:~$ bb version Hobbit version 4.2.3 on solaris 10 x86-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
Hi, I run into the same problem with xymon 4.3.0-0.beta2 on Red Hat Enterprise Linux Server release 5.4 It works most of the time with Firefox 3.6.8, but not with Internet Explorer 6 Error message in Internet Explorer: Premature end of script headers: bb-histlog.sh # dmesg | tail -1 hobbitsvc.cgi[10759] general protection rip:3226471d71 rsp:7fffd27264e0 error:0 Regards Anton Burkhalter
list Anton Burkhalter
▸
On Fri, Jul 23, 2010 at 1:57 PM, Asif Iqbal <user-6f4b51ac2a40@xymon.invalid> wrote:I am getting core dump only for historical yellow data for some hosts. apache log: [Fri Jul 23 16:17:22 2010] [error] [client 192.168.0.94] Premature end of script headers: bb-histlog.sh, referer: https://xymon.example.net/hobbit-cgi/bb-hist.sh?HISTFILE=cer1cc-015.clientcare.example.net.cpu&ENTRIES=50&IP=192.168.0.209&DISPLAYNAME=cer1cc-015.clientcare.example.net (hobbit)@xymon:~$ REQUEST_METHOD=GET SCRIPT_NAME=bb-histlog.sh QUERY_STRING="HOST=cer1cc-014.clientcare.example.net&SERVICE=cpu&TIMEBUF=Wed_Jul_21_14:56:42_2010" cgi-bin/bb-histlog.sh generates core dump. (hobbit)@xymon:~$ file core core: ELF 32-bit LSB core file 80386 Version 1, from 'hobbitsvc.cgi' (hobbit)@xymon:~$ gdb server/bin/hobbitsvc.cgi core [..] (gdb) backtrace #0 0xfed64fa1 in realfree () from /lib/libc.so.1 #1 0xfed655bf in cleanfree () from /lib/libc.so.1 #2 0xfed64adb in _malloc_unlocked () from /lib/libc.so.1 #3 0xfed64a04 in malloc () from /lib/libc.so.1 #4 0x08067621 in xmalloc (size=12) at memory.c:119 #5 0x0805a1f1 in expand_env (s=0x80707bb "4.2.3") at environ.c:296 #6 0x0805a08c in xgetenv (name=0x80715c9 "HOBBITDREL") at environ.c:165 #7 0x0805db08 in headfoot (output=0x8089e28, template=0x80717d3 "histlog", pagepath=0x80716c6 "", head_or_foot=0x80717f3 "header", bgcolor=4) at headfoot.c:1114 #8 0x0805f639 in generate_html_log (hostname=0x80913a8 "cer1cc-014.clientcare.example.net", displayname=0x80913a8 "cer1cc-014.clientcare.example.net", service=0x808aa90 "cpu", ip=0x8099168 "10.240.91.208", color=4, sender=0x80ad668 "10.240.91.208", flags=0x806ff21 "", logtime=0, timesincechange=0x8047bbc "0.00 minutes", firstline=0x8094128 "yellow Wed Jul 21 14:56:35 GMT 2010 up: 98 days, 0 users, 624 procs, load=7.51", restofmsg=0x80ae61f "&yellow Load is HIGH\nSystem clock is 0 seconds off\n\n\n\n\n 2:56pm up 98 days, 17:04, 0 users, load average: 9.38, 7.51, 4.34\n624 processes: 623 sleeping, 1 running, 0 zombie, 0 stopped\nCPU states: 0"..., acktime=0, ackmsg=0x0, acklist=0x0, disabletime=0, dismsg=0x0, is_history=1, wantserviceid=0, htmlfmt=0, hobbitd=0, multigraphs=0x8073060 ",disk,inode,qtree,quotas,snapshot,TblSpace,if_load,", linktoclient=0x808ae40 "bb-histlog.sh?CLIENT=cer1cc-014.clientcare.example.net&8TIMEBUF=1279724202", nkprio=0x0, nkttgroup=0x0, nkttextra=0x0, output=0x8089e28) at htmllog.c:150 #9 0x08054189 in do_request () at hobbitsvc.c:421 #10 0x0805530e in main (argc=4, argv=Cannot access memory at address 0x555202bc ) at hobbitsvc.c:518 Any one have a workaround? I tried to change the CFLAGS and recompile with gcc 4.3.4 replaced CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) with CFLAGS = -g -O2 -Wall -D_REENTRANT $(LFSDEF) $(OSDEF) that did not help here.forgot to mention the version (hobbit)@xymon:~$ bb version Hobbit version 4.2.3 on solaris 10 x86-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?Hi, I run into the same problem with xymon 4.3.0-0.beta2 on Red Hat Enterprise Linux Server release 5.4 It works most of the time with Firefox 3.6.8, but not with Internet Explorer 6 Error message in Internet Explorer: Premature end of script headers: bb-histlog.sh # dmesg | tail -1 hobbitsvc.cgi[10759] general protection rip:3226471d71 rsp:7fffd27264e0 error:0 Regards Anton Burkhalter
core dump: # gdb /usr/local/xymon/server/bin/hobbitsvc.cgi /tmp/core.15561 GNU gdb Fedora (6.8-37.el5) Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>; This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu"... Reading symbols from /lib64/libpcre.so.0...done. Loaded symbols for /lib64/libpcre.so.0 Reading symbols from /lib64/libdl.so.2...done. Loaded symbols for /lib64/libdl.so.2 Reading symbols from /lib64/librt.so.1...done. Loaded symbols for /lib64/librt.so.1 Reading symbols from /lib64/libc.so.6...done. Loaded symbols for /lib64/libc.so.6 Reading symbols from /lib64/ld-linux-x86-64.so.2...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from /lib64/libpthread.so.0...done. Loaded symbols for /lib64/libpthread.so.0 Core was generated by `/usr/local/xymon/server/bin/hobbitsvc.cgi --env=/usr/local/xymon/server/etc/hob'. Program terminated with signal 11, Segmentation fault. [New process 15561] #0 0x0000003226471d71 in _int_free () from /lib64/libc.so.6 (gdb) backtrace #0 0x0000003226471d71 in _int_free () from /lib64/libc.so.6 #1 0x000000322647273b in free () from /lib64/libc.so.6 #2 0x000000000040995c in expand_env (s=0x426075 "4.3.0-0.beta2") at environ.c:295 #3 0x0000000000409826 in xgetenv (name=0x42606a "HOBBITDREL") at environ.c:167 #4 0x000000000040dbaf in headfoot (output=0x3226751780, template=0x1 <Address 0x1 out of bounds>, pagepath=0x632d6e6f6d79782f <Address 0x632d6e6f6d79782f out of bounds>, head_or_foot=0x1 <Address 0x1 out of bounds>, bgcolor=1) at headfoot.c:1380 #5 0x0000000000410da1 in generate_html_log (hostname=0x16b33130 "xxxxxxxx.xxx.xx.xxx", displayname=0x16b33130 "xxxxxxxx.xxx.xx.xxx", service=0x16b33150 "disk", ip=0x16b380b0 "nn.nn.n.nnn", color=4, sender=0x16b337e0 "nn.nn.n.nnn", flags=0x428ec6 "", logtime=0, timesincechange=0x7fffcce9c1a0 "0.00 minutes", firstline=0x16b33770 "yellow Wed Jul 14 14:15:01 METDST 2010 - Filesystems NOT ok", restofmsg=0x16b3343c "&yellow /share (90% used) has reached the WARNING level (90%)\n\nFilesystem", ' ' <repeats 12 times>, "1024-blocks Used Available Capacity Mounted on\nexxxxxx:/pub_shared 51081852 45949708 5132144 90% /share"..., acktime=0, ackmsg=0x0, acklist=0x0, disabletime=0, dismsg=0x0, is_history=1, wantserviceid=0, htmlfmt=0, locatorbased=0, multigraphs=0x423d50 ",disk,inode,qtree,quotas,snapshot,TblSpace,if_load,", linktoclient=0x16b33040 "/xymon-cgi/bb-histlog.sh?CLIENT=xxxxxxxx.xxx.xx.xxx&TIMEBUF=1279109716", nkprio=0x0, nkttgroup=0x0, nkttextra=0x0, graphtime=172800, output=0x3226751780) at htmllog.c:169 #6 0x0000000000402757 in do_request () at hobbitsvc.c:571 #7 0x000000000040451b in main (argc=4, argv=<value optimized out>) at hobbitsvc.c:674
list Asif Iqbal
On Mon, Aug 16, 2010 at 10:27 AM, Anton Burkhalter
▸
<user-0fe67fd59d68@xymon.invalid> wrote:On Fri, Jul 23, 2010 at 1:57 PM, Asif Iqbal <user-6f4b51ac2a40@xymon.invalid> wrote:I am getting core dump only for historical yellow data for some hosts. apache log: [Fri Jul 23 16:17:22 2010] [error] [client 192.168.0.94] Premature end of script headers: bb-histlog.sh, referer: https://xymon.example.net/hobbit-cgi/bb-hist.sh?HISTFILE=cer1cc-015.clientcare.example.net.cpu&ENTRIES=50&IP=192.168.0.209&DISPLAYNAME=cer1cc-015.clientcare.example.net (hobbit)@xymon:~$ REQUEST_METHOD=GET SCRIPT_NAME=bb-histlog.sh QUERY_STRING="HOST=cer1cc-014.clientcare.example.net&SERVICE=cpu&TIMEBUF=Wed_Jul_21_14:56:42_2010" cgi-bin/bb-histlog.sh generates core dump. (hobbit)@xymon:~$ file core core: ELF 32-bit LSB core file 80386 Version 1, from 'hobbitsvc.cgi' (hobbit)@xymon:~$ gdb server/bin/hobbitsvc.cgi core [..] (gdb) backtrace #0 0xfed64fa1 in realfree () from /lib/libc.so.1 #1 0xfed655bf in cleanfree () from /lib/libc.so.1 #2 0xfed64adb in _malloc_unlocked () from /lib/libc.so.1 #3 0xfed64a04 in malloc () from /lib/libc.so.1 #4 0x08067621 in xmalloc (size=12) at memory.c:119 #5 0x0805a1f1 in expand_env (s=0x80707bb "4.2.3") at environ.c:296 #6 0x0805a08c in xgetenv (name=0x80715c9 "HOBBITDREL") at environ.c:165 #7 0x0805db08 in headfoot (output=0x8089e28, template=0x80717d3 "histlog", pagepath=0x80716c6 "", head_or_foot=0x80717f3 "header", bgcolor=4) at headfoot.c:1114 #8 0x0805f639 in generate_html_log (hostname=0x80913a8 "cer1cc-014.clientcare.example.net", displayname=0x80913a8 "cer1cc-014.clientcare.example.net", service=0x808aa90 "cpu", ip=0x8099168 "10.240.91.208", color=4, sender=0x80ad668 "10.240.91.208", flags=0x806ff21 "", logtime=0, timesincechange=0x8047bbc "0.00 minutes", firstline=0x8094128 "yellow Wed Jul 21 14:56:35 GMT 2010 up: 98 days, 0 users, 624 procs, load=7.51", restofmsg=0x80ae61f "&yellow Load is HIGH\nSystem clock is 0 seconds off\n\n\n\n\n 2:56pm up 98 days, 17:04, 0 users, load average: 9.38, 7.51, 4.34\n624 processes: 623 sleeping, 1 running, 0 zombie, 0 stopped\nCPU states: 0"..., acktime=0, ackmsg=0x0, acklist=0x0, disabletime=0, dismsg=0x0, is_history=1, wantserviceid=0, htmlfmt=0, hobbitd=0, multigraphs=0x8073060 ",disk,inode,qtree,quotas,snapshot,TblSpace,if_load,", linktoclient=0x808ae40 "bb-histlog.sh?CLIENT=cer1cc-014.clientcare.example.net&8TIMEBUF=1279724202", nkprio=0x0, nkttgroup=0x0, nkttextra=0x0, output=0x8089e28) at htmllog.c:150 #9 0x08054189 in do_request () at hobbitsvc.c:421 #10 0x0805530e in main (argc=4, argv=Cannot access memory at address 0x555202bc ) at hobbitsvc.c:518
hopefully more people will report this to make it a higher priority
▸
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?