ubuntu-push-client consuming a lot of CPU after boot

Bug #1309152 reported by Bill Filler
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Push Notifications
Fix Released
Critical
John Lenton
ubuntu-push (Ubuntu)
Fix Released
Critical
John Lenton

Bug Description

Using build 301 on Nexus 4
ubuntu-push-client 0.2+14.04.20140411-0ubuntu1
reboot the phone

run top -d1
ubuntu-push-client using between 7-12% cpu

reports of it using 25% on Manta (tablet)

Revision history for this message
Bill Filler (bfiller) wrote :

log filled with this:
2014/04/17 15:24:28.758872 DEBUG Connected 91.189.92.115:443.
2014/04/17 15:24:28.759361 DEBUG Session connected after 1 attempts
2014/04/17 15:24:28.785957 ERROR session exited: EOF
2014/04/17 15:24:28.786721 DEBUG trying to connect to: 91.189.92.115:443
2014/04/17 15:24:29.579059 DEBUG Connected 91.189.92.115:443.
2014/04/17 15:24:29.579578 DEBUG Session connected after 1 attempts
2014/04/17 15:24:29.598999 ERROR session exited: EOF
2014/04/17 15:24:29.599762 DEBUG trying to connect to: 91.189.92.115:443
2014/04/17 15:24:30.296951 DEBUG Connected 91.189.92.115:443.
2014/04/17 15:24:30.297562 DEBUG Session connected after 1 attempts
2014/04/17 15:24:30.297745 ERROR session exited: EOF
2014/04/17 15:24:30.298417 DEBUG trying to connect to: 91.189.92.115:443
2014/04/17 15:24:30.910809 DEBUG Connected 91.189.92.115:443.
2014/04/17 15:24:30.911297 DEBUG Session connected after 1 attempts
2014/04/17 15:24:30.935115 ERROR session exited: EOF
2014/04/17 15:24:30.935818 DEBUG trying to connect to: 91.189.92.115:443
2014/04/17 15:24:31.627235 DEBUG Connected 91.189.92.115:443.
2014/04/17 15:24:31.627388 DEBUG Session connected after 1 attempts
2014/04/17 15:24:31.637740 ERROR session exited: EOF
2014/04/17 15:24:31.637953 DEBUG trying to connect to: 91.189.92.115:443
2014/04/17 15:24:32.448033 DEBUG Connected 91.189.92.115:443.
2014/04/17 15:24:32.448582 DEBUG Session connected after 1 attempts
2014/04/17 15:24:32.448735 ERROR session exited: EOF
2014/04/17 15:24:32.449376 DEBUG trying to connect to: 91.189.92.115:443
2014/04/17 15:24:33.165650 DEBUG Connected 91.189.92.115:443.
2014/04/17 15:24:33.166261 DEBUG Session connected after 1 attempts
2014/04/17 15:24:33.166444 ERROR session exited: EOF
2014/04/17 15:24:33.167086 DEBUG trying to connect to: 91.189.92.115:443
^C
phablet@ubuntu-phablet:~$

Changed in ubuntu-push-client (Ubuntu):
importance: Undecided → Critical
assignee: nobody → John Lenton (chipaca)
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

On manta its using 15-20% CPU

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

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

Changed in ubuntu-push-client (Ubuntu):
status: New → Confirmed
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

fwiw pinging push-delivery.ubuntu.com gets no response, but I don't know the configuration as to whether it should reply

Revision history for this message
John Lenton (chipaca) wrote :

Yikes.

Revision history for this message
John Lenton (chipaca) wrote :

We're shutting down the service over the weekend top stop the battery drain. Have been tracking this one down all day, but didn't realise (didn't stop to think!) how bad an impact on cpu usage / battery it would have.

After the weekend we'll be able to get workarounds in place.

Revision history for this message
John Lenton (chipaca) wrote :

So, there's two client-side bugs. One is that, once a connection is successful, it resets the exponential back-off mechanism, so the server dropping the connection hard every time gets it in a spinlock. That's lp:1309231.

The other is that the whoopsie identifier we get is nil for the first ~10 seconds of the client session (this is lp:1309237). We never look into the identifier, just check the error code, so we pass an empty string as the device id, and that disconnects any other device with that id.

Unfortunately during testing the chances of having both test devices boot with the push client installed and connect were so low, we never hit this case.

Sorry, all.

Revision history for this message
John Lenton (chipaca) wrote :

Into a spin, not a spinlock.

Changed in ubuntu-push-client (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
John Lenton (chipaca) wrote :

This has been worked around on the server until we can release a client that works around the timing issue with the library.

Changed in ubuntu-push:
assignee: nobody → John Lenton (chipaca)
importance: Undecided → Critical
status: New → In Progress
status: In Progress → Fix Committed
John Lenton (chipaca)
affects: ubuntu-push-client (Ubuntu) → ubuntu-push (Ubuntu)
John Lenton (chipaca)
Changed in ubuntu-push:
status: Fix Committed → Fix Released
Changed in ubuntu-push (Ubuntu):
status: In Progress → 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.