[Bug 855010] Re: upstart assumes we can stop tracing processes when exec() is called, breaks 'expect daemon' for cups
Steve Langasek
steve.langasek at canonical.com
Tue Feb 28 23:02:52 UTC 2012
I dug into this further and discovered to my surprise that cupsd doesn't
support daemonizing at all, it only supports backgrounding. And of
course it forks before it calls listen() on its sockets. So frankly,
I'm not sure how I thought "expect daemon" was going to help here.
Now, even if we patched cupsd to daemonize, or fixed bug #530779,
upstart's handling of the reexec would *still* be a problem. So I still
think this is a bug in its own right that we should fix.
** Also affects: upstart
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/855010
Title:
upstart assumes we can stop tracing processes when exec() is called,
breaks 'expect daemon' for cups
Status in Upstart:
New
Status in “upstart” package in Ubuntu:
New
Bug description:
trying to improve the cups upstart job in Ubuntu to use 'expect
daemon' so that the service is reliably up before upstart proceeds on
to running the post-start script, I find that this doesn't work
because cups re-execs itself with different commandline options before
daemonizing. upstart init/job_process.c has the following:
/*
[...]
* We assume that if the job calls exec that it's finished forking so we can
* drop the trace entirely; we have no interest in tracing the new child.
**/
static void
job_process_trace_exec (Job *job,
ProcessType process)
Well, cups obviously violates this expectation, because it unavoidably
re-execs itself.
Is the upstart assumption wrong? Is this sanely *fixable* without
causing knock-on effects?
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: upstart 1.3-0ubuntu9
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic x86_64
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
Date: Tue Sep 20 11:03:08 2011
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: upstart
UpgradeStatus: Upgraded to oneiric on 2011-06-27 (85 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/upstart/+bug/855010/+subscriptions
More information about the foundations-bugs
mailing list