ubiquity upstart: if ubiquity-dm fails to start for an unknown reason, init script exits with no error

Bug #1151224 reported by cleary
36
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
High
Unassigned

Bug Description

I've been having some issues with ubiquity-dm only starting intermittently on a custom livecd.

The problem as it turns out was that debconf was being locked by another init script, and this would cause ubiquity-dm to not start.
However, the provided upstart script ubiquity.conf was still exiting 'normally', ie with a 0 return code, despite ubiquity-dm failing to start.

Debugging with set -x in /etc/init/ubiquity.conf script section:
...
+ [ -n ]
+ ubiquity-dm vt7 :0 ubuntu /usr/bin/ubiquity --greeter --only
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Traceback (most recent call last):
  File "/usr/bin/ubiquity-dm", line 629, in <module>
    dm = DM(vt, display, username)
  File "/usr/bin/ubiquity-dm", line 129, in __init__
    db = DebconfCommunicator('ubiquity', cloexec=True)
  File "/usr/lib/ubiquity/ubiquity/debconfcommunicator.py", line 37, in __init__
    write=self.dccomm.stdin)
  File "/usr/lib/python3/dist-packages/debconf.py", line 50, in __init__
    self.setUp(title)
  File "/usr/lib/python3/dist-packages/debconf.py", line 53, in setUp
    self.version = self.version(2)
  File "/usr/lib/python3/dist-packages/debconf.py", line 62, in <lambda>
    lambda *args, **kw: self.command(command, *args, **kw))
  File "/usr/lib/python3/dist-packages/debconf.py", line 83, in command
    status = int(status)
ValueError: invalid literal for int() with base 10: ''
+ [ ]
+ exit 0

Basically, there is an if statement that catches a couple of known conditions for ubiquity-dm not starting, but there is no catch-all to consider any other cases.

debian/ubiquity.ubiquity.upstart
...
        if ! ubiquity-dm vt7 :0 ubuntu /usr/bin/ubiquity $debug $automatic $choose $ldtp --only $frontend; then
            # has X crashed, or has ubiquity?
            if [ "$automatic" ] && ! [ -f /var/log/installer/version ]; then
                # in case we crashed before the X startup sequence
                plymouth quit || :
                exec ubiquity noninteractive $debug
            fi
        fi

I've attached a patch which simply inserts an 'else' catch-all.

Related branches

Revision history for this message
cleary (bernard-gray) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "ubiquity-debconflock.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Changed in ubiquity (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Changed in ubiquity (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.14.1

---------------
ubiquity (2.14.1) raring; urgency=low

  * Pass --identifier-prefix=Ubiquity via
    UbiquityMockResolver_1_0_gir_SCANNERFLAGS rather than
    UbiquityMockResolver_1_0_gir_CFLAGS, fixing build failure with
    gobject-introspection >= 1.35.9.
 -- Colin Watson <email address hidden> Sat, 30 Mar 2013 23:15:26 +0000

Changed in ubiquity (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1151224

tags: added: iso-testing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.