Lighttpd keeps crashing

Please follow the below template, it will help us to help you!

Expected Behaviour:

lighttpd stays working. I should be able to access the webinterface

Actual Behaviour:

lighthttpd keeps crashing after a few hours/days

Debug Token:

77a5kiaah4

in the lighttpd-errorlog i just see this line 5 times. Nothing else for today.
(log.c.217) server started
(I did not start the server!)

Yes i searched for this problem but none of the past topics actually helped.
i can manually restart the lighttpd service. Works great for a few hours or days until it crahes again. pihole -r also fixes the problem (for a few days)

What does this command show?

sudo service lighttpd status -l

● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Sat 2018-07-14 05:50:59 CEST; 15h ago
Process: 5434 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=killed, sign
Process: 5424 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited,
Main PID: 5434 (code=killed, signal=SEGV)

Jul 14 05:50:58 raspberrypi systemd[1]: lighttpd.service: Failed with result 'signal'.
Jul 14 05:50:59 raspberrypi systemd[1]: lighttpd.service: Service hold-off time over, scheduling
Jul 14 05:50:59 raspberrypi systemd[1]: Stopped Lighttpd Daemon.
Jul 14 05:50:59 raspberrypi systemd[1]: lighttpd.service: Start request repeated too quickly.
Jul 14 05:50:59 raspberrypi systemd[1]: Failed to start Lighttpd Daemon.
Jul 14 05:50:59 raspberrypi systemd[1]: lighttpd.service: Unit entered failed state.
Jul 14 05:50:59 raspberrypi systemd[1]: lighttpd.service: Failed with result 'signal'.

(i did not restart the lighttpd service since it crashed)

Something seems to be signaling lighttpd to stop. Do you have any other services running on the Pi?

Yes but only samba-share, with an USB-stick.
Nothing else. Both installed on a fresh image of raspbian lite.

Samba should not affect pihole :confused:

Make a new debug token. Is your system fully up to date?

Sorry it took a few days.
Yes i run update && upgrade nearly every session.
Debug Token:
eod7yqt84w

What does

-rw-r--r-- 1 root root 44 Jul 15 04:50 /etc/pihole/local.list
   192.168.2.4 raspberrypi
   192.168.2.4 pi.hole

mean?

sudo service lighttpd status -l
Output:

 ESCOD
● lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Fri 2018-07-20 21:38:34 CEST; 1 day 4h ago
  Process: 12492 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=kille
  Process: 12481 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=e
 Main PID: 12492 (code=killed, signal=SEGV)

Jul 20 21:38:34 raspberrypi systemd[1]: lighttpd.service: Service hold-off time over, sched
Jul 20 21:38:34 raspberrypi systemd[1]: Stopped Lighttpd Daemon.
Jul 20 21:38:34 raspberrypi systemd[1]: lighttpd.service: Start request repeated too quickl
Jul 20 21:38:34 raspberrypi systemd[1]: Failed to start Lighttpd Daemon.
Jul 20 21:38:34 raspberrypi systemd[1]: lighttpd.service: Unit entered failed state.
Jul 20 21:38:34 raspberrypi systemd[1]: lighttpd.service: Failed with result 'signal'.

That local.list file makes sure you can access the Pi-hole over both its hostname and the pi.hole domain.

What is the output of this command? sudo lighttpd -D -f /etc/lighttpd/lighttpd.conf

Nothing. it just starts lighttpd.

Segmentation fault.

@Mcat12, can below be applied on lightpd instead of pihole-FTL ?

https://docs.pi-hole.net/ftldns/debugging/

So on step 5 you do:

sudo gdb -p $(pidof lighttpd)

EDIT: Seems to work:

pi@noads:~ $ sudo gdb -p $(pidof lighttpd)
GNU gdb (Raspbian 7.7.1+dfsg-5+rpi1) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
[..]
(gdb) handle SIGHUP nostop SIGPIPE nostop
Signal        Stop      Print   Pass to program Description
SIGHUP        No        Yes     Yes             Hangup
SIGPIPE       No        Yes     Yes             Broken pipe
(gdb) continue
Continuing.

It would work, but we can not do too much with the data it would give us. It's worth a try at least, to get any error message it might spit out.

1 Like
 found)...done.
Reading symbols from /lib/arm-linux-gnueabihf/libcrypt.so.1...Reading symbols from /usr/lib/debug/.build-id/4d/2d9e5f11ccd501ed8b97dd7ceb996b3d5f2151.debug...done.
done.
Reading symbols from /lib/arm-linux-gnueabihf/libnss_compat.so.2...Reading symbols from /usr/lib/debug/.build-id/ce/dbcd6d60886d8865ee06d296477d9415930370.debug...done.
done.
Reading symbols from /lib/arm-linux-gnueabihf/libnsl.so.1...Reading symbols from /usr/lib/debug/.build-id/1a/2613e65d83eeb6c9b4d094b61147e71785eb91.debug...done.
done.
Reading symbols from /lib/arm-linux-gnueabihf/libnss_nis.so.2...Reading symbols from /usr/lib/debug/.build-id/3d/260a6fb5900f371df6d57793400baa4fb1743d.debug...done.
done.
Reading symbols from /lib/arm-linux-gnueabihf/libnss_files.so.2...Reading symbols from /usr/lib/debug/.build-id/7a/6115033566651baedfef4b75b4a49142ae13c6.debug...done.
done.
0x76b9b26c in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
84      ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) handle SIGHUP nostop SIGPIPE nostop
Signal        Stop      Print   Pass to program Description
SIGHUP        No        Yes     Yes             Hangup
SIGPIPE       No        Yes     Yes             Broken pipe
(gdb) continue
Continuing.

Program received signal SIGPIPE, Broken pipe.

Program received signal SIGPIPE, Broken pipe.

Program received signal SIGPIPE, Broken pipe.

Program received signal SIGPIPE, Broken pipe.

Program received signal SIGPIPE, Broken pipe.

Program received signal SIGSEGV, Segmentation fault.
0x0003495c in connection_handle_read_post_state ()
(gdb) backtrace
#0  0x0003495c in connection_handle_read_post_state ()
#1  0x767a1424 in ?? () from /usr/lib/lighttpd/mod_fastcgi.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

Debug Token (if needed):
rldzhm1yme

I cant make anything out of these results.
Are you sure your lighttpd version is up to date ?

pi@noads:~ $ lighttpd -v
lighttpd/1.4.35 (ssl) - a light and fast webserver
Build-Date: Aug  6 2016 04:23:34

pi@noads:~ $ apt-cache policy lighttpd
lighttpd:
  Installed: 1.4.35-4+deb8u1
  Candidate: 1.4.35-4+deb8u1

Could create an "issue" here and ask:

https://redmine.lighttpd.net/projects/lighttpd/issues

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.