lighttpd, uid 80: exited on signal 11

Miroslav Lachman 000.fbsd at quip.cz
Fri Apr 12 12:32:14 CEST 2019


Asi tak mesic zpatky se mi na dvou strojich s lighttpd stava, ze proces 
segfaultne. Vetsinou jde znovu spustit a pak zas nejaky cas bezi (dny az 
tydny), ale uz potreti se mi stalo, ze kdyz ho pustim, za chvili zase 
chcipne. Zjistil jsem, ze ho shodi request na interni statistiku, tedy 
URL /server-status (to je podobne, jako ma na tehle URL i Apache).
No a jelikoz tuhle URL checkuje monitoring, ktery z toho pak dela nejake 
grafy, tak pri kazdem checku z monitoringu mi ted Lighttpd segfaultne.
Na serveru se v poslednich tydnech nic neupravovalo / nainstalovalo a 
dneska od 5 hodin rano se deje tohle segfaultovani s zeleznou 
pravidelnosti. Kdykoliv Lighttpd spustim a prijde request na 
/server-status, tak to segfaultne.

Posledne, kdyz se mi tohle delo, tak zabralo to, ze jsem udelal "pkg 
upgrade -f lighttpd", cimz doslo k reinstalaci na identickou verzi 
(identickou instanci baliku z vlastniho repozitare).
Jakou to s tim muze mit souvislost nemam tuseni.

Napada nekoho, cim to muze byt a jak to vyresit?

Mam tu zaznam z truss

kevent(14,0x0,0,{ },2049,{ 1.000000000 })        = 0 (0x0)
clock_gettime(13,{ 1555064436.000000000 })       = 0 (0x0)
kevent(14,0x0,0,{ },2049,{ 1.000000000 })        = 0 (0x0)
clock_gettime(13,{ 1555064438.000000000 })       = 0 (0x0)
kevent(14,0x0,0,{ },2049,{ 1.000000000 })        = 0 (0x0)
clock_gettime(13,{ 1555064439.000000000 })       = 0 (0x0)
kevent(14,0x0,0,{ },2049,{ 1.000000000 })        = 0 (0x0)
clock_gettime(13,{ 1555064440.000000000 })       = 0 (0x0)
kevent(14,0x0,0,{ },2049,{ 1.000000000 })        = 0 (0x0)
clock_gettime(13,{ 1555064441.000000000 })       = 0 (0x0)
kevent(14,0x0,0,{ 4,EVFILT_READ,0x0,0,0x1,0x0 },2049,{ 1.000000000 }) = 
1 (0x1)
accept4(0x4,0x7fffffffe760,0x7fffffffe71c,0x30000000) = 15 (0xf)
getsockopt(15,IPPROTO_TCP,TCP_NODELAY,0x7fffffffe734,0x7fffffffe730) = 0 
(0x0)
ioctl(15,FIONREAD,0x7fffffffa724)                = 0 (0x0)
read(15,0x801874000,4095)                        ERR#35 'Resource 
temporarily unavailable'
kevent(14,{ 15,EVFILT_READ,EV_ADD,0,0x0,0x0 },1,0x0,0,{ 0.000000000 }) = 
0 (0x0)
accept4(0x4,0x7fffffffe760,0x7fffffffe71c,0x30000000) ERR#35 'Resource 
temporarily unavailable'
clock_gettime(13,{ 1555064441.000000000 })       = 0 (0x0)
kevent(14,0x0,0,{ 15,EVFILT_READ,0x0,0,0x18d,0x0 },2049,{ 1.000000000 }) 
= 1 (0x1)
ioctl(15,FIONREAD,0x7fffffffa794)                = 0 (0x0)
read(15,"GET /server-status HT"...,4095) = 397 (0x18d)
SIGNAL 11 (SIGSEGV) code=SEGV_MAPERR trapno=12 addr=0x0
process killed, signal = 11


A stejny zaznam o par minut pozdeji z ktrace

  62872 lighttpd RET   kevent 0
  62872 lighttpd CALL 
openat(AT_FDCWD,0x43daa5,0x108002<O_RDWR|O_NOCTTY|O_CLOEXEC>)
  62872 lighttpd NAMI  "/dev/null"
  62872 lighttpd RET   openat 15/0xf
  62872 lighttpd CALL  close(0xf)
  62872 lighttpd RET   close 0
  62872 lighttpd CALL  clock_gettime(0xd,0x7fffffffe808)
  62872 lighttpd RET   clock_gettime 0
  62872 lighttpd CALL  kevent(0xe,0,0,0x801938540,0x801,0x7fffffffe810)
  62872 lighttpd STRU  struct kevent[] = {  }
  62872 lighttpd STRU  struct kevent[] = {  }
  62872 lighttpd RET   kevent 0
  62872 lighttpd CALL  clock_gettime(0xd,0x7fffffffe808)
  62872 lighttpd RET   clock_gettime 0
  62872 lighttpd CALL 
__sysctl(0x7fffffffe7e8,0x2,0x7fffffffe7f0,0x7fffffffe7e0,0,0)
  62872 lighttpd SCTL  "vm.loadavg"
  62872 lighttpd RET   __sysctl 0
  62872 lighttpd CALL  kevent(0xe,0,0,0x801938540,0x801,0x7fffffffe810)
  62872 lighttpd STRU  struct kevent[] = {  }
  62872 lighttpd STRU  struct kevent[] = {  }
  62872 lighttpd RET   kevent 0
  62872 lighttpd CALL  clock_gettime(0xd,0x7fffffffe808)
  62872 lighttpd RET   clock_gettime 0
  62872 lighttpd CALL  kevent(0xe,0,0,0x801938540,0x801,0x7fffffffe810)
  62872 lighttpd STRU  struct kevent[] = {  }
  62872 lighttpd STRU  struct kevent[] = { { ident=4, 
filter=EVFILT_READ, flags=0, fflags=0, data=0x1, udata=0x0 } }
  62872 lighttpd RET   kevent 1
  62872 lighttpd CALL  accept4(0x4,0x7fffffffe760,0x7fffffffe71c,0x30000000)
  62872 lighttpd STRU  struct sockaddr { AF_INET, 62.24.76.131:19122 }
  62872 lighttpd RET   accept4 15/0xf
  62872 lighttpd CALL 
getsockopt(0xf,IPPROTO_TCP,TCP_NODELAY,0x7fffffffe734,0x7fffffffe730)
  62872 lighttpd RET   getsockopt 0
  62872 lighttpd CALL  ioctl(0xf,FIONREAD,0x7fffffffa724)
  62872 lighttpd RET   ioctl 0
  62872 lighttpd CALL  read(0xf,0x801874000,0xfff)
  62872 lighttpd GIO   fd 15 read 423 bytes
        "GET /server-status HTTP/1.1\r
         Host: XXX.YYY.ZZZ\r
         User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; aaaa bbbb ccccc\r
         Accept: 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r
         Accept-Language: cs,cs-CZ;q=0.8,en-US;q=0.5,en;q=0.3\r
         Accept-Encoding: gzip, deflate\r
         DNT: 1\r
         Connection: keep-alive\r
         Upgrade-Insecure-Requests: 1\r
         Cache-Control: max-age=0\r
         \r
        "
  62872 lighttpd RET   read 423/0x1a7
  62872 lighttpd PSIG  SIGSEGV SIG_DFL code=SEGV_MAPERR

Mirek


More information about the Users-l mailing list