Bug 79512 - KFind w/ include subfolders checked causes crash
Summary: KFind w/ include subfolders checked causes crash
Status: RESOLVED FIXED
Alias: None
Product: kfind
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: RedHat Enterprise Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Eric Coquelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-12 22:49 UTC by Jason Salaz
Modified: 2005-01-25 18:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Salaz 2004-04-12 22:49:46 UTC
Version:           2.0 (using KDE KDE 3.2.1)
Installed from:    RedHat RPMs
Compiler:          cc (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1) 
OS:          Linux

Under Fedora Core 1, after upgrade to KDE 3.2.1 from 3.1.4, KFind crashes when any size directories are searched with 'Include subfolders' checked.  Any others can be checked, without 'Include subfolders' being checked, and it will work fine.  It locks tighter than a drum every time with 'Include subfolders' checked.

No backtrace was available.
Comment 1 Jason Salaz 2004-04-12 23:21:09 UTC
Also.. just as a sidenote.  It's not happening anymore out of any other directories.  However, searching in just / will cause the issue.

For example searching fro styles.glade in /home/userid/ works.
But searching for the same entry inder / with the include subfolders optionc checked causes kfind to hang.
Comment 2 Aaron Johnson 2004-04-13 16:41:40 UTC
Kfind also freezes for me when 'Include subfolders' is checked. This can include any directory, not just /. I am using a hard drive install of Knoppix Debian with the Debian copy of KDE 3.2.1.
Comment 3 Aaron Johnson 2004-04-19 21:24:17 UTC
I guess this is a duplicate of http://bugs.kde.org/show_bug.cgi?id=77846.
Comment 4 Ben Smith 2004-06-30 19:05:22 UTC
This may not be a duplicate of bug 77846.  It sounds like that bug indicates the UI freezes temporarily, and comes back when done.  This bug sounds like kfind freezes and never comes back.

'strace kfind' shows that kfind locks up on the same subdir every time.  But if you do something like 'mkdir AAAA', then kfind will lock up on a different directory, the one before the last one.  And if you 'rmdir AAAA', kfind will go back to locking up on the previous dir.  

Other than that, I can't figure out what exactly triggers this.
Comment 5 Ben Smith 2004-06-30 19:09:30 UTC
This is more probably a duplicate of bug 77854.
Comment 6 Luigi 2004-08-15 09:45:35 UTC
I've got the same problem, but for some reason, doing "include subfolders" in my home directory doesn't trigger this problem. It may be that my home folder isn't big enough, but on all other large folders, it crashes. Here's the backtrace for mine:

(no debugging symbols found)...Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[Thread debugging using libthread_db enabled]
[New Thread -150685856 (LWP 5417)]
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...0x00bc7402 in ?? ()
#0  0x00bc7402 in ?? ()
#1  0x00a5de83 in __waitpid_nocancel () from /lib/tls/libpthread.so.0
#2  0x069a6380 in KCrash::defaultCrashHandler () from /usr/lib/libkdecore.so.4
#3  <signal handler called>
#4  0x06ff4fc6 in KFileTreeBranch::addItems () from /usr/lib/libkio.so.4
#5  0x06ff6109 in KFileTreeBranch::qt_invoke () from /usr/lib/libkio.so.4
#6  0x0641e3dc in QObject::activate_signal ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#7  0x06f1eacd in KDirLister::newItems () from /usr/lib/libkio.so.4
#8  0x06f1db3e in KDirLister::emitItems () from /usr/lib/libkio.so.4
#9  0x06f1917b in KDirListerCache::slotEntries () from /usr/lib/libkio.so.4
#10 0x06f1f7e0 in KDirListerCache::qt_invoke () from /usr/lib/libkio.so.4
#11 0x0641e3dc in QObject::activate_signal ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#12 0x06e82d54 in KIO::ListJob::entries () from /usr/lib/libkio.so.4
#13 0x06e73452 in KIO::ListJob::slotListEntries () from /usr/lib/libkio.so.4
#14 0x06e83019 in KIO::ListJob::qt_invoke () from /usr/lib/libkio.so.4
#15 0x0641e3dc in QObject::activate_signal ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#16 0x06e60f6d in KIO::SlaveInterface::listEntries ()
   from /usr/lib/libkio.so.4
