← Back to team overview

desktop-packages team mailing list archive

[Bug 1480877] Re: Access points' "PropertiesChanged" dbus signals freeze UI on mobile devices

 

Some more details:

 - the version of the qtbase package in touch atm is: 5.4.1+dfsg-
2ubuntu10

- I checked and didn't see significant differences in the networkmanager
bearer plugin when comparing against 5.5.1, and 5.6.

- That said, there's been quite a few changes in the QDBus code,
specifically qdbusintegrator.cpp.  Some of the changes include
modifications to the signal connect/disconnect code.

- After some further instrumentation, I *think* I've located the bug.  I
added more debug logging to the QDBus code, so I see when match rules
are added and removed, and when the corresponding connect/disconnect
calls are made.   What I see is that the bearer plugin is calling
DBusConnection::connect() for each AccessPoint object that's added.
This results in a single match rule being added, however I see a second
call to DBusConnection::connect() for the same object path, which cause
the ref count to incremented.  When the AccessPoint is removed,
disconnect() only gets called once, the ref count is decremented, and
the match rule lives on.

 - I originally thought this was due to the fact that
QNetworkManagerEngine::nmRegistered() calls
managerInterface->setConnections(), but at a closer the look the former
is registering for Qt signals, while the latter registers for the
associated DBus signals.

 - Looking at the constructor of the plugin engine,
QNetworkManagerEngine, it connects the serviceRegistered Qt signal  to
the method nmEnabled().  At the end of the same function, it checks if
the service (NM) has already been registered, and if so invokes
nmRegistered again via invokeMethod ( that's some Voodoo I don't quite
grok ).  Looking at the nmRegistered() function, it has a guard which
looks like it was copied from ofonoRegisted() as it guards against
ofonoManager != NULL, not managerInterface  ( which is what gets created
in nmRegistered ).  I'll add a bit more logging to confirm, but pretty
sure this is the cause of the extra match refs, as if nmRegistered() is
called twice, it'll cause connect() to be called for AccessPoint objects
twice.

 - I also see twice as many "GetAll" method calls sent for each access
point, although I haven't dug into why this is so yet...

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1480877

Title:
  Access points' "PropertiesChanged" dbus signals freeze UI on mobile
  devices

Status in Canonical System Image:
  Confirmed
Status in Unity 8:
  New
Status in dbus-cpp package in Ubuntu:
  In Progress
Status in indicator-network package in Ubuntu:
  Incomplete
Status in network-manager package in Ubuntu:
  Incomplete
Status in qtbase-opensource-src package in Ubuntu:
  Confirmed
Status in buteo-syncfw package in Ubuntu RTM:
  New
Status in location-service package in Ubuntu RTM:
  In Progress
Status in maliit-framework package in Ubuntu RTM:
  New
Status in network-manager package in Ubuntu RTM:
  Incomplete
Status in sync-monitor package in Ubuntu RTM:
  New

Bug description:
  Krillin, rc-proposed, r83

  
  DESCRIPTION:
  I've been trying to track down the cause of the occasional UI freezes on my Krillin device, and I noticed that whenever the UI freezes for 2-4 seconds, I get a burst of "PropertiesChanged" signals in dbus-monitor

  Here's a log of what's shown in dbus-monitor:
  http://pastebin.ubuntu.com/11992322/

  I'd guess the problem is in the code that actually catches the signals
  and acts accordingly.

  HOW TO REPRODUCE: 
  1) Move to a place where many wifi hotspots are available
  2) Connect the device via USB and run "phablet-shell" and then "dbus-monitor"
  3) Use the device while keeping an eye on dbus-monitor output

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1480877/+subscriptions


References