Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217941 - [TRACKER] Bad or Broken Initscripts/Daemons with Baselayout 2
Summary: [TRACKER] Bad or Broken Initscripts/Daemons with Baselayout 2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Petteri Räty (RETIRED)
URL:
Whiteboard:
Keywords: Tracker
Depends on: 216742 217811 217937
Blocks:
  Show dependency tree
 
Reported: 2008-04-16 12:48 UTC by Paolo Pedroni
Modified: 2017-01-19 18:47 UTC (History)
9 users (show)

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


Attachments
Fixes error message running hcid from /etc/init.d/bluetooth (bluetooth-hcid.patch,845 bytes, patch)
2008-08-10 22:50 UTC, Vince C.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Pedroni 2008-04-16 12:48:39 UTC
As can be seen in bugs #217937 and #217811 it looks like /sbin/start-stop-daemon in sys-apps/openrc has problems with the --pidfile options which in some cases cause the services to appear as crashed in rc-status while they are up and running on the system.

Reproducible: Always

Steps to Reproduce:




# emerge --info
Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r4 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+
Timestamp of tree: Wed, 16 Apr 2008 06:00:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache collision-protect distcc distlocks fixpackages metadata-transfer sandbox sfperms strict test unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/ http://ftp.vein.hu/pub/linux/distributions/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LINGUAS="it"
MAKEOPTS="-j14"
PKGDIR="/usr/portage/packages"
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"
SYNC="rsync://pedroni03/gentoo-portage"
USE="X Xaw3d a52 aac aalib acpi alsa amd64 ao arts audiofile avahi bash-completion berkdb bluetooth bzip2 cairo caps cddb cdparanoia cdr cli cracklib crypt cups curl dbus dga dio dri dvd dvdr dvdread emboss encode exif expat fam fbcon ffmpeg fftw firefox flac fontconfig foomaticdb fortran ftp gd gdbm ggi gif glut gmp gnutls gphoto2 gpm gtk guile hal htmlhandbook iconv idn ieee1394 imagemagick imlib isdnlog jack java javascript jbig jikes jpeg jpeg2k kde kdeenablefinal lcms libcaca libsamplerate lm_sensors lua lzo mad maildir matroska memlimit midi mikmod mime mmap mmx mng mozilla mp3 mpeg mpi mplayer mudflap ncurses nls nptl nptlonly nsplugin offensive ogg openal openexr opengl openmp oss pam pcre pdf perl png portaudio posix ppds pppd python qt3 qt3support qt4 quicktime rdesktop readline recode reflection ruby samba sdl session sharedmem shorten sndfile sockets sox speex spell spl sse sse2 ssl startup-notification svg symlink syslog sysvipc tcl tcpd theora threads tidy tiff tk truetype unicode usb vcd vim-syntax vorbis wmf wxwindows x264 xcb xcomposite xine xinerama xml xorg xosd xpm xscreensaver xv xvid yahoo zlib" ALSA_CARDS="intel8x0 virmidi" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter 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" CAMERAS="kodak ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-04-16 15:39:20 UTC
Maybe this bug can be made into a nice tracker for start-stop-daemon issues?
Comment 2 Oldrich Jedlicka 2008-04-19 09:11:38 UTC
I can confirm that start-stop-daemon has sporadical problems with PIDs on random services. My last case is postgres that "did not create a valid PID in `/var/lib/postgresql/data/postmaster.pid'". But it is up-and-running, `ps ax` shows it, Amarok uses it, the PID file is there and filled.

Maybe some timing issue during parallel startup? Or some locking problem with multi-process access on file?
Comment 3 Roy Marples 2008-04-21 16:41:48 UTC
Oddly enough, my postgresql install on my server works just fine. Although I haven't turned parallel startup on as there are issues with a few service scripts due to broken dependencies which I haven't gotten around to filing bugs for / fixing yet. I'm also loath to test them as the box is headless and the wife doesn't like me hooking my spare keyboard and monitor up to it :/

Infact a quick look shows that dovecot, postfix and postgresql need the following depends added
need localmount
after bootmisc

As the ex dovecot maintainer, I am virtually kicking myself :P
Comment 4 Wolfram Schlich (RETIRED) gentoo-dev 2008-04-21 17:08:17 UTC
(In reply to comment #3)
> Infact a quick look shows that dovecot, postfix and postgresql need the
> following depends added
> need localmount
> after bootmisc
> 
> As the ex dovecot maintainer, I am virtually kicking myself :P

dovecot fixed (all versions). thanks for the headsup!
Comment 5 Oldrich Jedlicka 2008-04-21 17:16:49 UTC
(In reply to comment #3)
> Oddly enough, my postgresql install on my server works just fine.
> ...
> Infact a quick look shows that dovecot, postfix and postgresql need the
> following depends added
> need localmount
> after bootmisc

My postgresql startup fails randomly - I will try extending the depend() of the init.d script.
Comment 6 Christos Stamatopoulos 2008-05-15 11:16:06 UTC
I did not have this kind of problem until 0.2.4

Now on every boot i get
start-stop-daemon : /usr/sbin/hcid died 

but its up and running normally i think :)
Comment 7 Vince C. 2008-08-10 22:50:09 UTC
Created attachment 162651 [details, diff]
Fixes error message running hcid from /etc/init.d/bluetooth

The patch fixes start-stop-daemon error message saying hcid died. The fix forces a non-deamon hcid in the background, which results in a valid return code 0 if hcid has started properly.
Comment 8 Paolo Pedroni 2008-08-11 13:23:46 UTC
Bug summary reinstated as original one, since this bug was NOT hcid specific.
Comment 9 Roy Marples 2008-09-22 07:46:11 UTC
(In reply to comment #8)
> Bug summary reinstated as original one, since this bug was NOT hcid specific.

No it's not, however each service needs to be fixed so that the PARENT creates the correct and working pidfile for the CHILD before it exits instead of the child creating the pidfile AFTER the parent has exited. A good example of this is ntpd [1].

This is a race condition that is only fixable upstream. As such, a bug per package should be created and dealt with individually, so this bug should be re-titled to be hcid specific.

[1] https://support.ntp.org/bugs/show_bug.cgi?id=794
Comment 10 Doug Goldstein (RETIRED) gentoo-dev 2008-10-07 15:53:01 UTC
converted this to a tracker.
Comment 11 Pacho Ramos gentoo-dev 2012-02-09 09:58:15 UTC
Not sure if this is still needed :/
Comment 12 Pacho Ramos gentoo-dev 2012-03-19 09:53:23 UTC
Looks fixed now