Bug 189592 - plasma for the screensaver reports a crash (Signal 11) on screen saver exit
Summary: plasma for the screensaver reports a crash (Signal 11) on screen saver exit
Status: RESOLVED DOWNSTREAM
Alias: None
Product: plasma4
Classification: Plasma
Component: screensaver overlay (show other bugs)
Version: unspecified
Platform: Mandriva RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 193129 193368 196529 198636 202267 219493 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-14 08:05 UTC by Ernest N. Wilcox Jr.
Modified: 2010-03-22 00:46 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Crash report (5.10 KB, application/octet-stream)
2009-04-24 21:44 UTC, Aaron Zinman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ernest N. Wilcox Jr. 2009-04-14 08:05:40 UTC
Version:            (using KDE 4.2.2)
OS:                Linux
Installed from:    Mandriva RPMs

I added two widgets to the KDE Screen saver. Since then plasma for the screen saver reports a crash (Signal 11) on screen saver exit. The KDE Crash handler back trace follows:

Application: Plasma for the Screensaver (plasma-overlay), signal SIGSEGV
0x00007fa4736186d1 in nanosleep () from /lib64/libc.so.6
[Current thread is 1 (Thread 0x7fa476579740 (LWP 1363))]

Thread 2 (Thread 0x41b00950 (LWP 1371)):
#0  0x00007fa47364d762 in select () from /lib64/libc.so.6
#1  0x00007fa4748eaab6 in QProcessManager::run (this=0x2209380) at io/qprocess_unix.cpp:305
#2  0x00007fa474823362 in QThreadPrivate::start (arg=0x2209380) at thread/qthread_unix.cpp:189
#3  0x00007fa4701672a3 in start_thread () from /lib64/libpthread.so.0
#4  0x00007fa473654f0d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fa476579740 (LWP 1363)):
[KCrash Handler]
#5  0x00007fa474c4257b in QDBusAdaptorConnector::relaySlot (this=0x295e060, argv=0x7fff7e6c0930) at qdbusabstractadaptor.cpp:268
#6  0x00007fa474c42db5 in QDBusAdaptorConnector::qt_metacall (this=0x295e060, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff7e6c0930) at qdbusabstractadaptor.cpp:364
#7  0x00007fa474921de2 in QMetaObject::activate (sender=0x295e520, from_signal_index=<value optimized out>, to_signal_index=1, argv=0x7fff7e6c0930) at kernel/qobject.cpp:3060
#8  0x00007fa474922284 in QObject::destroyed (this=0x295e060, _t1=0x295e520) at .moc/release-shared/moc_qobject.cpp:143
#9  0x00007fa47492307e in ~QObject (this=0x295e520) at kernel/qobject.cpp:769
#10 0x00007fa473252567 in KIO::Scheduler::~Scheduler () from /usr/lib64/libkio.so.5
#11 0x00007fa4732568ab in ?? () from /usr/lib64/libkio.so.5
#12 0x00007fa4735ac83d in exit () from /lib64/libc.so.6
#13 0x00007fa47359631d in __libc_start_main () from /lib64/libc.so.6
#14 0x0000000000416a79 in _start ()

HTH,
Comment 1 Aaron Zinman 2009-04-24 21:44:25 UTC
Created attachment 33067 [details]
Crash report
Comment 2 Aaron Zinman 2009-04-24 21:44:53 UTC
I also experience this.  I have 2 widgets added to the screensaver, and when I return after a long break (say at least an hour), I often have it crash plasma, and if it doesn't crash, plasma is using like 80% cpu and lots of ram.  This time around, plasma crashed and restarted, but Xorg was using 1.5G/2.0G ram.  I almost always have to log out and log back in.
Comment 3 msaner 2009-05-20 17:33:24 UTC
I am having this issue as well under Debian Squeeze. I have 4 widgits on my on my screensaver. Leave a note, World Clock, Digital Clock, and Weather are the widgets I have installed. I noticed the issue after I tried to update fglrx and it didn't work so I switched to the ati driver just to get X to run again. I can't even edit the screen saver widgets now.
Comment 4 Dario Andres 2009-05-20 17:57:34 UTC
*** Bug 193129 has been marked as a duplicate of this bug. ***
Comment 5 Dario Andres 2009-05-20 17:58:11 UTC
*** Bug 193368 has been marked as a duplicate of this bug. ***
Comment 6 chris 2009-05-20 18:25:23 UTC
ME, I have 6 plasmoids running in the screensaver and each times I leave it, I get a crash. The bug tracking system gives this output :

