(forwarded to BTS for completeness sake. This bug will be closed with the 4.10 upload (when released by upstream as indicated below))
---------------------------- Original Message ---------------------------- Subject: Re: Bug#433164: monit: Segfault in 3-5 seconds after start From: "Martin Pala" <[EMAIL PROTECTED]> Date: Thu, August 2, 2007 20:32 To: "Stefan Alfredsson" <[EMAIL PROTECTED]> Cc: "Jan-Henrik Haukeland" <[EMAIL PROTECTED]> -------------------------------------------------------------------------- Hi Stefan, the bug was fixed in cvs, you can find the patch for monit 4.8.1 in the attachment. The problem was caused by infinite recursion loop in http protocol test, which caused stack overflow: --8<-- #0 0x00002ace3273d8d7 in _IO_vfscanf_internal () from /lib/libc.so.6 #1 0x00002ace3274c395 in vsscanf () from /lib/libc.so.6 #2 0x00002ace32747ca8 in sscanf () from /lib/libc.so.6 #3 0x000000000041f7b7 in get_response (s=0x56ec30, H=0x7fff78d03a40) at protocols/http.c:473 #4 0x000000000041fb51 in do_redirect (H=0x7fff78d03a40) at protocols/http.c:431 #5 0x000000000041fbbd in do_redirect (H=0x7fff78d03a40) at protocols/http.c:441 #6 0x000000000041fbbd in do_redirect (H=0x7fff78d03a40) at protocols/http.c:441 #7 0x000000000041fbbd in do_redirect (H=0x7fff78d03a40) at protocols/http.c:441 #8 0x000000000041fbbd in do_redirect (H=0x7fff78d03a40) at protocols/http.c:441 #9 0x000000000041fbbd in do_redirect (H=0x7fff78d03a40) at protocols/http.c:441 <- skiped -> #14939 0x000000000041fbbd in do_redirect (H=0x7fff78d03a40) at protocols/http.c:441 #14940 0x000000000041fe6c in check_http (s=0x56ec30) at protocols/http.c:172 #14941 0x0000000000415c62 in check_connection (s=0x567570, p=0x5673a0) at validate.c:572 #14942 0x000000000041641b in check_process (s=0x567570) at validate.c:211 #14943 0x00000000004167f3 in validate () at validate.c:152 #14944 0x000000000040b56f in main (argc=<value optimized out>, argv=<value optimized out>) at monitor.c:487 --8<-- Problem can happen when monit is set to watch http server using built-in http protocol test and this server creates redirect loop. Monit now: 1.) reports error when simple loop is found (redirect location is the same) 2.) monit will follow 64 redirects chain at maximum We will release monit-4.10 soon (most probably next week) which will contain the fix (and numerous other fixes). Thanks for report :) Martin Stefan Alfredsson wrote: > Alexey Bestchekov wrote: >> #0 0x00002ace3273d8d7 in _IO_vfscanf_internal () from /lib/libc.so.6 >> #1 0x00002ace3274c395 in vsscanf () from /lib/libc.so.6 >> #2 0x00002ace32747ca8 in sscanf () from /lib/libc.so.6 >> #3 0x000000000041f7b7 in get_response (s=0x56ec30, H=0x7fff78d03a40) at >> protocols/http.c:473 >> #4 0x000000000041fb51 in do_redirect (H=0x7fff78d03a40) at >> protocols/http.c:431 >> >> the same problem exist in newer upstream version (4.9) >> > > Since the coredump is in libc/vfscanf, I'm guessing this may be 64 bit + > locale related. > > Could you try these steps? > > 1. Unset LANG LC_CTYPE LC_ALL and other locale related variables and try > to start. > > 2. print the variables to get_response() (like gdb monit ; run ; up ; up > ; up ; print s; print H ) > > 3. (a bit more work) upgrade to a newer libc and recompile with that. > > I'm also CC'ing upstream if they have some ideas. > > Regards, > Stefan > >> -- System Information: >> Debian Release: 4.0 >> APT prefers stable >> APT policy: (500, 'stable') >> Architecture: amd64 (x86_64) >> Shell: /bin/sh linked to /bin/bash >> Kernel: Linux 2.6.18-4-amd64 >> Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.koi8r (charmap=KOI8-R) (ignored: >> LC_ALL set to ru_RU.koi8r) >> >> Versions of packages monit depends on: >> ii libc6 2.3.6.ds1-13 GNU C Library: Shared >> libraries >> ii libssl0.9.8 0.9.8c-4 SSL shared libraries >> >> monit recommends no packages. >> >> -- no debconf information >> >> > > > > >
monit_http.patch
Description: application/unknown