[hobbit] hobbit-client: segfault on several systems

Henrik Stoerner henrik at hswn.dk
Mon Jan 28 13:09:14 CET 2008


On Sat, Jan 26, 2008 at 11:51:02AM +0100, Alexander Keller wrote:
> But yesterday a somehow strange error occured. About 15 hobbit clients
> suddenly died (all at the same time! +/- 5min) They all wrote a
> core file.
[snip]
> Core was generated by `/opt/hobbit/client/bin/hobbitlaunch --config=/opt/hobbit/client/etc/clientlaunc'.
> Program terminated with signal 11, Segmentation fault.
> (gdb) bt
> #0  errprintf (fmt=0x805507c "Time warp detected: Adjusting returned clock by %d seconds\n") at errormsg.c:42
> #1  0x08050c8e in getcurrenttime (retparm=0x0) at timefunc.c:55
> #2  0x0804c10b in errprintf (fmt=0x805507c "Time warp detected: Adjusting returned clock by %d seconds\n") at errormsg.c:42
> #3  0x08050c8e in getcurrenttime (retparm=0x0) at timefunc.c:55
> #4  0x0804c10b in errprintf (fmt=0x805507c "Time warp detected: Adjusting returned clock by %d seconds\n") at errormsg.c:42

hobbitlaunch ended up doing an endless recursion, thereby filling up the
stack and crashing.

It was caused by the clock on your boxes suddenly being set back.
Normally, time cannot go backwards (unless your systems are moving
faster than light, which - according to Einstein - is impossible).
Hobbit detects when it happens, but couldn't quite handle it.

I've attached a patch that should prevent this from happening again.


Regards,
Henrik

-------------- next part --------------
A non-text attachment was scrubbed...
Name: timewarp-crash.patch
Type: text/x-diff
Size: 914 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20080128/f7839e65/attachment.patch>


More information about the Xymon mailing list