Application: Plasma pour l'écran de veille (plasma-overlay), signal: Segmentation fault
[KCrash Handler]
#6  0xb725e996 in QDBusAdaptorConnector::relaySlot (this=0x86dd750, argv=0xbfa490fc) at qdbusabstractadaptor.cpp:268
#7  0xb725f32c in QDBusAdaptorConnector::qt_metacall (this=0x86dd750, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfa490fc) at qdbusabstractadaptor.cpp:364
#8  0xb713fd68 in QMetaObject::activate (sender=0x86e3948, from_signal_index=0, to_signal_index=1, argv=0xbfa490fc) at kernel/qobject.cpp:3120
#9  0xb71401a0 in QMetaObject::activate (sender=0x86e3948, m=0x8082e98, from_local_signal_index=0, to_local_signal_index=1, argv=0xbfa490fc) at kernel/qobject.cpp:3214
#10 0xb714022b in QObject::destroyed (this=0x86e3948, _t1=0x86e3948) at .moc/release-shared/moc_qobject.cpp:143
#11 0xb7140f79 in ~QObject (this=0x86e3948) at kernel/qobject.cpp:769
#12 0xb7cc1f0d in KIO::Scheduler::~Scheduler () from /usr/lib/libkio.so.5
#13 0xb7cc5251 in ?? () from /usr/lib/libkio.so.5
#14 0xb7bf9cfb in ?? () from /usr/lib/libkio.so.5
#15 0xb63958f1 in exit () from /lib/libc.so.6
#16 0xb637e5fd in __libc_start_main () from /lib/libc.so.6
#17 0x0805b6d1 in _start ()
Comment 7 Kay Hayen 2009-05-22 21:27:19 UTC
Hello,

I am also in Debian Squeeze, and have plasma crash after each screensaver exit, using widgets on the screensaver. This is withough exception. 

Also: I always had plasma crash on logout from the desktop, where it also restarts. I was thinking this has nothing to do with plasma exits, but nobody else has mentioned this in this bug report, so it might be unrelated.

I didn't find any means to disable DrKonqui or how to provide --nocrashhandler to plama. Any advice on this would be appreciated.
Comment 8 Aaron J. Seigo 2009-05-30 04:31:51 UTC
hm.. in both cases it's coming from KIO:

KIO::Scheduler::~Scheduler

on app exit. perhaps something is unwinding too late on app exit.

