Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 220161 - /etc/init.d/lighttpd stop doesn't kill process
Summary: /etc/init.d/lighttpd stop doesn't kill process
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alex Alexander (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-03 21:08 UTC by James Colannino
Modified: 2011-05-25 18:49 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
failing /etc/init.d/lighttpd --debug stop (lighttpd.stop.debug,34.80 KB, text/plain)
2009-07-05 05:24 UTC, James Pic
Details
Init script patch that checks /var for avalaible disk space in checkconfig() (lighttpd.patch,555 bytes, patch)
2009-07-07 13:10 UTC, James Pic
Details | Diff
This patch makes a less retarded use of `df` and has a min_space variable. (lighttpd.patch,555 bytes, patch)
2009-07-07 13:22 UTC, James Pic
Details | Diff
The output of /etc/init.d/lighttpd restart --debug (debug.txt,95.49 KB, text/plain)
2009-08-28 19:57 UTC, James Colannino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Colannino 2008-05-03 21:08:26 UTC
The init script for the latest stable ebuild of lighttpd (1.4.19) will not kill the lighttpd process when issued the stop command.

Reproducible: Always

Steps to Reproduce:
1. /etc/init.d/lighttpd start
2. /etc/init.d/lighttpd stop
3. ps aux | grep lighttpd

Actual Results:  
The lighttpd daemon is still running (this causes problems when  trying to restart the daemon; I must manually kill the process first)

Expected Results:  
killed the lighttpd process
Comment 1 RGK 2008-05-04 00:42:04 UTC
I run lighttpd 1.4.19-r2 (upgraded 04/05/08) lighttpd on my Gentoo AMD64 box and '/etc/init.d/lighttpd stop' works just as it should. If you could give more information and/or upgrade to 1.4.19-r2, see if upgrading fixes the problem.
Comment 2 James Colannino 2008-05-04 08:04:27 UTC
(In reply to comment #1)
> I run lighttpd 1.4.19-r2 (upgraded 04/05/08) lighttpd on my Gentoo AMD64 box
> and '/etc/init.d/lighttpd stop' works just as it should. If you could give more
> information and/or upgrade to 1.4.19-r2, see if upgrading fixes the problem.
> 

Hmm...

I am running the latest version on an AMD64 box.  I'm not sure what other information I can provide (please, let me know what would be useful so I can post it.)  I've tried multiple times, hoping the init script would kill the process, but unfortunately, the daemon continues to run after the init script claims the process was killed, and when I try to start it again, it refuses to because there's already a daemon listening on port 80 (until I manually kill the process.)
Comment 3 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2008-05-05 06:59:29 UTC
what use flag combination are you running lighttpd with? (ie. show us the output of 'emerge -pv lighttpd')

thanks
Comment 4 James Colannino 2008-05-10 18:07:14 UTC
Sorry for the late response.  I didn't see this email in my inbox for a while.  Here's the output of emerge -pv lighttpd:

USE="bzip2 gdbm ipv6 memcache mysql pcre php ssl webdav -doc -fam -fastcgi -ldap -lua -minimal -rrdtool -test -xattr"

I actually built a new server last night, and compiled a brand new Gentoo x86_64 system.  I can confirm that I still have the same problem.
Comment 5 RGK 2008-05-15 14:08:36 UTC
I am taking a guess, unless you truly don't want fastcgi enabled. Try using the fastcgi flag.

srv1 ~ # eix lighttpd
[I] www-servers/lighttpd
     Available versions:  1.4.16 1.4.18 1.4.18-r1 1.4.18-r2 1.4.18-r3 ~1.4.19 ~1.4.19-r1 1.4.19-r2 {bzip2 doc fam fastcgi gdbm ipv6 ldap lua memcache minimal mysql pcre php rrdtool ssl test webdav xattr}
     Installed versions:  1.4.19-r2(01:23:01 04/05/08)(bzip2 fam fastcgi gdbm ipv6 memcache mysql pcre php rrdtool ssl webdav xattr -doc -ldap -lua -minimal -test)
     Homepage:            http://www.lighttpd.net/
     Description:         Lightweight high-performance web server

srv1 ~ # /etc/init.d/lighttpd stop
 * Caching service dependencies ...                                       [ ok ]
 * Stopping lighttpd ...                                                  [ ok ]
srv1 ~ # /etc/init.d/lighttpd start
 * Starting lighttpd ...                                                  [ ok ]

It all worked how it should.
Comment 6 James Colannino 2008-05-16 21:28:59 UTC
I tried emerging with fastcgi support.  I tried stopping the daemon, then starting it.  Same problem... :(
Comment 7 James Colannino 2008-05-17 22:36:12 UTC
The plot thickens...  I also have lighttpd installed on my laptop (I use it to test web applications I've been working on locally - it's also running Gentoo) and the init script does what it's supposed to do, so it's probably not a bug.

Even though I was trying to avoid restarting my server, I decided to do so just in case, but even after a restart, if I try to restart the lighttpd init script, I still have the same problem (but not on my laptop.)

Does anyone have any ideas as to what I should check?
Comment 8 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-04-01 19:56:11 UTC
i was also unable to reproduce this bug based on your USE flag setting.
Comment 9 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-04-08 15:03:38 UTC
james: can you please reconfirm, that this is still a problem for you?
also - please post your emerge --info output. thanks
Comment 10 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-04-18 21:05:52 UTC
please reopen if problem persists. also try running the startup script with the --debug argument. thanks...
Comment 11 James Pic 2009-07-05 05:24:18 UTC
Created attachment 196711 [details]
failing /etc/init.d/lighttpd --debug stop
Comment 12 James Pic 2009-07-05 05:26:36 UTC
Hi,
This kept happenning when the error.log file was ~4GB, i deleted it and the init script stop function worked as expected again.
Later on, the problem happens again: /etc/init.d/lighttpd stop doesn't kill the process.

Lighttpd 1.4.22-r1 with USE="bzip2 doc fastcgi ipv6 lua memcache pcre ssl -gdbm -ldap -minimal -mysql -php -postgres% -rrdtool -test* -webdav -xattr (-fam%*)"

Thanks for your time, don't hesitate to ask any other information, i love gentoo & lightty
Comment 13 James Pic 2009-07-05 05:30:09 UTC
Portage 2.1.6.13 (hardened/linux/x86, gcc-3.4.6, glibc-2.8_p20080602-r1, 2.6.29.2-grsec2.1.14-vs2.3.0.36.12-ww7-v2 i686)
=================================================================
System uname: Linux-2.6.29.2-grsec2.1.14-vs2.3.0.36.12-ww7-v2-i686-Intel-R-_Xeon-R-_CPU_X3360_@_2.83GHz-with-glibc2.3.2
Timestamp of tree: Sun, 05 Jul 2009 04:30:02 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p24
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="es fr pt en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/liria"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="bash-completion berkdb cli cracklib crypt ctype dedicated doc dri examples fastcgi hardened iconv ipv6 isdnlog jepg memlimit midi mudflap ncurses nptl nptlonly pam pcre perl pic png pppd python readline reflection session spl ssl sysvipc tcpd threads truetype unicode urandom vim-syntax x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1      emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m       maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es fr pt en" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt intel       mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage      siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware         voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Sorry for triple-posting, for my defence, some labrat HAD to spend all saturday night migrating servers!
Comment 14 James Pic 2009-07-05 05:49:24 UTC
I had no space left on /var ...
Comment 15 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-07-07 12:05:44 UTC
too me it sounds fair, that lighttpd behaves strangely when /var is filled...
anyway - i dont know how to improve the startup script for this situation. suggestions?
Comment 16 James Pic 2009-07-07 13:10:02 UTC
Created attachment 197057 [details, diff]
Init script patch that checks /var for avalaible disk space in checkconfig()

To test the attached patch, just change the require free disk space to a number superior to your current disk-space.

While i'm at it, note that i think it's unfair for the init script to "need net", when working offline on localhost.
Comment 17 James Pic 2009-07-07 13:22:38 UTC
Created attachment 197063 [details, diff]
This patch makes a less retarded use of `df` and has a min_space variable.

This patch makes a less retarded use of `df` and has a min_space variable.
Comment 18 James Colannino 2009-08-28 19:52:12 UTC
It is in fact still a problem :(  Installed on any of my other Gentoo boxes it's not, but it always happens on my server.

Here's my emerge --info:

Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.9_p20081201-r2, 2.6.29.3-colannino.org x86_64)
=================================================================
System uname: Linux-2.6.29.3-colannino.org-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-glibc2.2.5
Timestamp of tree: Fri, 14 Aug 2009 23:30:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r13, 2.5.4-r3
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -fomit-frame-pointer -funroll-loops"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -fomit-frame-pointer -funroll-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 bash-completion berkdb bzip2 cgi clamav clamd cli cracklib crypt cscope ctype dba dri dvd dvdr fastcgi ftp gdbm gpm iconv imap ipv6 isdnlog jikes ldap ldap-sasl lighttpd maildir memcache mmx mudflap multilib mysql ncurses nls nptl nptlonly openldap openmp openssl pam pcre pdf perl php pppd python readline reflection session spamassassin spl sqlite sse sse2 ssl sysfs unicode vim-syntax webdav xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 19 James Colannino 2009-08-28 19:57:21 UTC
Created attachment 202553 [details]
The output of /etc/init.d/lighttpd restart --debug
Comment 20 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-09-23 16:41:46 UTC
Thilo, I'd like to request that version 1.4.23 be marked stable. In that case, is there going to be something done on this bug? It is a questionable change in my opinion, I'll defer to you. Thanks in advance.
Comment 21 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-09-23 19:00:13 UTC
this bug seems to be triggered by multiple scenarios. the "full /var partition" scenario i am not inclined to do anything about.

other scenarios havent been identified so stableing of 1.4.23 can go ahead without action on this bug as far as i am concerned.
Comment 22 Markos Chandras (RETIRED) gentoo-dev 2010-11-12 21:39:05 UTC
Can you still reproduce it with 1.4.26-r1?
Comment 23 BRULE Herman 2011-05-25 18:07:04 UTC
(In reply to comment #22)
> Can you still reproduce it with 1.4.26-r1?

Yes, it's occure when lighttpd have site on php, on heavy charge of different client (here lot of web browser on lot of ip)
Comment 24 Markos Chandras (RETIRED) gentoo-dev 2011-05-25 18:49:23 UTC
This should be fixed in 1.4.28-r2. Please test and reopen if needed