spends lots of time spinning on D-BUS when ofono restarts

Bug #1248880 reported by Martin Pitt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Network Menu
Fix Released
Undecided
Unassigned
indicator-network (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

This got exposed when we started to use ofono-phonesim-autostart for the dialer/messaging-app tests.

Reproducer: sudo restart ofono
Expected result: indicator-network notices that ofono goes off the system D-BUS, listens for an event when it comes back, and reconnects. this should take no noticeable amount of CPU
Actual result: indicator-network-service spends several seconds up to several minutes taking 70% CPU, with a tight loop spinning on trying to talk to ofono.

It might be that this only happens if you actually have a SIM card or other ofono device. If you don't, then you can reproduce with

  sudo apt-get install ofono-phonesim xvfb
  sudo with-ofono-phonesim # leave this running in a terminal

Tags: qa-touch

Related branches

Revision history for this message
Martin Pitt (pitti) wrote :
Download full text (12.5 KiB)

$ G_DBUS_DEBUG=all /usr/lib/arm-linux-gnueabihf/indicator-network/indicator-network-service
[...] let it settle, then restart ofono

You get a loop where this is being called over and over again:

========================================================================
GDBus-debug:Call:
 >>>> ASYNC org.freedesktop.DBus.StartServiceByName()
      on object /org/freedesktop/DBus
      owned by name org.freedesktop.DBus (serial 1022)
========================================================================
GDBus-debug:Transport:
  >>>> WROTE 172 bytes of message with serial 1022 and
       size 172 from offset 0 on a GSocketOutputStream
========================================================================
GDBus-debug:Message:
  >>>> SENT D-Bus message (172 bytes)
  Type: method-call
  Flags: none
  Version: 0
  Serial: 1022
  Headers:
    path -> objectpath '/org/freedesktop/DBus'
    interface -> 'org.freedesktop.DBus'
    member -> 'StartServiceByName'
    destination -> 'org.freedesktop.DBus'
    signature -> signature 'su'
  Body: ('org.ofono', uint32 0)
  UNIX File Descriptors:
    (none)
  0000: 6c 01 00 01 14 00 00 00 fe 03 00 00 85 00 00 00 l...............
  0010: 08 01 67 00 02 73 75 00 01 01 6f 00 15 00 00 00 ..g..su...o.....
  0020: 2f 6f 72 67 2f 66 72 65 65 64 65 73 6b 74 6f 70 /org/freedesktop
  0030: 2f 44 42 75 73 00 00 00 03 01 73 00 12 00 00 00 /DBus.....s.....
  0040: 53 74 61 72 74 53 65 72 76 69 63 65 42 79 4e 61 StartServiceByNa
  0050: 6d 65 00 00 00 00 00 00 02 01 73 00 14 00 00 00 me........s.....
  0060: 6f 72 67 2e 66 72 65 65 64 65 73 6b 74 6f 70 2e org.freedesktop.
  0070: 44 42 75 73 00 00 00 00 06 01 73 00 14 00 00 00 DBus......s.....
  0080: 6f 72 67 2e 66 72 65 65 64 65 73 6b 74 6f 70 2e org.freedesktop.
  0090: 44 42 75 73 00 00 00 00 09 00 00 00 6f 72 67 2e DBus........org.
  00a0: 6f 66 6f 6e 6f 00 00 00 00 00 00 00 ofono.......

========================================================================
GDBus-debug:Transport:
  <<<< READ 16 bytes of message with serial 422 and
       size 198 to offset 0 from a GSocketInputStream
========================================================================
GDBus-debug:Transport:
  <<<< READ 182 bytes of message with serial 422 and
       size 198 to offset 16 from a GSocketInputStream
========================================================================
GDBus-debug:Message:
  <<<< RECEIVED D-Bus message (198 bytes)
  Type: error
  Flags: no-reply-expected
  Version: 0
  Serial: 422
  Headers:
    error-name -> 'org.freedesktop.DBus.Error.ServiceUnknown'
    reply-serial -> uint32 1022
    destination -> ':1.314'
    sender -> 'org.freedesktop.DBus'
    signature -> signature 's'
  Body: ('The name org.ofono was not provided by any .service files',)
  UNIX File Descriptors:
    (none)
  0000: 6c 03 01 01 3e 00 00 00 a6 01 00 00 75 00 00 00 l...>.......u...
  0010: 06 01 73 00 06 00 00 00 3a 31 2e 33 31 34 00 00 ..s.....:1.314..
  0020: 04 01 73 00 29 00 00 00 6f 72 67 2e 66 72 65 65 ..s.)...org.free
  0030: 64 65 73 6b 74 6f 70 2e 44 42 75 73 2e 45 72 7...

Revision history for this message
Martin Pitt (pitti) wrote :

It eventually seems to re-connect, sometimes this takes 10 seconds, sometimes several minutes.

description: updated
Changed in indicator-network (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Martin Pitt (pitti) wrote :

Bumping to critical as according to Didier this breaks lots of autopilot tests.

tags: added: qa-touch
Revision history for this message
Martin Pitt (pitti) wrote :

I suggest using the https://developer.gnome.org/gio/2.32/gio-Watching-Bus-Names.html API for this, which is convenient and efficient.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:indicator-network at revision 314, scheduled for release in indicator-network, milestone Unknown

Changed in indicator-network:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-network - 0.5.1+14.04.20131107-0ubuntu1

---------------
indicator-network (0.5.1+14.04.20131107-0ubuntu1) trusty; urgency=low

  [ Ken VanDine ]
  * Updated argument types in override functions for changes in vala-
    0.22 . (LP: #1244522)

  [ Ted Gould ]
  * Use proper quotes in user facing strings.
  * Make it so we have a single notification in flight at a time. (LP:
    #1236763)
  * When cancel is hit return as a no password to Network Manager. (LP:
    #1236386)
  * Use a shared pointer to make it more Java like and some tests for
    closing notifications.
  * Adding a phone_greeter profile.

  [ Lars Uebernickel ]
  * Don't try to DBus-activate ofono (lp;1248880) Ofono doesn't ship
    with a service file and is managed by upstart anyway. (LP: #1248880)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 314
 -- Ubuntu daily release <email address hidden> Thu, 07 Nov 2013 12:31:39 +0000

Changed in indicator-network (Ubuntu):
status: New → Fix Released
Changed in indicator-network:
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.