Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 201749
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Tavin Cole <tavin.cole@gmail.com>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 201749 depends on: Show dependency tree
Bug 201749 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-12-09 09:28 0000
the following stop() function is run by /etc/init.d/svscan:

stop() {
        ebegin "Stopping service scan services"
        svc -dx /service/* 2>/dev/null
        eend $?
        ebegin "Stopping service scan logging"
        svc -dx /service/*/log 2>/dev/null
        eend $?
        ebegin "Stopping service scan"
        start-stop-daemon --stop --exec /usr/bin/svscan \
                --pidfile /var/run/svscan.pid
        eend $?
}

in between the time the supervise processes are killed by svc -dx, and the time
the svscan process is killed, svscan may spawn new supervise processes, since
that's what it's supposed to do every 5 seconds.  so you can potentially wind
up with a lot of unkilled daemons at shutdown time.

the fix is simple, just kill svscan first:

stop() {
        ebegin "Stopping service scan"
        start-stop-daemon --stop --exec /usr/bin/svscan \
                --pidfile /var/run/svscan.pid
        eend $?
        ebegin "Stopping service scan services"
        svc -dx /service/* 2>/dev/null
        eend $?
        ebegin "Stopping service scan logging"
        svc -dx /service/*/log 2>/dev/null
        eend $?
}

------- Comment #1 From Jakub Moc (RETIRED) 2007-12-09 09:37:07 0000 -------
No idea what installs /etc/init.d/svscan; reopen with exact ebuild name and
version.

------- Comment #2 From Tavin Cole 2007-12-09 09:47:44 0000 -------
sys-process/daemontools-0.76-r5

------- Comment #3 From Benedikt Böhm 2008-04-06 16:53:17 0000 -------
fixed in 0.76-r6

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug