Summary: | HEAVY memory leak in kio_nfs | ||
---|---|---|---|
Product: | [Unmaintained] kio | Reporter: | Jens <jens-bugs.kde.org> |
Component: | nfs | Assignee: | Alexander Neundorf <neundorf> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Jens
2003-07-10 15:54:41 UTC
You can't attach valgrind to a running process. try gdb and see if you can find out where it's misbehaving. Otherwise you have to run the slave in valgrind from the start - much more difficult/annoying. I recommend the gdb approach. cannot reproduce any more with 3.2.0-final. closing my bug. I observe what i -as far as i can see- is described here in kde-3.5.9 . Both the nfs server and the client machine are linux machines. I use zeroconf:/ as url & avahi (0.6.23) to initiate the nfs:/ kernel: 2.6.24.4 gcc: 4.2.3 During the 'memory-eating' activity there is not network activity that i can observe. When all memory is exhausted, konqueror pops up with the messagebox: the process for the nfs://dr108.local protocol died unexpectedly. After that, the machine resumes work as normal. I had an strace running in another konsole, the output of that looks very much like what is described here. I'll see if i can build a non-stripped kdebase, and see if i can find out what is going on here. Localtime here is 01:17 now, so it's a bit late to do that now ;-) Ok, rebuild of kdebase is done; i'm now running a non-stripped kde base. The problem as mentioned before is still present & the same. Not each & every nfs-export directory does trigger the behaviour, but those that do, do so very reproducible. I can 'attach' a gdb to a kio_nfs pid, and trace the behaviour. So far, i've got the follwing: (now going to see if that makes any sense ;-) ---------------8<----------------- 849 if ( d->deref() ) { (gdb) 570 for (entry *dirEntry=listres.readdirres_u.reply.entries;dirEntry!=0;dirEntry=dirEntry->nextentry) (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 849 if ( d->deref() ) { (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 850 if ( d != shared_null ) (gdb) 851 d->deleteSelf(); (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 850 if ( d != shared_null ) (gdb) 851 d->deleteSelf(); (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 573 filesToList.append(dirEntry->name); (gdb) 565 void detach() { if ( sh->count > 1 ) detachInternal(); } (gdb) 107 QValueListIterator( NodePtr p ) : node( p ) {} (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) 107 QValueListIterator( NodePtr p ) : node( p ) {} (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 570 for (entry *dirEntry=listres.readdirres_u.reply.entries;dirEntry!=0;dirEntry=dirEntry->nextentry) (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 849 if ( d->deref() ) { (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 850 if ( d != shared_null ) (gdb) 851 d->deleteSelf(); (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 850 if ( d != shared_null ) (gdb) 851 d->deleteSelf(); (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 573 filesToList.append(dirEntry->name); (gdb) 565 void detach() { if ( sh->count > 1 ) detachInternal(); } (gdb) 107 QValueListIterator( NodePtr p ) : node( p ) {} (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) 107 QValueListIterator( NodePtr p ) : node( p ) {} (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 570 for (entry *dirEntry=listres.readdirres_u.reply.entries;dirEntry!=0;dirEntry=dirEntry->nextentry) (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 849 if ( d->deref() ) { (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 850 if ( d != shared_null ) (gdb) 851 d->deleteSelf(); (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 850 if ( d != shared_null ) (gdb) 851 d->deleteSelf(); (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 573 filesToList.append(dirEntry->name); (gdb) 565 void detach() { if ( sh->count > 1 ) detachInternal(); } (gdb) 107 QValueListIterator( NodePtr p ) : node( p ) {} (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) 107 QValueListIterator( NodePtr p ) : node( p ) {} (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 570 for (entry *dirEntry=listres.readdirres_u.reply.entries;dirEntry!=0;dirEntry=dirEntry->nextentry) (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 849 if ( d->deref() ) { (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 850 if ( d != shared_null ) (gdb) 851 d->deleteSelf(); (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 850 if ( d != shared_null ) (gdb) 851 d->deleteSelf(); (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 573 filesToList.append(dirEntry->name); (gdb) 565 void detach() { if ( sh->count > 1 ) detachInternal(); } (gdb) 107 QValueListIterator( NodePtr p ) : node( p ) {} (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) 107 QValueListIterator( NodePtr p ) : node( p ) {} (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 570 for (entry *dirEntry=listres.readdirres_u.reply.entries;dirEntry!=0;dirEntry=dirEntry->nextentry) (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 849 if ( d->deref() ) { (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 850 if ( d != shared_null ) (gdb) 851 d->deleteSelf(); (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 53 bool deref() { return !--count; } (gdb) 849 if ( d->deref() ) { (gdb) 850 if ( d != shared_null ) (gdb) 851 d->deleteSelf(); (gdb) 572 if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name)) (gdb) 573 filesToList.append(dirEntry->name); (gdb) 565 void detach() { if ( sh->count > 1 ) detachInternal(); } (gdb) 107 QValueListIterator( NodePtr p ) : node( p ) {} (gdb) 529 iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } (gdb) Mandriva 2008.1 (kde-3.5.9) also has the same problem, with the same target (nfs-exported) directory ;-) It has the appearance that is not be an 'artefact' of my build of kde ;-) It could still be the result of the way i 'export' the nfs-dir though. I think i've got a test-pattern now: It seems related to the number of files in a directory: I made an empty test-directory as a subdir of one of these exported nfs-dirs. With a for i in `seq 1 200`; do touch $i; done i made 200 bogus files in the directory. That browses ok with konqueror. If -however- i increase the number of files to 210, konqueror 'hangs' when i attempt to browse the subdir, and 'top' shows a kio_nfs process that goes 'berserk' w.r.t. memory usage. Would this be a good point to 'call in the troops'? I've opened a new bug-report (Bug 166379), with the result of my further experiments/debugging results, including a fix that seems to work. |