Bug 286424 - Plasma NM Widget freezes Plasma for a few seconds when connecting to WWAN
Summary: Plasma NM Widget freezes Plasma for a few seconds when connecting to WWAN
Status: RESOLVED FIXED
Alias: None
Product: Network Management
Classification: Miscellaneous
Component: Plasma Widget (show other bugs)
Version: 0.9
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-12 16:14 UTC by Thilo-Alexander Ginkel
Modified: 2012-03-13 21:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Make activation more responsive (1.86 KB, patch)
2011-11-12 21:58 UTC, Lamarque V. Souza
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thilo-Alexander Ginkel 2011-11-12 16:14:32 UTC
Version:           0.9 (using KDE 4.7.2) 
OS:                Linux

When connecting to my 3G connection via my WWAN modem by clicking on the entry in the NM Plasma widget, Plasma freezes for a couple of seconds until further actions are possible (including closing the NM connection popup opened by clicking into the Plasma notification area).

Version: 0.9~git20111103.1240c6f-2 (rc2 + the patch from bug #283241).

Reproducible: Sometimes

Steps to Reproduce:
1. Open the NM Widget by clicking into the Plasma notification area
2. Click on the WWAN connection to connect

Actual Results:  
Plasma freezes for a couple of seconds (while or before the connection is established)

Expected Results:  
No freeze happens, the connection is established
Comment 1 Lamarque V. Souza 2011-11-12 21:58:32 UTC
Created attachment 65573 [details]
Make activation more responsive

Can you check if the attached patch fix this problem for you?
Comment 2 Lamarque V. Souza 2011-11-13 19:41:34 UTC
Git commit d6c3b2fc1b50d10fce9518df0dd5d725ef7097b3 by Lamarque V. Souza.
Committed on 13/11/2011 at 20:31.
Pushed by lvsouza into branch 'master'.

Prevent connection activation from freezing plasma-desktop for a few
seconds.

BUG: 286424

M  +5    -1    applet/activatableitem.cpp
M  +1    -0    applet/activatableitem.h
M  +1    -1    plasma_nm_version.h

http://commits.kde.org/networkmanagement/d6c3b2fc1b50d10fce9518df0dd5d725ef7097b3
Comment 3 Lamarque V. Souza 2011-11-13 19:43:31 UTC
Git commit e7fc7826d43d327b401246124705b8bbc027258d by Lamarque V. Souza.
Committed on 13/11/2011 at 20:42.
Pushed by lvsouza into branch 'nm09'.

Prevent connection activation from freezing plasma-desktop for a few
seconds.

BUG: 286424

M  +7    -1    applet/activatableitem.cpp
M  +1    -0    applet/activatableitem.h
M  +1    -1    plasma_nm_version.h

http://commits.kde.org/networkmanagement/e7fc7826d43d327b401246124705b8bbc027258d
Comment 4 Thilo-Alexander Ginkel 2011-11-18 17:35:58 UTC
On Sat, Nov 12, 2011 at 22:58, Lamarque V. Souza <lamarque@kde.org> wrote:
> Can you check if the attached patch fix this problem for you?

So far I have not seen any more freezes. I'll continue to monitor the
situation and will let you know if the issue reappears. Thanks!
Comment 5 Thilo-Alexander Ginkel 2011-11-20 14:35:26 UTC
Hm, the freezes are back (although your patch is applied). :-/ I am not certain under which circumstances they happen, but my gut feeling tells me that they may happen while my 3G modem is switching modes (3G <-> GSM) while I open the plasma widget. Are there any synchronous passages in that code that may be negatively impacted by an unresponsive modem?
Comment 6 Lamarque V. Souza 2011-11-20 16:45:21 UTC
Git commit 21258158153b3364d3409d18b4ade00f994ceb95 by Lamarque V. Souza.
Committed on 20/11/2011 at 17:42.
Pushed by lvsouza into branch 'master'.

Try to prevent gsm connection access technology change from freezing
plasma-desktop for a few seconds.
There are some other changes for wifi connections as well.

CCBUG: 286424

M  +6    -5    applet/gsminterfaceconnectionitem.cpp
M  +1    -1    applet/gsminterfaceconnectionitem.h
M  +5    -5    applet/wirelessnetworkitem.cpp
M  +1    -1    applet/wirelessnetworkitem.h
M  +1    -1    plasma_nm_version.h

http://commits.kde.org/networkmanagement/21258158153b3364d3409d18b4ade00f994ceb95
Comment 7 Lamarque V. Souza 2011-11-20 16:46:57 UTC
Git commit 15d4c4e95190c3005678711a266990d17bb6fe69 by Lamarque V. Souza.
Committed on 20/11/2011 at 17:42.
Pushed by lvsouza into branch 'nm09'.

Try to prevent gsm connection access technology change from freezing
plasma-desktop for a few seconds.
There are some other changes for wifi connections as well.

CCBUG: 286424

M  +6    -5    applet/gsminterfaceconnectionitem.cpp
M  +1    -1    applet/gsminterfaceconnectionitem.h
M  +5    -5    applet/wirelessnetworkitem.cpp
M  +1    -1    applet/wirelessnetworkitem.h

http://commits.kde.org/networkmanagement/15d4c4e95190c3005678711a266990d17bb6fe69
Comment 8 Lamarque V. Souza 2011-11-20 16:50:43 UTC
(In reply to comment #5)
> Hm, the freezes are back (although your patch is applied). :-/ I am not certain
> under which circumstances they happen, but my gut feeling tells me that they
> may happen while my 3G modem is switching modes (3G <-> GSM) while I open the
> plasma widget. Are there any synchronous passages in that code that may be
> negatively impacted by an unresponsive modem?

Please try the new changes. Plasma NM is not multi-threaded. If the get access thecnology call is taking too much time to responde then there is not much I can. I am not willing to implementing a multi-threaded version of Plasma NM because I already have a long list of other things to implement.
Comment 9 Will Stephenson 2011-12-08 11:40:45 UTC
Reassign Network Management bugs to new maintainer.  Have a lot of fun, Lamarque!
Comment 10 Lamarque V. Souza 2011-12-30 23:52:25 UTC
Is this still happening?
Comment 11 Thilo-Alexander Ginkel 2011-12-31 00:51:28 UTC
Actually, yes. I get repeated sporadic Plasma freezes even when the above patch is applied (against rc2 IIRC).

Is there a newer version worth testing?

Would you consider migrating the widget to a multithreaded model feasible (I may give it a try)?
Comment 12 Lamarque V. Souza 2012-01-03 03:34:48 UTC
(In reply to comment #11)
> Actually, yes. I get repeated sporadic Plasma freezes even when the above patch
> is applied (against rc2 IIRC).
> 
> Is there a newer version worth testing?

Nope.
 
> Would you consider migrating the widget to a multithreaded model feasible (I
> may give it a try)?

Not now, I am completely alone working in Plasma NM in the past two months and there are a lot of other things to fix/implement.

This bug is probably something related to DBus. There is this other bug https://bugs.kde.org/show_bug.cgi?id=287002 that is probably a duplicate of this one. It think for some reason in some situations the DBus calls take too much time to complete and that is what is causing the freezes.
Comment 13 Lamarque V. Souza 2012-01-26 20:14:59 UTC
Git commit 544a5272c2172882101469b01aa98248e336999a by Lamarque V. Souza.
Committed on 23/01/2012 at 01:31.
Pushed by lvsouza into branch 'nm09'.

Use asynchronous DBus API in plasmoid and kded module communication.
Related: bug 287002, bug 282022

M  +6    -3    applet/networkmanager.cpp
M  +57   -42   kded/service.cpp
M  +2    -0    kded/service.h
M  +35   -29   libs/client/remoteactivatable.cpp
M  +6    -3    libs/client/remoteactivatable.h
M  +2    -0    libs/client/remoteactivatable_p.h
M  +17   -26   libs/client/remoteactivatablelist.cpp
M  +2    -1    libs/client/remoteactivatablelist.h
M  +31   -14   libs/client/remotegsminterfaceconnection.cpp
M  +3    -1    libs/client/remotegsminterfaceconnection.h
M  +2    -0    libs/client/remotegsminterfaceconnection_p.h
M  +73   -32   libs/client/remoteinterfaceconnection.cpp
M  +5    -3    libs/client/remoteinterfaceconnection.h
M  +8    -0    libs/client/remoteinterfaceconnection_p.h
M  +5    -4    libs/client/remoteunconfiguredinterface.cpp
M  +5    -2    libs/client/remoteunconfiguredinterface.h
M  +3    -2    libs/client/remotevpninterfaceconnection.cpp
M  +2    -1    libs/client/remotevpninterfaceconnection.h
M  +69   -16   libs/client/remotewirelessinterfaceconnection.cpp
M  +4    -1    libs/client/remotewirelessinterfaceconnection.h
M  +10   -0    libs/client/remotewirelessinterfaceconnection_p.h
M  +67   -19   libs/client/remotewirelessnetwork.cpp
M  +4    -1    libs/client/remotewirelessnetwork.h
M  +10   -1    libs/client/remotewirelessnetwork_p.h
M  +21   -0    libs/internals/activatable.cpp
M  +4    -0    libs/internals/activatable.h
M  +33   -9    libs/internals/gsminterfaceconnection.cpp
M  +3    -1    libs/internals/gsminterfaceconnection.h
M  +44   -15   libs/internals/interfaceconnection.cpp
M  +3    -0    libs/internals/interfaceconnection.h
M  +21   -3    libs/internals/wirelessinterfaceconnection.cpp
M  +3    -0    libs/internals/wirelessinterfaceconnection.h
M  +21   -3    libs/internals/wirelessnetwork.cpp
M  +3    -0    libs/internals/wirelessnetwork.h
M  +8    -0    libs/service/interfaces/org.kde.networkmanagement.activatable.xml
M  +8    -0    libs/service/interfaces/org.kde.networkmanagement.gsminterfaceconnection.xml
M  +8    -0    libs/service/interfaces/org.kde.networkmanagement.interfaceconnection.xml
M  +8    -0    libs/service/interfaces/org.kde.networkmanagement.wirelessinterfaceconnection.xml
M  +8    -0    libs/service/interfaces/org.kde.networkmanagement.wirelessnetwork.xml
M  +9    -4    libs/service/interfaces/org.kde.networkmanagement.xml
M  +22   -1    libs/service/sessionabstractedservice.cpp
M  +4    -1    libs/service/sessionabstractedservice.h
M  +1    -1    plasma_nm_version.h

http://commits.kde.org/networkmanagement/544a5272c2172882101469b01aa98248e336999a
Comment 14 Lamarque V. Souza 2012-02-04 22:28:44 UTC
Please test test if the commit above fix your problem.
Comment 15 Lamarque V. Souza 2012-03-04 16:57:19 UTC
There is also this commit to kde-workspace 4.8.1 that can also help: 

https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/21ff56d2058f0e5ed022f464d2cfd8dbd71fbd11

Have you tested if the other commit are enough to solve your problem?
Comment 16 Thilo-Alexander Ginkel 2012-03-05 13:06:23 UTC
> --- Comment #15 from Lamarque V. Souza <lamarque@kde.org> ---
> There is also this commit to kde-workspace 4.8.1 that can also help:
>
> https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/21ff56d2058f0e5ed022f464d2cfd8dbd71fbd11
>
> Have you tested if the other commit are enough to solve your problem?

I upgraded to KDE 4.8.0 yesterday and have not seen any freezes since
then (but also did not use the 3G modem, but in the past the freezes
also sometime occurred when on WiFi). I am not exactly certain about
the plasma-widget-networkmanagement version, though. It claims to be
version 0.9.0-1ubuntu1~oneiric1~ppa1, so I would assume it includes
your patch, right?

Thanks,
Thilo
Comment 17 Lamarque V. Souza 2012-03-13 20:57:08 UTC
Yes, 0.9.0-1ubuntu1~oneiric1~ppa1 contains the fix for the freeze problem with wifi. The fix for 3G freezes is in the commit to kde-workspace. You will have to upgrade to kde-workspace 4.8.1. Please test it so that I can close this bug.
Comment 18 Thilo-Alexander Ginkel 2012-03-13 21:16:35 UTC
On Tue, Mar 13, 2012 at 21:57, Lamarque V. Souza <lamarque@kde.org> wrote:
> https://bugs.kde.org/show_bug.cgi?id=286424
>
> --- Comment #17 from Lamarque V. Souza <lamarque@kde.org> ---
> Yes, 0.9.0-1ubuntu1~oneiric1~ppa1 contains the fix for the freeze problem with
> wifi. The fix for 3G freezes is in the commit to kde-workspace. You will have
> to upgrade to kde-workspace 4.8.1. Please test it so that I can close this bug.

I have upgraded to 4.8.1 on its first day of availability and not seen
any issues so far. Thanks for your help, I think you can close this
bug.