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

List:       kde-devel
Subject:    KIO::listDir() freezes in multi-threaded KioFuse due to timer
From:       Vlad Codrea <vladc6 () yahoo ! com>
Date:       2007-10-14 3:14:18
Message-ID: 590530.37523.qm () web54406 ! mail ! yahoo ! com
[Download RAW message or body]

Hi,

KioFuse freezes and gives the following warning when Fuse is allowed
to create a separate thread for every filesystem operation. The first
readdir() attempt succeeds, but the freeze and warning appear
consistently on the second readdir() attempt:

QObject::startTimer: timers cannot be started from another thread

The warning is given off immediately after calling m_listJob =
KIO::listDir(url, false, true) in jobhelpers.cpp line 33. The freeze
is not immediate because the constructor method that the statement is
in exits normally, as verified by debug statements. However,
m_listJob's result() signal is never emitted.

To reproduce the freeze and warning, the following commands can be
typed:

1) svn checkout
svn://anonsvn.kde.org/home/kde/trunk/playground/libs/kiofuse
2) cd kiofuse
3) cmake .
4) make
5) mkdir /tmp/sample-dir; touch /tmp/sample-dir/sample-file
6) mkdir /tmp/mountpoint
7) ./kiofuse --URL /tmp/sample-dir --mountpoint /tmp/mountpoint

In another terminal, type:

8) ls /tmp/mountpoint  # First time it should be ok
9) ls /tmp/mountpoint  # Second time it will freeze and display the
warning in the kiofuse terminal

While googling I've found a similar problem reported earlier that is
related to QDBus timers:
http://www.nabble.com/Re:-ThreadWeaver-and-asyncronous-operations-t3478708.html

If I only knew what object creates the timer, I could try
moveToThread() on it. But I don't understand how any object created by
a previous readdir() thread can survive, since they are all deleted in
the destructors.

Any help would be greatly appreciated,

Vlad


       
____________________________________________________________________________________
Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! \
Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545469
 
> > 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