[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Need suggestion on how to fix the common crash in plasma-desktop (kdelibs related)
From:       "Lamarque V. Souza" <lamarque () kde ! org>
Date:       2012-03-21 12:20:15
Message-ID: 201203210920.15238.lamarque () kde ! org
[Download RAW message or body]

Em Wednesday 21 March 2012, Aaron J. Seigo escreveu:
> On Tuesday, March 20, 2012 22:31:57 Lamarque V. Souza wrote:
> > 	There is a crash in WeatherEngine (kde-workspace) triggered by the fact
> > 
> > that Plasma::DataEngineManager::self() (kdelib) is invalid when
> > plasma-{desktop,device} are exiting. WeatherEngine::~WeatherEngine()
> > calls WeatherEngine::unloadIons(), which tries to use the invalid
> > Plasma::DataEngineManager::self(). The crash only happens if there is
> 
> this happens only when the application uncleanly exits. if you notice in
> the bug reports you linked to there was a problem elsewhere (e.g. an
> xioerror, an uncaught exception, etc.) and that caused an abort of the
> process with an unclean exit which then triggers this problem. the cause
> of the crash was never the WeatherEngine itself, but rather a crash in
> WeatherEngine was triggered while the application was otherwise closing
> down due to an error elsewhere that was itself bringing down the
> application.

	a simple killall plasma-device suffices to make WeatherEngine hit the 
invalid Plasma::DataEngineManager::self(). I know that there is kquitapp, 
which I have just checked and it avoids the crash, but not everybody uses it.
 
> DataEngines created by DataEngineManager *must* be released prior to
> application exit. and normally this happens except in such cases where the
> application is brought down by an abnormal situation.

	I do not consider a TERM signal an abnormal situation. Could we add a 
signal handler to plasma-{desktop,device} to re-route the TERM signal to the 
code kquitapp triggers in plasma-{desktop,device}?
 
> so while you can make the changes David suggests, it will only change the
> backtraces in those bug reports but not actually solve anything in the real
> world. the aborts will still happen as a result of the underlying error.

	The crash does not happen if WeatherEngine's dtor is changed to do not 
use Plasma::DataEngineManager::self().

-- 
Lamarque V. Souza
KDE's Network Management maintainer
http://planetkde.org/pt-br

[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Tahoma'; font-size:12pt; font-weight:400; \
font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Em \
Wednesday 21 March 2012, Aaron J. Seigo escreveu:</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; On Tuesday, March 20, 2012 22:31:57 Lamarque \
V. Souza wrote:</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; \
There is a crash in WeatherEngine (kde-workspace) triggered by the fact</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; that \
Plasma::DataEngineManager::self() (kdelib) is invalid when</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; \
plasma-{desktop,device} are exiting. WeatherEngine::~WeatherEngine()</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; calls \
WeatherEngine::unloadIons(), which tries to use the invalid</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; \
Plasma::DataEngineManager::self(). The crash only happens if there is</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; this happens only when \
the application uncleanly exits. if you notice in</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; the bug reports you linked to there was a \
problem elsewhere (e.g. an</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; xioerror, an uncaught exception, etc.) and that caused an \
abort of the</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; \
process with an unclean exit which then triggers this problem. the cause</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; of the crash was never \
the WeatherEngine itself, but rather a crash in</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; WeatherEngine was triggered while the \
application was otherwise closing</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; down due to an error elsewhere that was itself bringing down \
the</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; \
application.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">	a simple killall plasma-device suffices to make WeatherEngine hit \
the invalid Plasma::DataEngineManager::self(). I know that there is kquitapp, which I \
have just checked and it avoids the crash, but not everybody uses it.</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; DataEngines created by \
DataEngineManager *must* be released prior to</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; application exit. and normally this happens \
except in such cases where the</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; application is brought down by an abnormal situation.</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">	I do not consider a TERM \
signal an abnormal situation. Could we add a signal handler to \
plasma-{desktop,device} to re-route the TERM signal to the code kquitapp triggers in \
plasma-{desktop,device}?</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"> </p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; so while you can make the changes David suggests, it will \
only change the</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; \
backtraces in those bug reports but not actually solve anything in the real</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; world. the aborts will \
still happen as a result of the underlying error.</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">	The crash does not happen if \
WeatherEngine's dtor is changed to do not use Plasma::DataEngineManager::self().</p> \
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> \
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Lamarque V. Souza</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">KDE's Network Management \
maintainer</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">http://planetkde.org/pt-br</p></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic