[xymon] Re: Premature end of script headers: bb-histlog.sh xymon 4.3.0-0.beta2

Anton Burkhalter anton.burkhalter at gmx.net
Mon Aug 16 16:27:21 CEST 2010


> On Fri, Jul 23, 2010 at 1:57 PM, Asif Iqbal <vadud3 at gmail.com> 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&amp8TIMEBUF=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
>
>
> To unsubscribe from the xymon list, send an e-mail to
> xymon-unsubscribe at xymon.com
>
>   
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





More information about the Xymon mailing list