has anyone with this problem tried out 4.3beta1 to see if it remains in 4.3 for them?
Comment 9 Kay Hayen 2009-06-13 11:23:39 UTC
(In reply to comment #8)
> hm.. in both cases it's coming from KIO:
> 
> KIO::Scheduler::~Scheduler
> 
> on app exit. perhaps something is unwinding too late on app exit.

I have tried to reduce the config until it doesn't show the bug. It didn't help that there is no way to store the desired configuration, so practically I had to discard what I had to hunt the bug. I feel not too inclined to ever repeat it.

Especially ugly is that after removing a widget that is causing the crash at exit then doing the exit from the config dialog, the crash still occurs. Likely Plasma doesn't remove the widgets code for real, but only from view.

In my case, the crash could be tracked to Yamp applet, that I have installed due to the complete misfunction that the "LCD" weather applet is. I have removed in from the screensaver now, so at least those crashes are gone now. I can't really remove it from the panel or else my wife will refuse to use KDE anymore. And that screensaver widget was the one thing she appreciated about the recent migration. :/

That said, Plasma is likely only guilty in that it lets bugs of widgets affect its exit. I will check if I can somehow plug the exit code for powerdown to kill Plasma the hard way, but it seems that Powerdevil doesn't run script code, but does register run time rules.

So any workaround to a Plasma that crashes at the supposedly unattended shutdown? 
 
> has anyone with this problem tried out 4.3beta1 to see if it remains in 4.3 for
> them?

Not yet. But see above, the cause is likely just Plasma allowing Widgets to run not sandboxed.

Yours,
Kay
Comment 10 Aaron J. Seigo 2009-06-13 18:26:10 UTC
"that I have installed due to the complete misfunction that the "LCD" weather applet is."

since 4.2 we've shipped a weather applet that does the 5-day-forecast thing, etc. i'd suggest using that.

"Likely Plasma doesn't remove the widgets code for real, but only from view."

it removes the widget, but if the widget has, say, a global static registered with kdelibs to be destroyed at app exit, then kdelibs takes care of that, not plasma. this is simply how compiled languages work.

"That said, Plasma is likely only guilty in that it lets bugs of widgets affect
its exit." 

you're asking for the equivalent of magic flying unicorns here.

"I will check if I can somehow plug the exit code for powerdown to
kill Plasma the hard way, but it seems that Powerdevil doesn't run script code,
but does register run time rules."

this will only cause you more problems. uncleanly exiting an app is a great way to screw things up.

"But see above, the cause is likely just Plasma allowing Widgets to run
not sandboxed."

as soon as the widgets touch c++, all "sandboxing" is off.

aaaaanyways .. this still doesn't bring final resolution to this report: we now know it's specific to certain widgets, but we don't know for sure if this "any widget which uses kio" or just "certain broken widgets using kio in an odd way".

an easy way to test this would be to add another widget that uses kio in the background to the screensaver (twitter, web browser, weather, remember the milk, etc) and see if they trigger the same problem.

also, can the other reporters in this bug confirm if they are using a third party weather widget such as YAWP?
Comment 11 Kay Hayen 2009-06-13 20:53:42 UTC
Hello Aaron,

(In reply to comment #10)

> "that I have installed due to the complete misfunction that the "LCD" weather
> applet is."
> 
> since 4.2 we've shipped a weather applet that does the 5-day-forecast thing,
> etc. i'd suggest using that.

With that there is only "BBC UK" which leaves many things to desire. They have that cities nearby, but not this place. Plus is has no wind information, critical for me as a cyclist. 

The good thing about the ones from kdelook.org is that they understand local weather forecasts and reports that go down to the zip code level. 

I recall from your blog that Plasma was enabling people to only write data sources. Does the official applet use that? If so, we need a volunteer to rip CWP data parsing out and put it into KDE and maintain it there. 
 
> "Likely Plasma doesn't remove the widgets code for real, but only from view."
> 
> it removes the widget, but if the widget has, say, a global static registered
> with kdelibs to be destroyed at app exit, then kdelibs takes care of that, not
> plasma. this is simply how compiled languages work.

Well, uhm, I am nobody to question the Plasma design, so I won't (much). Actually I deeply admire your abilities there. I just somehow feel that plasma widgets could be processes and the problem would look much easier to debug. Much like Konqueror and plugins or what Google has done with Chrome. I always use separate processes where possible.

I am probably guilty of downloading and using "crap" from kdelook.org, but then again, what's the point of widgets, if they are able to kill plasma at any given point of time. On the other hand, I can likely imagine you not being amused at having Plasma design questioned just because of bugs.

> "That said, Plasma is likely only guilty in that it lets bugs of widgets affect
> its exit." 
> 
> you're asking for the equivalent of magic flying unicorns here.

The "only" tried to imply that I am well aware that this is likely a not very high form of guilt, if at all. But as it is, a stable Plasma may only be had with stable Widgets from KDE.

> "I will check if I can somehow plug the exit code for powerdown to
> kill Plasma the hard way, but it seems that Powerdevil doesn't run script code,
> but does register run time rules."
> 
> this will only cause you more problems. uncleanly exiting an app is a great way
> to screw things up.

It's not like I had plasma exiting cleanly much often on this machine. 

Right now, with screensaver running or not, I like to press that ACPI power button and (not really) see the machine shuting down. I successfully reconfigured Powerdevil to not ask any questions about me really wanting that _behind_ the screensaver, so consider me a poweruser if you want. ;-) Plasma then after quite some time shows a DrKonqi dialog with the confirm button disabled, forcing use of mouse to confirm, after which it restarts, and then is killed. I would just kill the drkonqi remains.

> "But see above, the cause is likely just Plasma allowing Widgets to run
> not sandboxed."
> 
> as soon as the widgets touch c++, all "sandboxing" is off.

That's a valid choice. Could you imagine a container that runs a widget as a separate process? 

> aaaaanyways .. this still doesn't bring final resolution to this report: we now
> know it's specific to certain widgets, but we don't know for sure if this "any
> widget which uses kio" or just "certain broken widgets using kio in an odd
> way".
> 
> an easy way to test this would be to add another widget that uses kio in the
> background to the screensaver (twitter, web browser, weather, remember the
> milk, etc) and see if they trigger the same problem.

I tried both weather and web browser and they didn't give me the issue. Lets see if the others have the same, then it's safe to say that it's not a Plasma bug at all. 

Just some possible weakness in that KDE might want to enhance for the Plasma or its replacement one day. SCNR. :-)

