packages fail to install: Failed to connect to socket /com/ubuntu/upstart: Connection refused
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| upstart (Ubuntu) |
High
|
James Hunt | ||
| Trusty |
High
|
Unassigned |
Bug Description
This is a second install of Xubuntu 12.04-testing.
Apport seems to think this is not reported. Reported it on my other install.
Do not have time or desire to hunt up the other bug, you may have deleted it for all I know.
ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: cups (not installed)
ProcVersionSign
Uname: Linux 3.2.0-3-generic x86_64
NonfreeKernelMo
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Fri Dec 2 20:01:35 2011
Df:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda9 10304824 5614180 4167176 58% /
udev 1536476 0 1536476 0% /dev
DuplicateSignature:
Setting up rsyslog (5.8.6-1ubuntu2) ...
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/
invoke-rc.d: initscript rsyslog, action "restart" failed.
dpkg: error processing rsyslog (--configure):
subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110921.3)
SourcePackage: cups
Title: package cups (not installed) failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Steve Langasek: Approve on 2014-09-08
-
Diff: 123 lines (+77/-16) (has conflicts)2 files modifiedChangeLog (+15/-0)
util/telinit.c (+62/-16)
- James Hunt: Pending requested 2015-01-19
- Ubuntu branches: Pending requested 2015-01-16
-
Diff: 1265 lines (+636/-233) (has conflicts)15 files modifiedChangeLog (+12/-0)
debian/changelog (+21/-1)
debian/control (+2/-2)
debian/rules (+0/-1)
debian/upstart-bin.install (+4/-0)
debian/upstart.install (+0/-4)
extra/Makefile.am (+40/-4)
extra/com.ubuntu.Upstart.xml (+29/-0)
extra/conf-session/upstart-udev-bridge.conf (+22/-0)
extra/conf/upstart-event-bridge.conf (+0/-15)
extra/org.freedesktop.systemd1.xml (+19/-0)
extra/upstart-event-bridge.c (+40/-4)
extra/upstart-local-bridge.c (+322/-181)
extra/upstart-udev-bridge.c (+63/-5)
util/telinit.c (+62/-16)
- Upstart Reviewers: Pending requested 2015-01-16
-
Diff: 71049 lines (+69712/-291)130 files modified.bzrignore (+0/-69)
ABOUT-NLS (+1068/-0)
INSTALL (+370/-0)
Makefile.in (+854/-0)
NEWS (+0/-2)
aclocal.m4 (+1234/-0)
compile (+347/-0)
conf/Makefile.in (+529/-0)
conf/rc-sysinit.conf (+4/-2)
conf/rc.conf (+12/-2)
config.guess (+1420/-0)
config.h.in (+155/-0)
config.rpath (+666/-0)
config.sub (+1794/-0)
configure (+18703/-0)
configure.ac (+11/-2)
contrib/Makefile.in (+471/-0)
dbus/Makefile.in (+532/-0)
debian/README.Debian (+200/-0)
debian/apparmor-profile-load (+30/-0)
debian/changelog (+2099/-0)
debian/compat (+1/-0)
debian/conf/console.conf (+11/-0)
debian/conf/container-detect.conf (+42/-0)
debian/conf/failsafe.conf (+44/-0)
debian/conf/flush-early-job-log.conf (+11/-0)
debian/conf/rcS.conf (+28/-0)
debian/conf/shutdown.conf (+9/-0)
debian/conf/tty1.conf (+14/-0)
debian/conf/tty2.conf (+14/-0)
debian/conf/tty3.conf (+14/-0)
debian/conf/tty4.conf (+14/-0)
debian/conf/tty5.conf (+11/-0)
debian/conf/tty6.conf (+11/-0)
debian/conf/wait-for-state.conf (+60/-0)
debian/control (+91/-0)
debian/copyright (+19/-0)
debian/libupstart-dev.install (+5/-0)
debian/libupstart1.install (+1/-0)
debian/libupstart1.symbols (+2/-0)
debian/manpages/upstart-events.7 (+356/-0)
debian/migrate-inittab.pl (+143/-0)
debian/rules (+58/-0)
debian/running-in-container (+10/-0)
debian/source/format (+1/-0)
debian/source/options (+1/-0)
debian/tests/control (+3/-0)
debian/tests/force (+13/-0)
debian/tests/test_setup (+25/-0)
debian/upstart-bin.apport (+195/-0)
debian/upstart-bin.bash-completion (+1/-0)
debian/upstart-bin.dirs (+1/-0)
debian/upstart-bin.docs (+4/-0)
debian/upstart-bin.install (+45/-0)
debian/upstart-bin.maintscript (+2/-0)
debian/upstart-bin.manpages (+1/-0)
debian/upstart-bin.postinst (+67/-0)
debian/upstart-bin.upstart.cron.daily (+17/-0)
debian/upstart-dconf-bridge.install (+4/-0)
debian/upstart-job (+119/-0)
debian/upstart-monitor.install (+5/-0)
debian/upstart-xsessions (+18/-0)
debian/upstart.dirs (+1/-0)
debian/upstart.install (+28/-0)
debian/upstart.links (+3/-0)
debian/upstart.logrotate (+8/-0)
debian/user-conf/logrotate.conf (+66/-0)
debian/user-conf/xsession-init.conf (+14/-0)
debian/watch (+2/-0)
debian/xsession.d/00upstart (+12/-0)
debian/xsession.d/99upstart (+14/-0)
depcomp (+791/-0)
doc/Makefile.in (+474/-0)
extra/Makefile.am (+40/-4)
extra/Makefile.in (+1254/-0)
extra/com.ubuntu.Upstart.xml (+29/-0)
extra/conf-session/upstart-udev-bridge.conf (+22/-0)
extra/conf/upstart-event-bridge.conf (+0/-15)
extra/org.freedesktop.systemd1.xml (+19/-0)
extra/upstart-event-bridge.c (+40/-4)
extra/upstart-local-bridge.c (+322/-181)
extra/upstart-udev-bridge.c (+63/-5)
init/Makefile.am (+3/-0)
init/Makefile.in (+2338/-0)
init/apparmor.c (+12/-0)
init/job_process.c (+9/-1)
init/man/init.5 (+2/-1)
init/tests/libwrap_inotify.la (+41/-0)
init/tests/test_conf_preload.sh.in (+5/-2)
init/tests/test_job_process.c (+5/-1)
install-sh (+527/-0)
lib/Makefile.in (+1347/-0)
lib/upstart/com.ubuntu.Upstart.Instance.h (+107/-0)
lib/upstart/com.ubuntu.Upstart.Job.h (+140/-0)
lib/upstart/com.ubuntu.Upstart.h (+180/-0)
lib/upstart/upstart-dbus.h (+84/-0)
ltmain.sh (+9661/-0)
m4/gettext.m4 (+381/-0)
m4/iconv.m4 (+180/-0)
m4/intlmacosx.m4 (+51/-0)
m4/lib-ld.m4 (+110/-0)
m4/lib-link.m4 (+709/-0)
m4/lib-prefix.m4 (+185/-0)
m4/libnih.m4 (+248/-0)
m4/libtool.m4 (+7997/-0)
m4/ltoptions.m4 (+384/-0)
m4/ltsugar.m4 (+123/-0)
m4/ltversion.m4 (+23/-0)
m4/lt~obsolete.m4 (+98/-0)
m4/nls.m4 (+31/-0)
m4/pkg.m4 (+214/-0)
m4/po.m4 (+449/-0)
m4/progtest.m4 (+92/-0)
missing (+215/-0)
po/Makefile.in.in (+429/-0)
po/Rules-quot (+47/-0)
po/boldquot.sed (+10/-0)
po/en@boldquot.header (+25/-0)
po/en@boldquot.po (+1908/-0)
po/en@quot.header (+22/-0)
po/en@quot.po (+1905/-0)
po/insert-header.sin (+23/-0)
po/quot.sed (+6/-0)
po/remove-potcdate.sin (+19/-0)
po/stamp-po (+1/-0)
scripts/Makefile.in (+783/-0)
scripts/data/Makefile.in (+566/-0)
test-driver (+139/-0)
test/Makefile.in (+1053/-0)
util/Makefile.in (+1633/-0)
Tom Pino (metalsmith-rangeweb) wrote : | #1 |
tags: | removed: need-duplicate-check |
Till Kamppeter (till-kamppeter) wrote : | #3 |
Terminal log contains:
----------
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/
invoke-rc.d: initscript cups, action "start" failed.
dpkg: error processing cups (--configure):
subprocess installed post-installation script returned error exit status 1
----------
Seems that the post-install script of CUPS is not able to start the CUPS daemon because Upstart is not running. Reassigning ...
affects: | cups (Ubuntu) → upstart (Ubuntu) |
Changed in upstart (Ubuntu): | |
assignee: | nobody → Martin Pitt (pitti) |
Changed in upstart (Ubuntu): | |
assignee: | Martin Pitt (pitti) → nobody |
assignee: | nobody → James Hunt (jamesodhunt) |
summary: |
- package cups (not installed) failed to install/upgrade: subprocess - installed post-installation script returned error exit status 1 + packages fail to install: Failed to connect to socket + /com/ubuntu/upstart: Connection refused |
Martin Pitt (pitti) wrote : | #4 |
This is piling up a number of duplicates, bumping importance.
Changed in upstart (Ubuntu): | |
importance: | Undecided → High |
tags: | added: saucy |
Brian Murray (brian-murray) wrote : | #5 |
Most of the duplicates are from saucy:
$ lp-bug-
LP: #901038 has 4 duplicates
precise: 901035
saucy: 1189175 1189243 1191237
Brian Murray (brian-murray) wrote : | #6 |
xnox - could you have a look at this as james is on holiday for a bit? thanks!
Changed in upstart (Ubuntu): | |
assignee: | James Hunt (jamesodhunt) → Dmitrijs Ledkovs (xnox) |
Changed in upstart (Ubuntu): | |
assignee: | Dmitrijs Ledkovs (xnox) → James Hunt (jamesodhunt) |
James Hunt (jamesodhunt) wrote : | #7 |
I believe the problem here is that although upgrading the Upstart package itself and any of its dependent library packages will force a stateful re-exec, that operation severs all D-Bus connections (since D-Bus does not provide a way to serialise objects such as DBusConnection) and crucially that operation is async...
= Scenario causing this Bug =
I think the behaviour these bugs are caused by is something like:
1) dpkg upgrades Upstart (or one of its dependent libraries).
2) The relevant postinst maintainer script requests Upstart re-exec itself.
3) The re-exec starts (asynchronously).
4) dpkg moves on to installing/
5) invoke-rc.d, called from a maintainer script from another package decides it needs to call start(8) or initctl(8) for example.
6) The appropriate command is run (start/initctl), but fails since Upstart is still finishing re-exec'ing itself.
= Thoughts =
== Tweak invoke-rc.d ==
One possible fix would be to modify invoke-rc.d so that before attempting to run start etc, it first checks that Upstart is contactable by waiting for a "reasonable amount of time" for Upstart to respond (assuming it could be in the process of being re-exec'ed). However, that could be unreliable unless that check occurred before *every* call to initctl/
== Create a dpkg Upstart trigger ==
Another option might be to create a dpkg trigger to handle restarting upstart and have that trigger call 'telinit u' *and then wait* again for that "reasonable amount of time" until Upstart responds before the trigger ends. This sounds attractive since the logic for restarting and waiting is contained in one location. However, if my understanding of triggers is correct (?) this would actually cause another problem: since Upstart grew the ability to re-exec, the expected behaviour is that "as soon as Upstart has been upgraded, the running version of Upstart will match the installed version of Upstart". Using a trigger would break this understanding since the Upstart restart would only occur *after* all the other packages (that declare an interest in the upstart trigger) have been updated.
== Modify initctl ==
A third option could be to modify initctl to make it retry on failure to connect. This could in fact be the default since on a normally working system, there would be no behaviour change. Then, when invoke-rc.d calls initctl/start/etc, it should DTRT under all scenarios.
= Plan =
Short term, tweaking invoke-rc.d is probably the most pragmatic (albeit potentially racy) solution. Long term, we should modify initctl.
James Hunt (jamesodhunt) wrote : | #8 |
Thinking about it, a better solution to modifying initctl would probably be to modify telinit such that it runs fully synchronous when a restart is requested (ie handes the D-Bus disconnection, then polls to reconnect). The only problem there is deciding upon a reasonable "reasonable time to wait" since we cannot reasonably change the behaviour of telinit by adding extra options.
Yet another idea: add a new initctl command 're-exec' that essentially does 'telinit u' but provides options to either run async or sync.
James Hunt (jamesodhunt) wrote : | #9 |
Strike the telinit "reasonable time" comment in #8 - if we've requested Upstart restart, the only reasonable time to wait is forever.
Adam Conrad (adconrad) wrote : | #10 |
Just ran into this on a 14.04 -> 14.04.1 upgrade, and it confused the heck out of me, since it was a non-trivial amount of time before initctl started responding again. Can we get this prioritized and fixed (preferably by making telinit block until it's actually done)?
Adam Conrad (adconrad) wrote : | #11 |
Also, why the heck does this re-exec business take so long? It took well over a minute from 'telinit u' until 'initctl version' worked again on the five machines I just upgraded. There's no way it has so much to do here that it should take that long.
Changed in upstart (Ubuntu): | |
status: | Confirmed → In Progress |
James Hunt (jamesodhunt) wrote : | #12 |
As discussed on #ubuntu-devel with Adam (who was upgrading a number of trusty servers to utopic), the problem he saw was a combination of this bug coupled with bug 1338637 (which explains the poor re-exec performance).
Adam Conrad (adconrad) wrote : | #13 |
I was actually updating trusty to trusty. ie: just regular SRUs will pretty much explode because of this, which was why I was so alarmed.
Launchpad Janitor (janitor) wrote : | #14 |
This bug was fixed in the package upstart - 1.13.2-0ubuntu6
---------------
upstart (1.13.2-0ubuntu6) vivid; urgency=medium
* debian/
into session init, by-passing system upstart & session
event-bridge. This way session logs will be rotated, even upstart is
not system init.
* debian/control: make upstart-monitor & upstart-
installable with just session init, upstart-bin.
* extra/upstart-
* extra/upstart-
events direct.
* util/telinit: Revert to synchronous behaviour coupled with unavoidable
poll to ensure telinit only returns once a re-exec has completed (LP:
#901038).
* move udev & local bridges to upstart-bin package.
-- Dimitri John Ledkov <email address hidden> Sat, 17 Jan 2015 01:59:42 +0000
Changed in upstart (Ubuntu): | |
status: | In Progress → Fix Released |
Launchpad Janitor (janitor) wrote : | #15 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in upstart (Ubuntu Trusty): | |
status: | New → Confirmed |
Changed in upstart (Ubuntu Trusty): | |
importance: | Undecided → High |
affects: | upstart (Ubuntu) → upstart-app-launch (Ubuntu) |
affects: | upstart-app-launch (Ubuntu Trusty) → upstart (Ubuntu Trusty) |
Status changed to 'Confirmed' because the bug affects multiple users.