artsd hanging with SCHED_FIFO
Matthias Kretz
kretz at kde.org
Fri Sep 19 20:09:21 BST 2003
Hi,
recently Stefan added the possibility to show DrKonqi if artsd crashes. And
yesterday I thought, oh well I've never seen it yet...
So I typed "killall -11 artsd" and my computer was gone - total lockup. I
rebooted and thanks to reiserfs lost some .kde/share/config files once again.
Recently I had lockups when shutting down KDE. I have the feeling that this
is related.
Here's my analysis and a patch that's definetly not ready for prime time:
If artsd is idle the killall will work without problems, but if I have music
playing (ogg or mp3) artsd will hang my system. So it seems that the other
artsd threads are causing the problems. The main thread goes into the
sighandler and drops SCHED_FIFO while the other threads are still SCHED_FIFO.
If the other threads take full CPU for some reason: lockup.
With the patch I attached I cannot reproduce the problem anymore. It's calling
pthread_kill_other_threads_np() in the sighandler - but the man page says
that's Linux specific.
You also might notice that I moved the SCHED_FIFO dropping code. I tried that
because CPUUsage works using SIGALRM and the sighandler was being changed
before dropping SCHED_FIFO - but it didn't have the desired effect of fixing
the problem.
A few questions:
- Are there other ways to get rid of child threads?
- Can I drop SCHED_FIFO on the child threads?
- Will the crashhandler be called for the child threads, too?
- Is the sighandler for SIGALRM inherited by the child threads. I.e. do the
child threads call CPUUsage::check()?
not directly related:
- If I create two child threads in an aRts module and make 'em both use as
much CPU as possible, CPUUsage will not detect the problem, right?
/me has the feeling we need an artswatchdog process...
--
C'ya
Matthias
________________________________________________________
Matthias Kretz (Germany)
http://Vir.homeip.net/
MatthiasKretz at gmx.net, kretz at kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: artscrashhandler.patch
Type: text/x-diff
Size: 1591 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20030919/58c23078/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20030919/58c23078/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-multimedia
More information about the kde-multimedia
mailing list