Yours,
Kay
Comment 12 Aaron J. Seigo 2009-06-13 21:16:36 UTC
"Plus is has no wind information, critical for me as a cyclist. "

wind info is in the top area, centered. in 4.4 i think the plan is to put all the "right now" information in a tab like the 5 day or details instead of scattered around the main interface as it currently is.

"Does the official applet use that?"

yes

"If so, we need a volunteer to rip CWP data parsing out and put it into KDE and maintain it there." 

unfortunately such screen scraping represents a copyright violation for most (maybe all, een) of those sites and violates many (most?) of their terms of services as posted on their websites.

find legal sources of data and we can happily include them.

"I just somehow feel that plasma widgets could be processes and the problem would look much easier to debug."

which is incorrect, as it just causes a ton of other problems.

"Could you imagine a container that runs a widget as a separate process?"

no.

"I tried both weather and web browser and they didn't give me the issue."

thanks for testing.
Comment 13 Kay Hayen 2009-06-14 11:53:35 UTC
Hello Aaron,

(In reply to comment #12)

> wind info is in the top area, centered. 

Yes, it is. But the source gives "N/A", so I am out of luck there. 

[others have it]

> find legal sources of data and we can happily include them.

Ouch, absolutely true. I checked for weather.com right now. But still, having the data sources separate is something that might be of value by itself.
 
> "I tried both weather and web browser and they didn't give me the issue."
> 
> thanks for testing.

Bad/good news Aaron. 

First the story telling part: I shutdown later the day. And no Plasma crash occurred, despite running the weather applet. Today, I was coming to the computer (which my wife had booted), and disabled the screensaver. And to my surprise, it was giving me the crash. Worse, I saw a box saying that "ksmserver could not be startet, check your installation message". I only ever had that when the desktop doesn't come up at all. Clicking "OK" logged me out, without Plasma crash, likely because it was done with hard kill by that prompting process. On restart I had Konqueror double its session (I allow it to automatically restore), something it did for some time, but had stopped. I guess, my session has 2 Konquerors now. From the past I know, that it's possible to multiply even further.

Second the debugging part: Then I checked my screensaver settings, clicking "setup" and it has weather and browser running. I stopped it and had no crash. I did it again, and I had a crash dialog. Now I get it again, depending on how fast I close the setup. 

Any ongoing IO in the browser with (in my case) dot.kde.org seems to trigger it, any site that requires many requests will do I bet. 

I think what I did in the previous debugging was to let the screensaver settle down and do its thing before closing. That only proved that Yamp had some long running KIO jobs all the time I fear. When I am less patient with the other widgets, I get the crash. 

I think now it should be easily reproducible with any kind of complex website and browser widget. And it definitely is a Plasma bug.

Yours,
Kay
Comment 14 Kay Hayen 2009-06-14 11:58:41 UTC
Hello Aaron,

I have to recall that comments:

> Any ongoing IO in the browser with (in my case) dot.kde.org seems to trigger
> it, any site that requires many requests will do I bet. 
> 
> I think what I did in the previous debugging was to let the screensaver settle
> down and do its thing before closing. That only proved that Yamp had some long
> running KIO jobs all the time I fear. When I am less patient with the other
> widgets, I get the crash. 
> 
> I think now it should be easily reproducible with any kind of complex website
> and browser widget. And it definitely is a Plasma bug.

No, not at all. When I just decided to clean up, I discovered a very small instance of Yamp, however way it got there, it spoiled the testing. With only browser, I can never ever reproduce the crash.

Sorry about time waisted. So, well back to "not a Plasma bug for me".

Yours,
Kay
Comment 15 Aaron J. Seigo 2009-06-14 20:33:16 UTC
"Ouch, absolutely true. I checked for weather.com right now. But still, having
the data sources separate is something that might be of value by itself."

they are already plugins; if a new plugin is provided, it automatically shows up in the weather dataengine using components such as the weather widgets, the weather wallpaper ...


anyways, i'm marking this as a downstream issue for now; if they other reporter can confirm/deny kay's efforts, that'd be great too :)
Comment 16 Aaron J. Seigo 2009-06-14 22:01:45 UTC
*** Bug 196529 has been marked as a duplicate of this bug. ***
Comment 17 Aaron Zinman 2009-06-15 07:05:55 UTC
Hello, human KDE user here.  While I do happen to be a developer (not of KDE), for the sake of this bug report, I am not one.  That is to say, I'm a user of KDE to get things done.

I have two rants here, first is on plasmoids & bugs:

Having a plasmoid be able to crash or take down my system is unacceptable.  Almost all plasmoids, widgets, or anything of the like that pollutes {kde,gnome}-looks.org are version 0.0.0.1a.  They almost never get updated, probably have lots of bugs, and are generally of low quality.  Such is life, and the technology (KDE/plasmoids) that hosts such poor code needs to be able to deal with it.  In Firefox, a javascript that unresponsive can be killed by the triggered pop up dialog.  Chrome uses process isolation & more to prevent web pages from taking down your browser/system.  I, the KDE user, should never be able to return from my screensaver because of a widget bug... ESPECIALLY one that comes bundled with KDE.  If that requires removing plasmoids from the screensaver, so be it.  As you can tell, I'm more advancing for some containment technology/virtual machine to prevent such problems in the first place.  Aren't most written in Javascript+HTML (a la Dashboard) anyway?  Even a simple monitoring of CPU/memory & threshold-based auto-kill would do the trick.

LCD Weather rant:

It is unfortunate that LCD Weather happens to have bugs, because IMHO, it is one of 2 decent looking widgets/plasmoids/screenlets in Linux, period.  I've tried many, both in Gnome & KDE, and it is very well designed (aesthetically).  The Linux eco-system has such poor aesthetics in general, please do not ruin one of the only pieces of nice design out there.  

If it needs to be re-written, and the process using HTML+Javascript isn't difficult to learn (I don't have any experience with plasmoid development), I'd be happy to take on this project rather than see it fall by the waste-side, reusing the existing SVG-based components from LCD Weather.  Yahoo has nice weather APIs, so it shouldn't be too bad to use them.

