desktopcouch can start multiple times leading to several running couchdbs

Bug #726597 reported by Roman Yepishev
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
desktopcouch
Fix Released
High
Chad Miller
0.6-stable
Fix Committed
High
Chad Miller
desktopcouch (Ubuntu)
Fix Released
High
Chad Miller
Lucid
Fix Released
High
GRADY A.SMITH

Bug Description

ubuntuone-preferences and ubuntuone-login both wait for CredentialsFound signal (in Lucid).
Both processes will interact with couchdb upon receiving of the signal, the first one will read replication exclusion, the latter will put a pairing record to the db.

It turns out that they are running so head-to-head that they initialize 2 desktopcouches. Desktopcouch checks the pid and if it is not there it will start the couchdb, however, since there are 2 simultaneous calls both processes start their own couchdb. Eventually only one pid will be written to the file, and only one couchdb will be contacted (because of dbus response being returned only by one desktopcouch instance)

This bug prevents CouchDB pairing with Ubuntu One from working consistently, which prevents users from syncing contacts and bookmarks in Lucid with CouchDB from backports installed.

TEST CASE:
1. Ensure that no couchdb and desktopcouch-service processes are running:
1.1 /usr/lib/desktopcouch/desktopcouch-stop
1.2 killall desktopcouch-service
1.3 killall beam
1.4 killall beam.smp
2. Ensure that ubuntuone-syncdaemon is running (we need ubuntuone-login to be running to test for double start)
3. Open ubuntuone-preferences from terminal
4. Run sudo netstat -lntp | grep beam, there should be only one process with beam / beam.smp
5. Verify that there is only one "Apache CouchDB has started on http://127.0.0.1:$port" line in ~/.cache/desktop-couch/desktop-couchdb.log.1

Related branches

Changed in desktopcouch:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Roman Yepishev (rye)
Changed in desktopcouch (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Roman Yepishev (rye)
tags: added: desktop+ support
description: updated
description: updated
Changed in desktopcouch (Ubuntu Lucid):
importance: Undecided → High
status: New → In Progress
Roman Yepishev (rye)
description: updated
Changed in desktopcouch (Ubuntu Lucid):
status: In Progress → New
Chad Miller (cmiller)
Changed in desktopcouch (Ubuntu Lucid):
status: New → Fix Committed
Changed in desktopcouch:
status: In Progress → Fix Released
Changed in desktopcouch (Ubuntu):
status: In Progress → Fix Released
Changed in desktopcouch:
assignee: Roman Yepishev (rye) → Chad Miller (cmiller)
Changed in desktopcouch (Ubuntu):
assignee: Roman Yepishev (rye) → Chad Miller (cmiller)
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

APPROVED: the package uploaded to lucid-proposed should be accepted.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted desktopcouch into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Pedro Villavicencio (pedro) wrote :

I've verified the desktopcouch proposed package, with the new version of proposed you indeed see just one beam process, same goes for the "Apache couchdb *" line on the logs, marking this as verification-done; thanks a lot for the fix.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package desktopcouch - 0.6.4-0ubuntu3.2

---------------
desktopcouch (0.6.4-0ubuntu3.2) lucid-proposed; urgency=low

  * Add debian/patches/lp_726597.patch
    - Avoid race for startup of couchdb (LP: #726597)
 -- Chad MILLER <email address hidden> Thu, 03 Mar 2011 11:06:01 -0500

Changed in desktopcouch (Ubuntu Lucid):
status: Fix Committed → Fix Released
Changed in desktopcouch (Ubuntu Lucid):
assignee: nobody → GRADY A.SMITH (gradysmith8712)
tags: added: testcase
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.