Bug 62999 - opening lan:/ with "many" (>500) hosts in the LAN -> memory hole
Summary: opening lan:/ with "many" (>500) hosts in the LAN -> memory hole
Status: RESOLVED WORKSFORME
Alias: None
Product: lanbrowsing
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Neundorf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-20 11:10 UTC by Jens
Modified: 2005-01-11 13:25 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 Jens 2003-08-20 11:10:11 UTC
Version:            (using KDE 3.1.9)
Compiler:          gcc version 3.3.1 20030626 (Debian prerelease)
OS:          Linux (i686) release 2.2.20

Hi,

when I do 'telnet localhost 7741' (-> connect to lisa) I get a list of 530 hosts (this is a university). when I open "lan:/" in Konqueror's sidebar (the "Network Browser" icon, one of the "konqueror --preload" tasks starts eating memory like wild. On my 128MB machine, this causes the machine to start swapping wildly and not respond for about 10 seconds.

When it is finished, the task suddenly consumes about 60-100MB (!!) of RAM. Just for the share list. I think this is too much. :-)

When I close the Konqueror window, this memory is freed, however. (not when I collapse the "LAN browser" tree, however)

So I think kio_lan needs to optimize memory useage. :)


Thank you!
Comment 1 Alexander Neundorf 2003-08-20 22:32:39 UTC
Subject: Re:  New: opening lan:/ with "many" (>500) hosts in the LAN -> memory hole

On Wednesday 20 August 2003 11:10, you wrote:
...
> When it is finished, the task suddenly consumes about 60-100MB (!!) of RAM.
> Just for the share list. I think this is too much. :-)
>
> When I close the Konqueror window, this memory is freed, however. (not when
> I collapse the "LAN browser" tree, however)
>
> So I think kio_lan needs to optimize memory useage. :)

Can you please check which process eats the memory ?
Konqy or the kioslave ?

Bye
Alex
Comment 2 Jens 2003-08-21 12:40:08 UTC
Subject: Re:  opening lan:/ with "many" (>500) hosts in the LAN -> memory hole

On Wed, Aug 20, 2003 at 08:32:41PM -0000, Alexander Neundorf wrote:
 
> Can you please check which process eats the memory ?  Konqy or the
> kioslave ?

The process is called "konqueror --preload".
 

Comment 3 Alexander Neundorf 2003-08-21 21:16:54 UTC
Subject: Re:  opening lan:/ with "many" (>500) hosts in the LAN -> memory hole

On Thursday 21 August 2003 12:40, you wrote:
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=62999
>
>
>
>
> ------- Additional Comments From bugs.kde.org@jensbenecke.de  2003-08-21
> 12:40 ------- Subject: Re:  opening lan:/ with "many" (>500) hosts in the
> LAN -> memory hole
>
> On Wed, Aug 20, 2003 at 08:32:41PM -0000, Alexander Neundorf wrote:
> > Can you please check which process eats the memory ?  Konqy or the
> > kioslave ?
>
> The process is called "konqueror --preload".

Hmm, then konqy eats the memory, not the lan-ioslave...
Very strange.
I forwarded it to kfm-devel, let's see.

Bye
Alex
Comment 4 Jens 2003-08-22 10:42:29 UTC
Subject: Re:  opening lan:/ with "many" (>500) hosts in the LAN -> memory hole

On Thu, Aug 21, 2003 at 07:16:56PM -0000, Alexander Neundorf wrote:

> Hmm, then konqy eats the memory, not the lan-ioslave...  Very strange.
> I forwarded it to kfm-devel, let's see.

Here's a valgrind output if that helps. However, this doesn't show the
actual konq process eating the RAM (it uses one of the preloaded
processes). I don't know how to attach valgrind to a running process,
but I do have an strace of a running konqueror eating about 60MB of RAM
because of opening lan:/. It's about 1.2MB however.. I can also send you
a stripped version (without thousands of read() / write() calls) if you
want.

