Wedged state while trying to write upstart jobs

Brian Campbell brian.campbell at editshare.com
Wed Feb 12 19:13:55 UTC 2014


Hi, I'm trying to write a few upstart jobs to handle an inoticoming
queue for a reprepro repository. In particular, I want to start up a
GPG agent to handle signing the release based on incoming packages,
then once that's started start up a few inoticoming jobs.

In the process of trying to get this set up, I seem to have created a
wedged, unkillable job, despite the fact that the underlying process
is no longer present.

I have the following reprepro-gpg.conf:

--- snip ---
description "GPG agent for reprepro signing"

start on runlevel [2345]

setuid repomgr

expect daemon

script
     gpg-agent --daemon                                        \
               --homedir /home/repomgr                         \
               --write-env-file /home/repomgr/.gpg-agent-info  \
               --allow-preset-passphrase                       \
               --verbose                                       \
               --log-file /home/repomgr/gpg-agent-verbose.log
end script

post-start exec /home/repomgr/preset-passhprase.sh
--- snip ---


After having started this once, and tried to stop it, the "sudo stop
reprepro-gpg" hung. I hit Control-C and manually killed the gpg-agent
process with "sudo killall gpg-agent". But now I'm in a state where I
can't start it or stop it; no matter what I do, I can't seem to get
this job unwedged:

$ initctl list | grep reprepro-gpg
reprepro-gpg start/killed, process 13361
$ ps auwx | grep 13361
lambda   13941  0.0  0.0    488     4 pts/0    R+   18:52   0:00 grep
--color=auto 13361
$ sudo stop reprepro-gpg
<hangs>
^C
$ sudo start reprepro-gpg
<hangs>
^C
$ sudo restart reprepro-gpg
<hangs>
^C
$ sudo stop --no-wait reprepro-gpg
stop: Job has already been stopped: reprepro-gpg
$ sudo start --no-wait reprepro-gpg
reprepro-gpg start/killed, process 13361
$ sudo restart --no-wait reprepro-gpg
reprepro-gpg start/killed, process 13361

Any ideas about how I might get out of this state, or debug it? I'm
using Upstart 1.5 on Ubuntu 12.04.4.

-- Brian



More information about the upstart-devel mailing list