Bug 282022 - plasma freeze intermittently
Summary: plasma freeze intermittently
Status: RESOLVED FIXED
Alias: None
Product: Network Management
Classification: Unclassified
Component: general (show other bugs)
Version: 0.8
Platform: Unlisted Binaries Linux
: NOR normal with 30 votes (vote)
Target Milestone: ---
Assignee: Lamarque V. Souza
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-14 15:24 UTC by Xavier Brochard
Modified: 2012-06-02 10:01 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.9


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Brochard 2011-09-14 15:24:40 UTC
Version:           unspecified (using KDE 4.6.4) 
OS:                Linux

The desktop freeze randomly for about 3-5 minutes, mostly after opening/closing windows.
Applications are still active (can switch tabs or write something). 
Desktop is not refreshed when moving windows (stack of windows visible).
Traditional Kmenu, desktop, folder view plasmoid, taskbar, etc. are inactive

This happens several times per hour, resulting in KDE unusable at work (and desperated sysadmin!)

There is nothing very consistent on xsessionerrors file. When desktop is frozen, nothing is writed in, after it come back, I can see repeated errors lines. But errors messages are not allways the same. 

Most frequent errors are:
----------------
plasma-desktop(30814)/plasma StatusNotifierItemSource::refreshCallback: DBusMenu disabled for this application 
ICE default IO error handler doing an exit(), pid = 30807, errno = 11
ICE default IO error handler doing an exit(), pid = 30814, errno = 11
ICE default IO error handler doing an exit(), pid = 30835, errno = 11

(repeated with PID changing)
--------

OR

--------
Qt: Session management error: Could not open network socket

(repeated or alone)
--------

OR

------
QPainter::setCompositionMode: PorterDuff modes not supported on device

(repeated)
------

We are using KDE through LTSP on Debian Squeeze. Thin clients are Geodes based and refurbished PCs.
Problem happens also with distant access through VNC.
KDE 4.6.4 and Qt 4.7 packages comes from debian-desktop.org project. Hal is removed.

We were previously using Debian Squeeze KDE 4.4.5 packages. We were not having this problem.

I've read several bug reports regarding frozen plasma, but I can't say if it's related. May be these ones: #175087 #267866 #184062

Reproducible: Always

Steps to Reproduce:
Open and close window. Try to right-clic on desktop or taskbar or to open the K menu.


Expected Results:  
Plasma not frozen.
Sysadmin being happy.

While plasma was frozen, I used Krunner to launch konsole. It works and produced this messages in xsessionerrors. I don't know if it is useful or not, but in case:

----------------
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x2397bf0), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ed800bff0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x232bc90), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ed800bff0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x232bc90), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ed800bff0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x23e13e0), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ed800bff0)
krunner(30857)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 59) 
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x2397bf0), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ebc001600)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x232bc90), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ebc001600)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x232bc90), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ebc001600)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x23e13e0), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ebc001600)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x2397bf0), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ec4004f30)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x232bc90), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ec4004f30)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x232bc90), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ec4004f30)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x23e13e0), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ec4004f30)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x2397bf0), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x2205310)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x232bc90), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x2205310)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x232bc90), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x2205310)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x23e13e0), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x2205310)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x2397bf0), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ec40025d0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x232bc90), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ec40025d0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x232bc90), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ec40025d0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Solid::Backends::UDisks::UDisksDevice(0x23e13e0), parent's thread is QThread(0x1e7b910), current thread is ThreadWeaver::Thread(0x7f9ec40025d0)
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x1400009
plasma-desktop(30814)/plasma StatusNotifierItemSource::refreshCallback: DBusMenu disabled for this application 
ICE default IO error handler doing an exit(), pid = 30807, errno = 11
ICE default IO error handler doing an exit(), pid = 30814, errno = 11
ICE default IO error handler doing an exit(), pid = 30835, errno = 11
ICE default IO error handler doing an exit(), pid = 30844, errno = 2
ICE default IO error handler doing an exit(), pid = 30846, errno = 11
ICE default IO error handler doing an exit(), pid = 30867, errno = 11
ICE default IO error handler doing an exit(), pid = 30857, errno = 11
ICE default IO error handler doing an exit(), pid = 30809, errno = 11
ICE default IO error handler doing an exit(), pid = 30834, errno = 11
ICE default IO error handler doing an exit(), pid = 30833, errno = 11
-------------

then desktop returned back.
Comment 1 Xavier Brochard 2011-09-14 15:30:33 UTC
Forgot to say that "top" command shows no activity while plasma is frozen.
Comment 2 Xavier Brochard 2011-09-19 21:49:33 UTC
After a lot of config changes, consisting mainly as reduce of transparency (use of Opaquity theme), use of a fast style for widgets (phase) and kwin windows decoration (quartz), and setting QT_GRAPHICSSYSTEM=raster. The error message in user's xsession-errors file are now only (repeated at each freeze, and writed after the freeze):

QPixmap::handle(): Pixmap is not an X11 class pixmap
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0

OR 

X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x3800125

it depend if I click on K menu or if I right click on the root window.
Comment 3 Aaron J. Seigo 2011-12-03 11:32:50 UTC
does this persist in 4.7?

