** Description changed:

  Client should exp backoff reconnect even when connect was successful.
  This would protect us from some situations (already arisen: a server bug
  that disconnects us hard, after accepting the connection).
+ 
+ [Impact]
+ 
+ ubuntu-push-client reattempts connection in a loop, driving load up, as
+ well as disk usage (through the logs) and draining the battery.
+ 
+ [Test Case]
+ 
+ This test case demonstrates the problem by reproducing lp:1309237. You
+ need:
+ 
+ * a computer capable of running the ubuntu push server.
+ * at least two devices using the stable image and that can talk to the 
computer over the network
+ 
+ on a computer reachable from the devices, do:
+ 
+ mkdir -p test-case-1309231/src/launchpad.net
+ cd !$
+ bzr branch lp:ubuntu-push
+ cd ubuntu-push
+ make bootstrap
+ sed -i~ -e 's/127.0.0.1//g' sampleconfigs/dev.json
+ make run-server-dev 
+ 
+ on the devices, edit /etc/xdg/ubuntu-push-client/config.json (or copy it
+ to ~phablet/.config/ubuntu-push-client/config.json and edit it there) so
+ that "addr" points to the IP address of the computer, and port 9090;
+ something like
+ 
+ "addr": "192.168.1.1:9090"
+ 
+ (note there is no https:// as the hosts discovery step is being
+ skipped).
+ 
+ Reboot the devices. Tailing ~phablet/.cache/upstart/ubuntu-push-
+ client.log will show a series of rapid disconnects and reconnects; the
+ output of the server will show a series of empty "registered" (as
+ opposed to "registered" followed by a 256-byte hash). Look at the load
+ on the devices. Be amazed.
+ 
+ [Regression potential]
+ 
+ If a device hits the connects-ok-but-is-then-disconnected-early
+ situation and then enters deep sleep (or is otherwise unable to deliver
+ a timely multi-second timeout), the client might see significant delays
+ in reconnecting successfully, and that might mean they miss a
+ notification that they would've otherwise received. It's rather far
+ fetched, really, and a similar backoff is already in place for other
+ less pathological paths.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1309231

Title:
  Client should exp backoff reconnect even when connect was successful

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-push/+bug/1309231/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to