Premature end of script headers: bb-histlog.sh

Asif Iqbal vadud3 at gmail.com
Fri Mar 26 21:43:25 CET 2010


On Fri, Mar 26, 2010 at 3:57 PM, Asif Iqbal <vadud3 at gmail.com> 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, systems at qwestip.net 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&amp8TIMEBUF=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?



More information about the Xymon mailing list