Ubuntu Push client should ensure it only runs once per session.

Bug #1309432 reported by John Lenton
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Push Notifications
Fix Released
High
John Lenton
ubuntu-push (Ubuntu)
Fix Released
High
John Lenton
Trusty
Fix Released
Undecided
Unassigned

Bug Description

Ubuntu Push client should ensure it only runs once per session.

[Impact]

 * if two push clients connect with the same id, the last one to connects disconnects the previous ones
 * a "live" client will attempt to reconnect

thus if for whatever reason two clients run in the same session, they will "fight" over it.

[Test Case]

You need:

 * a device on stable
 * two shells running as the phablet user

In one of the shells, do

stop ubuntu-push-client
/usr/lib/ubuntu-push-client/ubuntu-push-client

In the other one, do

/usr/lib/ubuntu-push-client/ubuntu-push-client

Watch the fight that ensues

[Regression Potential]

The current implementation quits the first client once the second one claims the dbus name. This *could* be disconnecting the "wrong" one, but as I have had trouble reproducing this in the wild it's hard to tell. In any case it's better than the fight that would ensue without this.

John Lenton (chipaca)
Changed in ubuntu-push:
assignee: nobody → John Lenton (chipaca)
importance: Undecided → High
status: New → Fix Committed
John Lenton (chipaca)
Changed in ubuntu-push (Ubuntu):
assignee: nobody → John Lenton (chipaca)
importance: Undecided → High
status: New → In Progress
John Lenton (chipaca)
description: updated
description: updated
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello John, or anyone else affected,

Accepted ubuntu-push into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubuntu-push/0.2.1+14.04.20140423.1-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubuntu-push (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Samuele Pedroni (pedronis) wrote :

verified on ubuntu-push-client_0.2.1+14.04.20140423.1-0ubuntu1_amd64.deb,

starting a second process kills the first which gives:
2014/04/24 17:49:07 FATAL: name channel got: name ownership lost

as expected

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

This bug was fixed in the package ubuntu-push - 0.2.1+14.04.20140423.1-0ubuntu1

---------------
ubuntu-push (0.2.1+14.04.20140423.1-0ubuntu1) trusty; urgency=high

  [ Samuele Pedroni ]
  * gave the client the ability to get config from commandline
    ( => easier automated testing) (LP: #1311600)

  [ John Lenton ]
  * Ensure ubuntu-push-client is the only one running in the session.
    (LP: #1309432)
  * Remove supurious numbers in brackets in notifications. (LP: #1308145)
  * Check the server certificate and server name. (LP: #1297969)
  * Loop whoopsie_identifier_generate until it starts working. (LP: #1309237)
  * In the session: set a flag on connect, clear it on successfully
    replying to ping or broadcast messages, check it at the top of
    autoredial. Also track the last autoredial, and set the delay flag if
    autoredial is re-called too quickly. (LP: #1309231)
 -- Ubuntu daily release <email address hidden> Wed, 23 Apr 2014 11:54:00 +0000

Changed in ubuntu-push (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of the Stable Release Update for ubuntu-push has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

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

This bug was fixed in the package ubuntu-push - 0.2.1+14.04.20140423.1-0ubuntu1

---------------
ubuntu-push (0.2.1+14.04.20140423.1-0ubuntu1) trusty; urgency=high

  [ Samuele Pedroni ]
  * gave the client the ability to get config from commandline
    ( => easier automated testing) (LP: #1311600)

  [ John Lenton ]
  * Ensure ubuntu-push-client is the only one running in the session.
    (LP: #1309432)
  * Remove supurious numbers in brackets in notifications. (LP: #1308145)
  * Check the server certificate and server name. (LP: #1297969)
  * Loop whoopsie_identifier_generate until it starts working. (LP: #1309237)
  * In the session: set a flag on connect, clear it on successfully
    replying to ping or broadcast messages, check it at the top of
    autoredial. Also track the last autoredial, and set the delay flag if
    autoredial is re-called too quickly. (LP: #1309231)
 -- Ubuntu daily release <email address hidden> Wed, 23 Apr 2014 11:54:00 +0000

Changed in ubuntu-push (Ubuntu):
status: In Progress → Fix Released
John Lenton (chipaca)
Changed in ubuntu-push:
status: Fix Committed → Fix Released
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.