if so .. what widgets are active? pager, tasks, ..? does it happen only when compositing is on, or is that also off?
Comment 4 Xavier Brochard 2011-12-04 00:18:32 UTC
Compositing is allways off, widgets are default panel with task manager, old style K menu, notification area, etc. Folder view widget is opened on the desktop and used as Desktop folder.

I can't test with 4.7 currently, as it is not available in Debian, but someone reported something very similar on the debian.user.kde mailing list. He was not using kdm but startx (on LTSP we don't use kdm too, but LDM). He found a strange workaround. See his message here: http://lists.debian.org/debian-kde/2011/11/msg00012.html
Comment 5 Sergio 2011-12-27 18:03:08 UTC
I do not know exactly if it is the same bug, but I also experience intermittent freezes of the plasma desktop.

Freezes last from a few seconds to about 1 minute.

When they happen it is impossible to toggle between desktops, use the taskbar or query the icons on the tray.

I understand that the plasma desktop multitasking is cooperative, so that it can be a single plasmoid to freeze all the plasma desktop. I have already asked this question many times, but still have not got an answer. Is there any way to find out what is the plasmoid where plasma locks?
Comment 6 Sergio 2011-12-29 13:43:38 UTC
Made some further investigation.

Even in absence of tools to check at what task the plasma desktop is at any given time, I think that I have managed identifying the culprit.

Disabling the network management item on the system tray settings fixes the issue in my case.

This on KDE 4.7.4 (kubuntu oneiric 64bit).

I am now working with the plain nm-applet which runs in its own thread and seems to give no issue so far.

IMHO to have the plasma desktop intermittently freezing (even if only for a few seconds) is a real showstopper (takes back to the times of windows 3.1), so please consider rising this bug priority.
Comment 7 Guillaume Martres 2012-01-13 16:05:42 UTC
I can confirm this still happens with KDE 4.8rc2 and the network management plasmoid version "0.9~svngit.nm09.20111023.ff842e-0ubuntu1~oneiric1~ppa1" from http://www.kubuntu.org/news/kde-sc-4.7.97. Removing the network management plasmoid from the system tray fixes the problem.
Comment 8 Sergio 2012-01-14 19:06:30 UTC
Do you know if there is any bug open on this on Kubuntu? If not, can you please open a bug tracking this one? So Kubuntu users can see that they can just use KDE removing the nm plasmoid and using the standard nm-applet to work around this issue?
Comment 9 Lamarque V. Souza 2012-01-23 04:33:38 UTC
For those using Plasma NM master branch I have just commited the changes to make the communication between the kded module and the plasmoid asynchronous:

http://commits.kde.org/networkmanagement/8658e7415dfac56db28537d7ed1673cfaef55547

Try and and see if it helps with this problem.
Comment 10 Sergio 2012-01-26 00:22:15 UTC
KDE 4.8.0 seems to hang just like 4.7.x.

Would be nice to know if the above commit has made it into 4.8.0.
Otherwise, at least on ubuntu, the kde team can probably be asked to kindly backport/incorporate it in their 4.8.0 packages.
Comment 11 Sergio 2012-01-26 00:24:00 UTC
I mean the kubuntu kde team, of course. Their ppa greatly helps testing latest KDE efforts.
Comment 12 Lamarque V. Souza 2012-01-26 12:18:38 UTC
Plasma NM is not part of KDE SC, it does not matter if you use KDE SC 4.7.x or 4.8.0. There are two Plasma NM branches: nm09, which I consider the "stable" version, and master, which is the development version. The commit above went to master only. I can consider commiting it to nm09 if I get confirmation that it really fix the freezing issues.

You should look in Ubuntu's repositories if there are packages for the Plasma NM master version. I have read that they exist, but I do not know exactly where.

According to dbus-monitor the commit is effective in the sense that everything still works in my notebook and there is almost no synchronous method calls from Plasma NM anymore. Now there are mostly only asynchronous method calls and signals, which are also asynchronous. The few remaining synchronous calls are in the vpnc import configuration dialog and in the NMDBusSettingsConnectionProvider class when it lists all connections available in NetworkManager. All those calls cannot cause the desktop freezing issus like described here. The NMDBusSettingsConnectionProvider call is executed only once during kded initialization or when the kcm module (main configuration dialog) is launched. If the configuration dialog appears then the call has successfully finished and should not cause problems like this one.

I can say that after the commit above Plasma NM should not cause any freeze in the desktop related to DBus, maybe there are other situations that needs improve. By what I could figure from the other bug entry about desktop freezing (https://bugs.kde.org/show_bug.cgi?id=287002) the freeze happens when Plasma NM tried to use DBus to get wifi connection info, which the commit above reworks to make it completely asynchronous.
Comment 13 Sergio 2012-01-26 14:42:01 UTC
Yes, kubuntu has 0.9.0RC4, so it is now clear why I am still experiencing the issue. Could not find anything newer in the ppas, though...
Comment 14 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 286424

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 15 Myriam Schweingruber 2012-06-02 10:01:06 UTC
I assume this is fixed now.