#17 0x06e5fb3b in KIO::SlaveInterface::dispatch () from /usr/lib/libkio.so.4
#18 0x06e5efd9 in KIO::SlaveInterface::dispatch () from /usr/lib/libkio.so.4
#19 0x06e5c9fb in KIO::Slave::gotInput () from /usr/lib/libkio.so.4
#20 0x06e5e728 in KIO::Slave::qt_invoke () from /usr/lib/libkio.so.4
#21 0x0641e3dc in QObject::activate_signal ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#22 0x0641e53d in QObject::activate_signal ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#23 0x0675b1c2 in QSocketNotifier::activated ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#24 0x0643aa70 in QSocketNotifier::event ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#25 0x063c212f in QApplication::internalNotify ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#26 0x063c172e in QApplication::notify ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#27 0x06920d09 in KApplication::notify () from /usr/lib/libkdecore.so.4
#28 0x063b1c5a in QEventLoop::activateSocketNotifiers ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#29 0x0636ca93 in QEventLoop::processEvents ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#30 0x063d4328 in QEventLoop::enterLoop ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#31 0x063c23e1 in QApplication::enter_loop ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#32 0x065a6de0 in QDialog::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#33 0x06ff9007 in KDirSelectDialog::selectDirectory ()
   from /usr/lib/libkio.so.4
#34 0x06f980c6 in KFileDialog::getExistingDirectory ()
   from /usr/lib/libkio.so.4
#35 0xfef54220 in ?? ()
#36 0x00000001 in ?? ()
#37 0x08dde1c0 in ?? ()
#38 0x08075bc8 in ?? ()
#39 0xfef54210 in ?? ()
#40 0xfef541e8 in ?? ()
#41 0x066f2c0f in QString::stripWhiteSpace ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#42 0xfef54210 in ?? ()
#43 0xfef541b8 in ?? ()
#44 0x064b4dcb in QComboBox::count () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#45 0x00a59f20 in pthread_mutex_unlock () from /lib/tls/libpthread.so.0
#46 0x06a7164c in ?? () from /usr/lib/libkdecore.so.4
#47 0xfef54290 in ?? ()
#48 0xffffff97 in ?? ()
#49 0xfef54258 in ?? ()
#50 0x0000001d in ?? ()
#51 0xfef5428c in ?? ()
#52 0xfef542a0 in ?? ()
#53 0x00f54280 in ?? ()
#54 0x080745e0 in ?? ()
#55 0x08dde1c0 in ?? ()
#56 0x00000032 in ?? ()
#57 0xfef54278 in ?? ()
#58 0x08069d2a in KfindTabWidget::staticMetaObject ()

Hope its helpful.
Comment 7 Aaron Johnson 2004-08-19 21:30:31 UTC
I believe this bug report is a duplicate of #77846. It looks like more and more people are running into this problem. I hope someone looks into this soon. The problem is still evident in KDE 3.3.
Comment 8 Aaron Johnson 2004-08-19 21:38:45 UTC
Sorry, I already posted to this bug. I believe that all the bugs posted are related. Bug 77846 is for the UI freezing and never coming back on large folders, especially when include subfolders is checked. Therefore these bugs are related.
Comment 9 Aaron Johnson 2004-10-25 22:54:03 UTC
Make sure that famd from the fam package is not running. Kfind worked with include subfolders after killing famd and removing the package fam.
Comment 10 david powell 2005-01-13 21:40:21 UTC
get same here , kfind frezes on searching if include sub directories

suse9.2 (worked before update to kde 3.3.2)
Comment 11 david powell 2005-01-18 23:57:03 UTC
update 
got kfind working again although by a workaround

if fam is enabled (file access monitoring) (disabled by default in suse)
then kfind will produce this error 

disable fam and it works ok
(in control center, system , run level editor)
kde3.3.91, suse9.2 

Comment 12 Waldo Bastian 2005-01-25 18:48:07 UTC
CVS commit by waba: 

Disable recursively watching for updates
BUG: 68220
BUG: 77854
BUG: 77846
BUG: 79512
BUG: 85802


  M +13 -0     kfinddlg.cpp   1.25


--- kdebase/kfind/kfinddlg.cpp  #1.24:1.25
@@ -127,4 +127,16 @@ void KfindDlg::startSearch()
   dirwatch->addDir(query->url().path(),true);
 
+#if 0
+  // waba: Watching for updates is disabled for now because even with FAM it causes too
+  // much problems. See BR68220, BR77854, BR77846, BR79512 and BR85802
+  // There are 3 problems:
+  // 1) addDir() keeps looping on recursive symlinks
+  // 2) addDir() scans all subdirectories, so it basically does the same as the process that
+  // is started by KQuery but in-process, undoing the advantages of using a seperate find process
+  // A solution could be to let KQuery emit all the directories it has searched in.
+  // Either way, putting dirwatchers on a whole file system is probably just too much.
+  // 3) FAM has a tendency to deadlock with so many files (See BR77854) This has hopefully
+  // been fixed in KDirWatch, but that has not yet been confirmed.
+
   //Getting a list of all subdirs
   if(tabWidget->isSearchRecursive() && (dirwatch->internalMethod() == KDirWatch::FAM))
@@ -134,4 +146,5 @@ void KfindDlg::startSearch()
       dirwatch->addDir(*it,true);
   }
+#endif
 
   win->beginSearch(query->url());