Bug 120943 - kscd eats lots of memory
Summary: kscd eats lots of memory
Status: RESOLVED WORKSFORME
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: KDE (show other bugs)
Version: RC 4
Hardware: x86-64 All
: P5 - None : Major
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-07 07:46 UTC by Olaf Kirch
Modified: 2006-05-07 11:35 UTC (History)
0 users

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
strace (I left it running for a while) (541.11 KB, text/plain)
2005-10-07 07:48 UTC, Olaf Kirch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olaf Kirch 2005-10-07 07:46:09 UTC
After starting kscd, I noticed that my system got a little sluggish  
every now and then (even with no CD in the drive).  
  
I watched the system with top and noticed that kcsd's resident memory  
size would sometimes jump to almost 1GB of memory. It seems it mmaps 
a 1G region and walks all over it, then releases it. 
 
I'm attaching an strace of kscd demonstrating the problem.
Comment 1 Olaf Kirch 2005-10-07 07:48:37 UTC
Created attachment 51749 [details]
strace (I left it running for a while)

The relevant bit are the frequent mmap/munmap calls:

mmap(NULL, 1023414272, PROT_READ|PROT_WRITE,
		MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
...
munmap(0x2aaaafa00000, 1023414272)

I hope the KDE folks can tell me why it's doing this.
Comment 2 Stephan Kulow 2005-10-07 08:14:13 UTC
hmm, there is no mmap call in the kscd code from what grep tells me. Am I free 
to blame glibc here? :) 
Comment 3 Lubos Lunak 2005-10-07 09:12:24 UTC
Probably not. The mmap() may come from malloc(). 
 
Comment 4 Dirk Mueller 2005-10-07 09:27:57 UTC
its most likely a malloc because its an anon mmap. anyway, this is probably  
x86_64 specific, and I don't have such a computer available for testing.   
  
Olaf, please set ulimit -v 300000, install debuginfo packages, wait till kscd  
crashes and attach the backtrace please.   
  
<insert standard rambling about missing ulimits on a default suse 
installation> 
Comment 5 Stephan Kulow 2006-05-07 11:35:06 UTC
we were unable to reproduce