Need suggestion on how to fix the common crash in plasma-desktop (kdelibs related)

Lamarque V. Souza lamarque at kde.org
Thu Mar 22 11:24:57 GMT 2012


Em Wednesday 21 March 2012, Lamarque V. Souza escreveu:
> 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}?

	Just to make it clear. Signal TERM (kill -15, 15 is the default signal 
for the kill command) means "please, save your data and close yourself". It 
does not mean "abruptly killing the process", that is signal KILL. What I am 
asking for here is to support the Unix way of gently terminating a process and 
only that (support only signal TERM, not all other signals). The name "kill" 
for the command to send signals to process is misleading, not all signals mean 
something wrong happened. Signal SIGUSR1 for instance is commonly used to tell 
the process to re-read its configuration. Today we have dbus to send messages 
to processes, which I guess is what kquitapp uses, but not all programs 
support dbus, so I do not see why not support this Unix way of sending 
messages to a process.
 
> > 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120322/732c69bd/attachment.htm>


More information about the kde-core-devel mailing list