---------------------------------------------------------------------------
benecke@get1418:~$ valgrind --trace-children=yes --demangle=yes -v --leak-check=yes kfmclient openURL lan:/
==8793== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux.
==8793== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward.
==8793== Using valgrind-20030716, a program supervision framework for x86-linux.
==8793== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward.
==8793== Startup, with flags:
==8793==    --suppressions=/usr/lib/valgrind/default.supp
==8793==    --trace-children=yes
==8793==    --demangle=yes
==8793==    -v
==8793==    --leak-check=yes
==8793== Reading syms from /usr/bin/kfmclient
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /lib/ld-2.3.1.so
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/valgrind/vgskin_memcheck.so
==8793== Reading syms from /usr/lib/valgrind/valgrind.so
==8793== Reading syms from /usr/lib/libkdeinit_kfmclient.so
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libkio.so.4.2.0
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libkdeui.so.4.2.0
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libkdesu.so.4.2.0
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libkdecore.so.4.2.0
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libDCOP.so.4.2.0
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /lib/libdl-2.3.1.so
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /lib/libresolv-2.3.1.so
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libart_lgpl_2.so.2.3.13
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libkdefx.so.4.2.0
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libqt-mt.so.3.1.1
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libpng12.so.0.1.2.5
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/X11R6/lib/libXext.so.6.4
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/X11R6/lib/libX11.so.6.2
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/X11R6/lib/libSM.so.6.0
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/X11R6/lib/libICE.so.6.3
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/valgrind/libpthread.so
==8793== Reading syms from /usr/X11R6/lib/libXrender.so.1.2.2
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /lib/libutil-2.3.1.so
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libz.so.1.1.4
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libfam.so.0.0.0
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libstdc++.so.5.0.5
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /lib/libm-2.3.1.so
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /lib/libgcc_s.so.1
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /lib/libc-2.3.1.so
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libfontconfig.so.1.0.4
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libaudio.so.2.3
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/X11R6/lib/libXt.so.6.0
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/X11R6/lib/libGL.so.1.2
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/X11R6/lib/libXmu.so.6.2
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/X11R6/lib/libXft.so.2.1.1
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libfreetype.so.6.3.3
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading syms from /usr/lib/libexpat.so.1.0.0
==8793==    object doesn't have a symbol table
==8793==    object doesn't have any debug info
==8793== Reading suppressions file: /usr/lib/valgrind/default.supp
==8793== Estimated CPU clock rate is 702 MHz
==8793== REPLACING libc(__errno_location) with libpthread(__errno_location)
==8793== REPLACING libc(__h_errno_location) with libpthread(__h_errno_location)
==8793== REPLACING libc(__res_state) with libpthread(__res_state)
==8793==
==8793== Source and destination overlap in memcpy(0xbfffe010, 0xbfffe010, 32)
==8793==    at 0x40022806: memcpy (mc_replace_strmem.c:67)
==8793==    by 0x4119EB92: realpath (in /lib/libc-2.3.1.so)
==8793==    by 0x40819F00: KStandardDirs::realPath(QString const&) (in /usr/lib/libkdecore.so.4.2.0)
==8793==    by 0x4081BDF6: KStandardDirs::saveLocation(char const*, QString const&, bool) const (in /usr/lib/libkdecore.so.4.2.0)
==8793==
==8793== Source and destination overlap in memcpy(0xbfffdd60, 0xbfffdd60, 32)
==8793==    at 0x40022806: memcpy (mc_replace_strmem.c:67)
==8793==    by 0x4119EB92: realpath (in /lib/libc-2.3.1.so)
==8793==    by 0x40819F00: KStandardDirs::realPath(QString const&) (in /usr/lib/libkdecore.so.4.2.0)
==8793==    by 0x4081A8BC: KStandardDirs::resourceDirs(char const*) const (in /usr/lib/libkdecore.so.4.2.0)
==8793==
==8793== Source and destination overlap in memcpy(0xbfffdf60, 0xbfffdf60, 10)
==8793==    at 0x40022806: memcpy (mc_replace_strmem.c:67)
==8793==    by 0x4119EB92: realpath (in /lib/libc-2.3.1.so)
==8793==    by 0x40819F00: KStandardDirs::realPath(QString const&) (in /usr/lib/libkdecore.so.4.2.0)
==8793==    by 0x4081AB12: KStandardDirs::resourceDirs(char const*) const (in /usr/lib/libkdecore.so.4.2.0)
==8793==
==8793== ERROR SUMMARY: 6 errors from 3 contexts (suppressed: 32 from 2)
==8793==
==8793== 1 errors in context 1 of 3:
==8793== Source and destination overlap in memcpy(0xbfffdf60, 0xbfffdf60, 10)
==8793==    at 0x40022806: memcpy (mc_replace_strmem.c:67)
==8793==    by 0x4119EB92: realpath (in /lib/libc-2.3.1.so)
==8793==    by 0x40819F00: KStandardDirs::realPath(QString const&) (in /usr/lib/libkdecore.so.4.2.0)
==8793==    by 0x4081AB12: KStandardDirs::resourceDirs(char const*) const (in /usr/lib/libkdecore.so.4.2.0)
==8793==
==8793== 1 errors in context 2 of 3:
S@8793== Source and destination overlap in
Comment 5 Jens 2004-11-02 14:38:58 UTC
Hi,

this bug hasn't been updated for a year. I don't have access to a machine with the LAN ioslave installed right now, can anybody still confirm this?

Thanks!
Comment 6 Jens 2005-01-11 13:25:09 UTC
Hi,

I cannot reproduce this with 3.3.2. This might be because we only have about 300 machines in the current LAN (in contrast to 530 before)... but I doubt that.

Closing, for the time being (at least until I can reproduce).