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

List:       kde-devel
Subject:    Re: Endless modprobe calls logged in KDE 3.4
From:       David Faure <faure () kde ! org>
Date:       2005-02-08 11:13:36
Message-ID: 200502081213.37188.faure () kde ! org
[Download RAW message or body]

On Monday 31 January 2005 18:19, Kévin Ottens wrote:
> > On startup kded loads all modules from newInstance(), and for some reason
> > the LinuxCDPolling thread of the mediamanager module takes a VERY long time
> > before the main thread can return from newInstance. I mean VERY. KDE
> > startup is blocked for about 10 minutes here (on the laptop).
> 
> That's weird it's immediate here... Looks like a deadlock or something 
> similar?

Possibly. What I found out is that this patch/hack seems to solve the problem.

--- mediamanager.cpp    29 Dec 2004 18:37:53 -0000      1.11
+++ mediamanager.cpp    7 Feb 2005 21:34:16 -0000
@@ -19,6 +19,7 @@
 #include "mediamanager.h"

 #include <config.h>
+#include <qtimer.h>

 #include <kdebug.h>
 #include <kglobal.h>
@@ -49,7 +50,7 @@ MediaManager::MediaManager(const QCStrin
                 SLOT(slotMediumChanged(const QString&, const QString&)) );

        m_backends.setAutoDelete(true);
-       loadBackends();
+       QTimer::singleShot( 10, this, SLOT( loadBackends() ) );
 }

 void MediaManager::loadBackends()

Hmm. What's strange is that in my recent tests mediamanager isn't loaded on startup
anymore, only when I go to media:/ in konq; but it used to be loaded at startup, I guess
due to kdesktop... although, well, I have disabled device icons there, so I don't know
why it used to load mediamanager on startup. OK - I hope this doesn't matter and
that the above is a real fix.

> I'd be interested to know if you're the only one experiencing this kind of 
> deadlock.
Me too :)

> > I think this polling thread is also why the "harddisk" led of the laptop
> > lightens up twice per second - which btw is said to reduce the harddisk's
> > life....
> 
> I doubt it... except if something is logged because of the polling, in this 
> case I'd say the setup of the underlying system should be incriminated.

I don't have any logging problem here - my fault for highjacking an existing thread :/

But I would like to confirm my suspicion:
if I "dcop kded kded unloadModule mediamanager" then the blinking stops!
So it's for sure due to LinuxCDPolling.
This problem is of course unrelated to the one on top of this mail (the long startup delay).

> > Kevin: do we really need this cd-polling thread? :/
> 
> I'd say yes, since it allows to autodetect the media type inserted in the CD 
> drive which is really a neat feature IMHO. 
Personally I can live with HAL being required for such neat features, if the without-HAL
solution means a nasty polling. But I understand that almost nobody has HAL available yet...

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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