Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 61660 - PID error when stopping or restarting the openntp service
Summary: PID error when stopping or restarting the openntp service
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-25 10:48 UTC by Lars Geiger
Modified: 2004-08-25 17:52 UTC (History)
0 users

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


Attachments
Patch for the openntp initscript (openntp.patch,336 bytes, patch)
2004-08-25 11:02 UTC, Lars Geiger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Geiger 2004-08-25 10:48:58 UTC
When openntpd starts, it creates two processes, one running as root, one as user ntp:

eden ~ > ps aux | grep ntp
root      3673  0.0  0.2  2600 1072 ?        S    19:40   0:00 /usr/sbin/ntpd
ntp       3674  0.0  0.2  2600 1132 ?        S    19:40   0:00 /usr/sbin/ntpd

When stopping openntp, the initscript tries to stop all instances of ntpd:
'start-stop-daemon --stop --name ntpd'

But the process running as user ntp is killed automatically when the process of root is killed. That is why start-stop-daemon can't kill the second process.

Reproducible: Always
Steps to Reproduce:
1. Run '/etc/init.d/openntpd stop'
Actual Results:  
eden ~ > /etc/init.d/openntpd stop
 * Stopping ntpd...
start-stop-daemon: warning: failed to kill 3673: No such process
1 pids were not killed

Expected Results:  
eden ~ > /etc/init.d/openntpd stop
 * Stopping ntpd...                           [ ok ]

eden ~ > emerge info
Portage 2.0.50-r10 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.3.20040420-r1,
2.6.8.1-eden1)
=================================================================
System uname: 2.6.8.1-eden1 i686 VIA Nehemiah
Gentoo Base System version 1.4.16
distcc 2.17 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=i686 -mcpu=i686 -Os -msse -mmmx -mfpmath=sse -pipe
-fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=i686 -mcpu=i686 -Os -msse -mmmx -mfpmath=sse -pipe
-fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache digest sandbox userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="acpi acpi4linux apache2 berkdb cle266 crypt dvd ethereal fbcon freetype gd
gtk2 hardenedphp idea imap jpeg libwww maildir md5sum mmx mpi mysql ncurses nls
pam perl png python readline samba sasl slang sse ssl tiff truetype usb x86 xml
xml2 zlib"
Comment 1 Lars Geiger 2004-08-25 11:02:43 UTC
Created attachment 38186 [details, diff]
Patch for the openntp initscript

Fixes the problem by killing only the process running as root. Also removes an
unnecessary 'rm -f /var/run/ntpd.pid', which is not created by the initscript
nor openntpd itself.
Comment 2 SpanKY gentoo-dev 2004-08-25 17:52:58 UTC
added to portage, thanks