|
From: Lucas B. <bra...@re...> - 2004-08-02 13:45:11
|
Hi Folks:
I'm developing an small autentication server (siri-server)
which I've started using valgrind. Until last friday, before I leave
office to weekend, everything was working fine: I've found some
memory leaks and some illegal memory reads and writes.
But, without changing a line of code, when I came back
froma fancy weekend, valgrind (or siri-server)
is eating up memory causing kernel's VM killing siri-server with "Out of
Memory".
How strange!! I'm using valgrind version 2.0.0.
Let's dive into details: first I run siri-server without valgrind,
everything is ok:
[root@dirc60 siri-server]# ./sbin/siri-server
Mon Aug 2 10:01:05 2004 siri-server version 0.2 starting...
Mon Aug 2 10:01:05 2004 Using default configuration
[lucas@dirc60 lucas]$ ps awux | egrep "siri-server|USER" | grep -v grep
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 6816 0.0 0.6 5036 1676 pts/1 S 10:01 0:00
./sbin/siri-server
Pressing control+c:
Mon Aug 2 10:03:52 2004 Signal: Interrupt
Mon Aug 2 10:03:52 2004 Exiting gracefully...
[root@dirc60 siri-server]#
Now, runnning with valgrind:
[root@dirc60 siri-server]# valgrind -v --logfile=siri ./sbin/siri-server
Mon Aug 2 10:04:45 2004 siri-server version 0.2 starting...
Mon Aug 2 10:04:46 2004 Using default configuration
Killed
siri-server daemon is killed after a long time, and a lot of
harddisk access (probably swap):
[root@dirc60 siri-server]# free -m
total used free shared buffers cached
Mem: 249 30 218 0 1 10
-/+ buffers/cache: 18 230
Swap: 509 64 445
[root@dirc60 siri-server]# tail -1 /var/log/messages
Aug 2 10:05:30 dirc60 kernel: Out of Memory: Killed process 6830
(siri-server).
Looking at the end of siri.pid6830 file:
...
==6830== REPLACING libc(__GI___errno_location) with
libpthread(__errno_location)
==6830== REPLACING libc(__GI___h_errno_location) with
libpthread(__h_errno_location)
==6830== REPLACING libc(__GI___res_state) with libpthread(__res_state)
==6830==
==6830== TRANSLATE: 0x403D8D60 redirected to 0x4033DDC8
==6830== Reading syms from
/usr/local/siri-server/lib/siri-server/libmodauth_dummy.so.0.0.0
==6830== Reading syms from
/usr/local/siri-server/lib/siri-server/libmodfw_xml.so.0.0.0
==6830== Reading syms from
/usr/local/siri-server/lib/siri-server/libmoddb_gdbm.so.0.0.0
==6830== Warning: set address range perms: large range 538088280, a 0, v 0
Any help? tip? recommendation or is there some alien inside
my Linux Box? :)
My Linux Box: RedHat 9, GLIBC 2.3.2.
Thanks a lot in advance.
--
[]'s
Lucas Brasilino
bra...@re...
http://www.recife.pe.gov.br
Emprel - Empresa Municipal de Informatica (pt_BR)
Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-34167078
|
|
From: Nicholas N. <nj...@ca...> - 2004-08-06 13:10:18
|
On Mon, 2 Aug 2004, Lucas Brasilino wrote: > I'm developing an small autentication server (siri-server) > which I've started using valgrind. Until last friday, before I leave > office to weekend, everything was working fine: I've found some > memory leaks and some illegal memory reads and writes. > But, without changing a line of code, when I came back > froma fancy weekend, valgrind (or siri-server) > is eating up memory causing kernel's VM killing siri-server with "Out of > Memory". > How strange!! I'm using valgrind version 2.0.0. Valgrind has a small memory leak in its libpthread.so implementation. I think it might leak 200 bytes per call to pthread_key_create(), but I'm not certain of the details. Does your program call this function often? N |
|
From: Tom H. <th...@cy...> - 2004-08-06 13:31:20
|
In message <Pin...@he...>
Nicholas Nethercote <nj...@ca...> wrote:
> Valgrind has a small memory leak in its libpthread.so implementation.
> I think it might leak 200 bytes per call to pthread_key_create(), but
> I'm not certain of the details. Does your program call this function
> often?
It only leaks one lot of 200 bytes for the whole program actually. As
those 200 bytes belong to the main thread they could only be freed at
program exit anyway, so it isn't a major problem.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Lucas B. <bra...@re...> - 2004-08-11 11:54:55
|
Hi > Valgrind has a small memory leak in its libpthread.so implementation. I > think it might leak 200 bytes per call to pthread_key_create(), but I'm > not certain of the details. Does your program call this function often? > No :) Thanks a lot -- []'s Lucas Brasilino bra...@re... http://www.recife.pe.gov.br Emprel - Empresa Municipal de Informatica (pt_BR) Municipal Computing Enterprise (en_US) Recife - Pernambuco - Brasil Fone: +55-81-34167078 |