Aaron Zinman
Comment 18 Aaron J. Seigo 2009-06-15 09:19:46 UTC
> Chrome uses process isolation

as soon as we put each widget in its own tab so it doesn't interact with anything else, i'll do this. :P

> Aren't most written in Javascript+HTML (a la Dashboard) anyway?

no they aren't, and we're trying to move in that direction for the obvious reasons that you noted.
Comment 19 Ernest N. Wilcox Jr. 2009-06-15 11:17:00 UTC
If this helps, I removed the CWP Weather Widget from my Screen Saver and the error dialogs stopped. I added the yaWP weather widget and still no error dialog when the Screen Saver exits. I also tested both the Weather Forecast and the LCD Weather Report widgets and they worked (producing no error when the Screen Saver exited). I did have difficulty with their configuration dialogs. It took repeated attempts to get the dialogs content to display so I could run the city search function. When the dialog content did not display, I got a blank white box on my screen where the dialog should have been. On several of my attempts, when the content appeared to load correctly, the city search function froze the dialog. The only way I found to exit the dialog in either situation was to press the ESC key, then try again.

HTH,
Comment 20 Aaron J. Seigo 2009-06-16 00:54:55 UTC
@Ernest: yes, that is helpful and supports the finding (that it's something in some third party plasmoids doing un-good things); the other bugs sound like issues in the new plasmaweather lib which have been fixed for 4.3.0
Comment 21 Yves 2009-07-02 12:21:35 UTC
*** Bug 198636 has been marked as a duplicate of this bug. ***
Comment 22 Kay Hayen 2009-08-10 19:52:06 UTC
Just for the record. I have not uninstalled the CMP widget (and lived with the crashing Plasma at exit) and upgraded to 4.3 immediately after release, using Debian Unstable packages on my otherwise Debian Testing system.

The crash is gone now. I have not changed CWP. Suspect of mine now is that it was indeed a bug of either kdelibs or plasma which has been fixed.

Which is very good, because the weather widget of 4.3 is either not yet in Debian, or it doesn't work at all for me. I suspect the former. But obviously I am happy to report that the bug appears to be not one of CWP. I invite you to appoint another method of declaring it resolved, DOWNSTREAM appears inappropiate now. 

Yours,
Kay
Comment 23 Dario Andres 2010-03-21 23:43:27 UTC
*** Bug 219493 has been marked as a duplicate of this bug. ***
Comment 24 Dario Andres 2010-03-22 00:46:11 UTC
*** Bug 202267 has been marked as a duplicate of this bug. ***