Memory leak on 3.21.{9,10} on RHEL5

This is the place for developers to discuss bugs, new features and everything else about code changes.

Memory leak on 3.21.{9,10} on RHEL5

Postby nixar » Mon Mar 23, 2009 2:53 pm

I am experiencing some rather significant memory leakage on RHEL5. I'm using the Fedora 10 SRPM, recompiled on RHEL5. As far as I can tell there is no patch to the code.

How should I go about debugging this? What info can I provide you?

Note that the daemon is getting quite a lot of messages through localhost UDP.

Code: Select all
# ldd /sbin/rsyslogd
   libz.so.1 => /usr/lib64/libz.so.1 (0x0000003d60e00000)
   libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003d60600000)
   libdl.so.2 => /lib64/libdl.so.2 (0x0000003d5fa00000)
   librt.so.1 => /lib64/librt.so.1 (0x0000003d61600000)
   libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003d61e00000)
   libc.so.6 => /lib64/libc.so.6 (0x0000003d5f600000)
   /lib64/ld-linux-x86-64.so.2 (0x0000003d5f200000)


Code: Select all
# pmap -x $(pgrep rsyslogd)
1005:   rsyslogd -c 3
Address           Kbytes     RSS    Anon  Locked Mode   Mapping
0000000000400000     244       -       -       - r-x--  rsyslogd
000000000063d000      16       -       -       - rw---  rsyslogd
0000000000641000       4       -       -       - rw---    [ anon ]
00000000092e1000   31184       -       -       - rw---    [ anon ]
0000000041d5c000       4       -       -       - -----    [ anon ]
0000000041d5d000   10240       -       -       - rw---    [ anon ]
000000004275d000       4       -       -       - -----    [ anon ]
000000004275e000   10240       -       -       - rw---    [ anon ]
000000004315e000       4       -       -       - -----    [ anon ]
000000004315f000   10240       -       -       - rw---    [ anon ]
0000000043b5f000       4       -       -       - -----    [ anon ]
0000000043b60000   10240       -       -       - rw---    [ anon ]
0000000044560000       4       -       -       - -----    [ anon ]
0000000044561000   10240       -       -       - rw---    [ anon ]
0000003a81800000     236       -       -       - r-x--  libsepol.so.1
0000003a8183b000    2048       -       -       - -----  libsepol.so.1
0000003a81a3b000       4       -       -       - rw---  libsepol.so.1
0000003a81a3c000      40       -       -       - rw---    [ anon ]
0000003a82000000      84       -       -       - r-x--  libselinux.so.1
0000003a82015000    2048       -       -       - -----  libselinux.so.1
0000003a82215000       8       -       -       - rw---  libselinux.so.1
0000003a82217000       4       -       -       - rw---    [ anon ]
0000003a82800000      68       -       -       - r-x--  libresolv-2.5.so
0000003a82811000    2048       -       -       - -----  libresolv-2.5.so
0000003a82a11000       4       -       -       - r----  libresolv-2.5.so
0000003a82a12000       4       -       -       - rw---  libresolv-2.5.so
0000003a82a13000       8       -       -       - rw---    [ anon ]
0000003d5f200000     112       -       -       - r-x--  ld-2.5.so
0000003d5f41b000       4       -       -       - r----  ld-2.5.so
0000003d5f41c000       4       -       -       - rw---  ld-2.5.so
0000003d5f600000    1328       -       -       - r-x--  libc-2.5.so
0000003d5f74c000    2048       -       -       - -----  libc-2.5.so
0000003d5f94c000      16       -       -       - r----  libc-2.5.so
0000003d5f950000       4       -       -       - rw---  libc-2.5.so
0000003d5f951000      20       -       -       - rw---    [ anon ]
0000003d5fa00000       8       -       -       - r-x--  libdl-2.5.so
0000003d5fa02000    2048       -       -       - -----  libdl-2.5.so
0000003d5fc02000       4       -       -       - r----  libdl-2.5.so
0000003d5fc03000       4       -       -       - rw---  libdl-2.5.so
0000003d60600000      88       -       -       - r-x--  libpthread-2.5.so
0000003d60616000    2044       -       -       - -----  libpthread-2.5.so
0000003d60815000       4       -       -       - r----  libpthread-2.5.so
0000003d60816000       4       -       -       - rw---  libpthread-2.5.so
0000003d60817000      16       -       -       - rw---    [ anon ]
0000003d60e00000      80       -       -       - r-x--  libz.so.1.2.3
0000003d60e14000    2044       -       -       - -----  libz.so.1.2.3
0000003d61013000       4       -       -       - rw---  libz.so.1.2.3
0000003d61600000      28       -       -       - r-x--  librt-2.5.so
0000003d61607000    2048       -       -       - -----  librt-2.5.so
0000003d61807000       4       -       -       - r----  librt-2.5.so
0000003d61808000       4       -       -       - rw---  librt-2.5.so
0000003d61e00000      52       -       -       - r-x--  libgcc_s-4.1.2-20080825.so.1
0000003d61e0d000    2048       -       -       - -----  libgcc_s-4.1.2-20080825.so.1
0000003d6200d000       4       -       -       - rw---  libgcc_s-4.1.2-20080825.so.1
0000003d62200000       8       -       -       - r-x--  libcom_err.so.2.1
0000003d62202000    2044       -       -       - -----  libcom_err.so.2.1
0000003d62401000       4       -       -       - rw---  libcom_err.so.2.1
0000003d64200000       8       -       -       - r-x--  libkeyutils-1.2.so
0000003d64202000    2044       -       -       - -----  libkeyutils-1.2.so
0000003d64401000       4       -       -       - rw---  libkeyutils-1.2.so
00002aaaaaaab000      16       -       -       - r-x--  lmnsd_ptcp.so
00002aaaaaaaf000    2044       -       -       - -----  lmnsd_ptcp.so
00002aaaaacae000       4       -       -       - rw---  lmnsd_ptcp.so
00002aaaac000000   22336       -       -       - rw---    [ anon ]
00002aaaad5d0000   43200       -       -       - -----    [ anon ]
00002aaab0000000   19812       -       -       - rw---    [ anon ]
00002aaab1359000   45724       -       -       - -----    [ anon ]
00002aaab4000000   22268       -       -       - rw---    [ anon ]
00002aaab55bf000   43268       -       -       - -----    [ anon ]
00002b0b7b5c5000       8       -       -       - rw---    [ anon ]
00002b0b7b5d1000      16       -       -       - rw---    [ anon ]
00002b0b7b5d5000      20       -       -       - r-x--  lmnet.so
00002b0b7b5da000    2044       -       -       - -----  lmnet.so
00002b0b7b7d9000       4       -       -       - rw---  lmnet.so
00002b0b7b7e5000      40       -       -       - r-x--  libnss_files-2.5.so
00002b0b7b7ef000    2044       -       -       - -----  libnss_files-2.5.so
00002b0b7b9ee000       4       -       -       - r----  libnss_files-2.5.so
00002b0b7b9ef000       4       -       -       - rw---  libnss_files-2.5.so
00002b0b7b9f0000    2876       -       -       - r-x--  libnss_ldap-2.5.so
00002b0b7bcbf000    2044       -       -       - -----  libnss_ldap-2.5.so
00002b0b7bebe000     164       -       -       - rw---  libnss_ldap-2.5.so
00002b0b7bee7000      64       -       -       - rw---    [ anon ]
00002b0b7bef7000       8       -       -       - r-x--  imuxsock.so
00002b0b7bef9000    2048       -       -       - -----  imuxsock.so
00002b0b7c0f9000       4       -       -       - rw---  imuxsock.so
00002b0b7c0fa000      20       -       -       - r-x--  imklog.so
00002b0b7c0ff000    2048       -       -       - -----  imklog.so
00002b0b7c2ff000       4       -       -       - rw---  imklog.so
00002b0b7c300000       4       -       -       - rw---    [ anon ]
00002b0b7c301000      12       -       -       - r-x--  lmnetstrms.so
00002b0b7c304000    2044       -       -       - -----  lmnetstrms.so
00002b0b7c503000       4       -       -       - rw---  lmnetstrms.so
00002b0b7c504000       8       -       -       - r-x--  lmtcpclt.so
00002b0b7c506000    2044       -       -       - -----  lmtcpclt.so
00002b0b7c705000       4       -       -       - rw---  lmtcpclt.so
00007fff2f4d0000      84       -       -       - rw---    [ stack ]
ffffffffff600000    8192       -       -       - -----    [ anon ]
----------------  ------  ------  ------  ------
total kB          331988       -       -       -


Here's the rsyslog.conf:

Code: Select all
# -/- PUPPET -/- do not edit this file
# Source: rsyslog.conf.erb

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console

$DirCreateMode 0750
$DirGroup sysadmin
$DirOwner root

$FileCreateMode 0640
$FileGroup sysadmin
$FileOwner root


#### MODULES ####

$ModLoad imuxsock.so   # provides support for local system logging (e.g. via logger command)
$ModLoad imklog.so   # provides kernel logging support (previously done by rklogd)
#$ModLoad immark.so   # provides --MARK-- message capability
$ModLoad omrelp



#### GLOBAL DIRECTIVES ####

# Use default timestamp format
#$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
#note: disabled, to use RFC 3339 instead

# enable high precision timestamps
$ActionForwardDefaultTemplate RSYSLOG_ForwardFormat

# File syncing capability is disabled by default. This feature is usually not required,
# not useful and an extreme performance hit
#$ActionFileEnableSync on

# snmpd is very verbose. Keep it local.
:programname,isequal,"snmpd"   /var/log/snmpd
& ~
# "&" at the beginning of the line means reusing the previous rule
# "~" as an action mean dropping the log line; it will not be dispatched
# by futher rules.

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!

*.info;mail.none;authpriv.none;cron.none                /var/log/messages

# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure

# Log all the mail messages in one place.
mail.*                                                  -/var/log/maillog

# Daemon related messages
daemon.*                  /var/log/daemon

# Cluster related messages
local4.*                  /var/log/cluster

# Log cron stuff
cron.*                                                  /var/log/cron

# Everybody gets emergency messages
*.emerg                                                 *

# Save news errors of level crit and higher in a special file.
uucp,news.crit                                          /var/log/spooler

# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log

# ### begin forwarding rule ###
# The statement between the begin ... end define a SINGLE forwarding
# rule. They belong together, do NOT split them. If you create multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
$WorkDirectory /var/log/spool # where to place spool files

$ActionQueueFileName fwdRule1 # unique name prefix for spool files
$ActionQueueMaxDiskSpace 1g   # 1gb space limit (use as much as possible)
$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
$ActionQueueType LinkedList   # run asynchronously
$ActionResumeRetryCount -1    # infinite retries if host is down
*.* @@(o,z9)10.0.0.1:514

$ActionQueueFileName fwdRule2 # unique name prefix for spool files
$ActionQueueMaxDiskSpace 1g   # 1gb space limit (use as much as possible)
$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
$ActionQueueType LinkedList   # run asynchronously
$ActionResumeRetryCount -1    # infinite retries if host is down
*.* @@(o,z9)10.0.0.2:514
nixar
Avarage
 
Posts: 12
Joined: Mon Feb 23, 2009 5:07 pm

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

Re: Memory leak on 3.21.{9,10} on RHEL5

Postby nixar » Mon Mar 23, 2009 3:16 pm

I just removed (o,z9) from the forwarding rule, and there doesn't seem to be significant leakage so far. Let's see what happens next ...
nixar
Avarage
 
Posts: 12
Joined: Mon Feb 23, 2009 5:07 pm

Re: Memory leak on 3.21.{9,10} on RHEL5

Postby rgerhards » Mon Mar 23, 2009 3:18 pm

I am swamped with other work at the moment, but will look asap. (o,z9) is a good tip, valgrind should tell me rather quickly if there is a leak releated to it. Please post your findings :)

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 2647
Joined: Thu Feb 13, 2003 11:57 am

Re: Memory leak on 3.21.{9,10} on RHEL5

Postby nixar » Mon Mar 23, 2009 3:26 pm

Thanks for the quick reply. Is there an howto somewhere on how to run rsyslog under valgrind? I know the tool but I've never used it myself. BTW I'll try to get my employer to buy a support contract, but my boss is underwhelmed so far.
nixar
Avarage
 
Posts: 12
Joined: Mon Feb 23, 2009 5:07 pm

Re: Memory leak on 3.21.{9,10} on RHEL5

Postby rgerhards » Mon Mar 23, 2009 3:30 pm

;)

valgrind is extremely simple to use. Just install it and run

valgrind /usr/bin/rsyslogd -n -c3 ... (other options)

It'll spit out any violations it sees. You need to terminate rsyslogd via kill `/var/run/rsyslogd.pid`and then valgrind spits out where non-freed memory was allocated.

To work nicely, however, rsyslog needs to be compiled with the --enable-valgrind configure options - otherwise you'll see lots of question marks instead of code locations inside the logs.

Valgrind is an absolutely phantasic memory debugger, I highly recommend it.

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 2647
Joined: Thu Feb 13, 2003 11:57 am

Ok I've isolated the pb further: it's local UDP + remote log

Postby nixar » Mon Mar 23, 2009 3:49 pm

Nothing to do with (o,z9), the bug is triggered when receiving local messages via UDP and forwarding them (in this case, via TCP)

on one hand I'm running this:
Code: Select all
$ ( while : ; do echo "Test msg udp $RANDOM" ; done ) | nc -u 127.0.0.1 514


in another terminal:
Code: Select all
$ top -b | grep rsyslog
(snip)
1818 root      20   0  232m 1436 1004 S  0.0  0.0   0:00.00 rsyslogd                   
1818 root      20   0  232m 1436 1004 S  0.0  0.0   0:00.00 rsyslogd                   
1818 root      20   0  273m 7532 1120 S 52.5  0.2   0:01.59 rsyslogd                   
1818 root      20   0  337m  15m 1120 S 137.1  0.4   0:05.72 rsyslogd                 
1818 root      20   0  337m  16m 1120 S 105.6  0.4   0:08.90 rsyslogd                 
1818 root      20   0  337m  17m 1120 S 125.2  0.4   0:12.67 rsyslogd                 
1818 root      20   0  338m  17m 1120 S 69.1  0.5   0:14.75 rsyslogd


This does not happen with

This is on F10 running rsyslog-3.21.10-1.fc10.x86_64

I will try running it under valgrind now.
nixar
Avarage
 
Posts: 12
Joined: Mon Feb 23, 2009 5:07 pm

valgrind output

Postby nixar » Mon Mar 23, 2009 4:10 pm

Here's the valgrind output with (o,z9), and the little script sending lotsa UDP to localhost:

Code: Select all
# valgrind --leak-check=full --show-reachable=yes rsyslogd -c 3 -d
==27978== Memcheck, a memory error detector.
==27978== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==27978== Using LibVEX rev 1804, a library for dynamic binary translation.
==27978== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==27978== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==27978== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==27978== For more details, rerun with: -v
==27978==
rsyslogd:  [origin software="rsyslogd" swVersion="3.21.10" x-pid="27978" x-info="http://www.rsyslog.com"] restart
==27978== Thread 7:
==27978== Conditional jump or move depends on uninitialised value(s)
==27978==    at 0x41A417: dbgprint (debug.c:812)
==27978==    by 0x41A777: dbgprintf (debug.c:889)
==27978==    by 0x409F21: logmsg (syslogd.c:1640)
==27978==    by 0x40A9A0: printline (syslogd.c:639)
==27978==    by 0x40AC17: parseAndSubmitMessage (syslogd.c:856)
==27978==    by 0x58861C6: runInput (imudp.c:202)
==27978==    by 0x42B45F: thrdStarter (threads.c:139)
==27978==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==27978==    by 0x3D17AE62BC: clone (clone.S:112)
==27978==
==27978== Thread 2:
==27978== Conditional jump or move depends on uninitialised value(s)
==27978==    at 0x3D18A04BD8: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==27978==    by 0x40F596: doAction (omfwd.c:421)
==27978==    by 0x42AA86: actionCallDoAction (action.c:471)
==27978==    by 0x426AB0: queueConsumerReg (queue.c:1598)
==27978==    by 0x422C43: wtiWorker (wti.c:412)
==27978==    by 0x421F0D: wtpWorker (wtp.c:422)
==27978==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==27978==    by 0x3D17AE62BC: clone (clone.S:112)
==27978==
==27978== Conditional jump or move depends on uninitialised value(s)
==27978==    at 0x3D18A04B06: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==27978==    by 0x40F596: doAction (omfwd.c:421)
==27978==    by 0x42AA86: actionCallDoAction (action.c:471)
==27978==    by 0x426AB0: queueConsumerReg (queue.c:1598)
==27978==    by 0x422C43: wtiWorker (wti.c:412)
==27978==    by 0x421F0D: wtpWorker (wtp.c:422)
==27978==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==27978==    by 0x3D17AE62BC: clone (clone.S:112)
==27978==
==27978== Thread 3:
==27978== Conditional jump or move depends on uninitialised value(s)
==27978==    at 0x3D18A04B91: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==27978==    by 0x40F596: doAction (omfwd.c:421)
==27978==    by 0x42AA86: actionCallDoAction (action.c:471)
==27978==    by 0x426AB0: queueConsumerReg (queue.c:1598)
==27978==    by 0x422C43: wtiWorker (wti.c:412)
==27978==    by 0x421F0D: wtpWorker (wtp.c:422)
==27978==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==27978==    by 0x3D17AE62BC: clone (clone.S:112)
==27978==
==27978== Conditional jump or move depends on uninitialised value(s)
==27978==    at 0x3D18A04B77: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==27978==    by 0x40F596: doAction (omfwd.c:421)
==27978==    by 0x42AA86: actionCallDoAction (action.c:471)
==27978==    by 0x426AB0: queueConsumerReg (queue.c:1598)
==27978==    by 0x422C43: wtiWorker (wti.c:412)
==27978==    by 0x421F0D: wtpWorker (wtp.c:422)
==27978==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==27978==    by 0x3D17AE62BC: clone (clone.S:112)
==27978==
==27978== Conditional jump or move depends on uninitialised value(s)
==27978==    at 0x3D18A04B9E: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==27978==    by 0x40F596: doAction (omfwd.c:421)
==27978==    by 0x42AA86: actionCallDoAction (action.c:471)
==27978==    by 0x426AB0: queueConsumerReg (queue.c:1598)
==27978==    by 0x422C43: wtiWorker (wti.c:412)
==27978==    by 0x421F0D: wtpWorker (wtp.c:422)
==27978==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==27978==    by 0x3D17AE62BC: clone (clone.S:112)
==27978==
==27978== Conditional jump or move depends on uninitialised value(s)
==27978==    at 0x3D18A04BC1: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==27978==    by 0x40F596: doAction (omfwd.c:421)
==27978==    by 0x42AA86: actionCallDoAction (action.c:471)
==27978==    by 0x426AB0: queueConsumerReg (queue.c:1598)
==27978==    by 0x422C43: wtiWorker (wti.c:412)
==27978==    by 0x421F0D: wtpWorker (wtp.c:422)
==27978==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==27978==    by 0x3D17AE62BC: clone (clone.S:112)
==27978==
==27978== Conditional jump or move depends on uninitialised value(s)
==27978==    at 0x3D18A04BAB: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==27978==    by 0x40F596: doAction (omfwd.c:421)
==27978==    by 0x42AA86: actionCallDoAction (action.c:471)
==27978==    by 0x426AB0: queueConsumerReg (queue.c:1598)
==27978==    by 0x422C43: wtiWorker (wti.c:412)
==27978==    by 0x421F0D: wtpWorker (wtp.c:422)
==27978==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==27978==    by 0x3D17AE62BC: clone (clone.S:112)
==27978==
==27978== Conditional jump or move depends on uninitialised value(s)
==27978==    at 0x3D18A04B84: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==27978==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==27978==    by 0x40F596: doAction (omfwd.c:421)
==27978==    by 0x42AA86: actionCallDoAction (action.c:471)
==27978==    by 0x426AB0: queueConsumerReg (queue.c:1598)
==27978==    by 0x422C43: wtiWorker (wti.c:412)
==27978==    by 0x421F0D: wtpWorker (wtp.c:422)
==27978==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==27978==    by 0x3D17AE62BC: clone (clone.S:112)
^CDoDie called.
rsyslogd:  [origin software="rsyslogd" swVersion="3.21.10" x-pid="27978" x-info="http://www.rsyslog.com"] exiting on signal 2.
/var/log/snmpd/var/log/messages/var/log/secure/var/log/maillog/var/log/cron/var/log/spooler/var/log/boot.log172.21.100.46172.21.100.1==27978==
==27978== ERROR SUMMARY: 900 errors from 9 contexts (suppressed: 31 from 1)
==27978== malloc/free: in use at exit: 99,992 bytes in 79 blocks.
==27978== malloc/free: 340,663 allocs, 340,584 frees, 67,093,480 bytes allocated.
==27978== For counts of detected errors, rerun with: -v
==27978== searching for pointers to 79 not-freed blocks.
==27978== checked 146,568 bytes.
==27978==
==27978== Thread 1:
==27978==
==27978== 32 bytes in 1 blocks are still reachable in loss record 1 of 7
==27978==    at 0x4A05174: calloc (vg_replace_malloc.c:397)
==27978==    by 0x3D1820136F: _dlerror_run (dlerror.c:142)
==27978==    by 0x3D18200EF0: dlopen@@GLIBC_2.2.5 (dlopen.c:88)
==27978==    by 0x41E6DE: Load (modules.c:662)
==27978==    by 0x41DBC5: UseObj (obj.c:1158)
==27978==    by 0x411EFF: confClassInit (conf.c:1255)
==27978==    by 0x411638: rsrtInit (rsyslog.c:178)
==27978==    by 0x40C421: realMain (syslogd.c:2881)
==27978==    by 0x3D17A1E575: (below main) (libc-start.c:220)
==27978==
==27978==
==27978== 56 bytes in 1 blocks are still reachable in loss record 2 of 7
==27978==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==27978==    by 0x3D1760CF78: _dl_map_object_deps (dl-deps.c:507)
==27978==    by 0x3D176133B4: dl_open_worker (dl-open.c:330)
==27978==    by 0x3D1760E745: _dl_catch_error (dl-error.c:178)
==27978==    by 0x3D17612C3A: _dl_open (dl-open.c:596)
==27978==    by 0x3D17B21A6F: do_dlopen (dl-libc.c:86)
==27978==    by 0x3D1760E745: _dl_catch_error (dl-error.c:178)
==27978==    by 0x3D17B21BD6: __libc_dlopen_mode (dl-libc.c:47)
==27978==    by 0x3D1860F82B: pthread_cancel_init (unwind-forcedunwind.c:47)
==27978==    by 0x3D1860C247: pthread_cancel (pthread_cancel.c:40)
==27978==    by 0x42B48C: thrdTerminate (threads.c:94)
==27978==    by 0x42B4E4: thrdDestruct (threads.c:78)
==27978==
==27978==
==27978== 96 bytes in 16 blocks are still reachable in loss record 3 of 7
==27978==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==27978==    by 0x3D17A80BB1: strdup (strdup.c:43)
==27978==    by 0x41A321: dbgSetThrdName (debug.c:668)
==27978==    by 0x41B633: dbgClassInit (debug.c:1279)
==27978==    by 0x40D628: main (syslogd.c:3522)
==27978==
==27978==
==27978== 568 bytes in 1 blocks are still reachable in loss record 4 of 7
==27978==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==27978==    by 0x3D17A681CC: fdopen@@GLIBC_2.2.5 (iofdopen.c:142)
==27978==    by 0x41113D: write_pid (pidfile.c:100)
==27978==    by 0x40B325: doGlblProcessInit (syslogd.c:3103)
==27978==    by 0x40CE37: realMain (syslogd.c:3492)
==27978==    by 0x3D17A1E575: (below main) (libc-start.c:220)
==27978==
==27978==
==27978== 1,680 bytes in 15 blocks are still reachable in loss record 5 of 7
==27978==    at 0x4A05174: calloc (vg_replace_malloc.c:397)
==27978==    by 0x41D943: InfoConstruct (obj.c:143)
==27978==    by 0x4213F1: varClassInit (var.c:445)
==27978==    by 0x41C281: objClassInit (obj.c:1323)
==27978==    by 0x411437: rsrtInit (rsyslog.c:136)
==27978==    by 0x40C421: realMain (syslogd.c:2881)
==27978==    by 0x3D17A1E575: (below main) (libc-start.c:220)
==27978==
==27978==
==27978== 6,040 bytes in 1 blocks are still reachable in loss record 6 of 7
==27978==    at 0x4A05174: calloc (vg_replace_malloc.c:397)
==27978==    by 0x41A256: dbgGetThrdInfo (debug.c:609)
==27978==    by 0x41A305: dbgSetThrdName (debug.c:665)
==27978==    by 0x41B633: dbgClassInit (debug.c:1279)
==27978==    by 0x40D628: main (syslogd.c:3522)
==27978==
==27978==
==27978== 91,520 bytes in 44 blocks are definitely lost in loss record 7 of 7
==27978==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==27978==    by 0x40F563: doAction (omfwd.c:418)
==27978==    by 0x42AA86: actionCallDoAction (action.c:471)
==27978==    by 0x426AB0: queueConsumerReg (queue.c:1598)
==27978==    by 0x422C43: wtiWorker (wti.c:412)
==27978==    by 0x421F0D: wtpWorker (wtp.c:422)
==27978==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==27978==    by 0x3D17AE62BC: clone (clone.S:112)
==27978==
==27978== LEAK SUMMARY:
==27978==    definitely lost: 91,520 bytes in 44 blocks.
==27978==      possibly lost: 0 bytes in 0 blocks.
==27978==    still reachable: 8,472 bytes in 35 blocks.
==27978==         suppressed: 0 bytes in 0 blocks.
nixar
Avarage
 
Posts: 12
Joined: Mon Feb 23, 2009 5:07 pm

Re: Memory leak on 3.21.{9,10} on RHEL5

Postby rgerhards » Mon Mar 23, 2009 4:24 pm

ah, this sounds like a problem with scripting variables. I think I addressed this last week...

any chance you could try a git snapshot? http://git.adiscon.com/?p=rsyslog.git;a ... 977;sf=tgz

You need to run autoreconf -fvi before ./configure
User avatar
rgerhards
Site Admin
 
Posts: 2647
Joined: Thu Feb 13, 2003 11:57 am

Re: Memory leak on 3.21.{9,10} on RHEL5

Postby nixar » Mon Mar 23, 2009 4:39 pm

I'm going to give it a try.
Note that contrary to what I have written, this looks like it gets worse with (o,z9), and it also happens, albeit less rapidly, w/o localhost udp logging.
nixar
Avarage
 
Posts: 12
Joined: Mon Feb 23, 2009 5:07 pm

This does not look good

Postby nixar » Mon Mar 23, 2009 5:22 pm

This is the snapshot you gave me, compiled with:

./configure --disable-static --enable-mysql --enable-pgsql --enable-gssapi-krb5 --enable-imfile --enable-relp --enable-gnutls --prefix=/usr/local/rsyslogtest


Code: Select all
# export RSYSLOG_DEBUG=NoStdOutroot@santa /usr/local/rsyslogtest/sbin
# valgrind --leak-check=full --show-reachable=yes ./rsyslogd -c 3 -d
==32211== Memcheck, a memory error detector.
==32211== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==32211== Using LibVEX rev 1804, a library for dynamic binary translation.
==32211== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==32211== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==32211== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==32211== For more details, rerun with: -v
==32211==
rsyslogd: WARNING: rsyslogd is running in compatibility mode. Automatically generated config directives may interfer with your rsyslog.conf settings. We suggest upgrading your config and adding -c4 as the first rsyslogd option.
rsyslogd:  [origin software="rsyslogd" swVersion="4.1.5" x-pid="32211" x-info="http://www.rsyslog.com"] restart
==32211== Thread 4:
==32211== Conditional jump or move depends on uninitialised value(s)
==32211==    at 0x41B4E5: dbgprint (debug.c:813)
==32211==    by 0x41B832: dbgprintf (debug.c:892)
==32211==    by 0x41418B: parseMsg (parser.c:301)
==32211==    by 0x409E07: msgConsumer (syslogd.c:1214)
==32211==    by 0x4278B0: qqueueConsumerReg (queue.c:1603)
==32211==    by 0x423AF6: wtiWorker (wti.c:421)
==32211==    by 0x422BB1: wtpWorker (wtp.c:430)
==32211==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==32211==    by 0x3D17AE62BC: clone (clone.S:112)
==32211==
==32211== Thread 2:
==32211== Conditional jump or move depends on uninitialised value(s)
==32211==    at 0x3D18A04B77: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==32211==    by 0x40FBD6: doAction (omfwd.c:421)
==32211==    by 0x42B8CE: actionCallDoAction (action.c:472)
==32211==    by 0x4278B0: qqueueConsumerReg (queue.c:1603)
==32211==    by 0x423AF6: wtiWorker (wti.c:421)
==32211==    by 0x422BB1: wtpWorker (wtp.c:430)
==32211==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==32211==    by 0x3D17AE62BC: clone (clone.S:112)
==32211==
==32211== Conditional jump or move depends on uninitialised value(s)
==32211==    at 0x3D18A04B06: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==32211==    by 0x40FBD6: doAction (omfwd.c:421)
==32211==    by 0x42B8CE: actionCallDoAction (action.c:472)
==32211==    by 0x4278B0: qqueueConsumerReg (queue.c:1603)
==32211==    by 0x423AF6: wtiWorker (wti.c:421)
==32211==    by 0x422BB1: wtpWorker (wtp.c:430)
==32211==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==32211==    by 0x3D17AE62BC: clone (clone.S:112)
==32211==
==32211== Conditional jump or move depends on uninitialised value(s)
==32211==    at 0x3D18A04BC1: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==32211==    by 0x40FBD6: doAction (omfwd.c:421)
==32211==    by 0x42B8CE: actionCallDoAction (action.c:472)
==32211==    by 0x4278B0: qqueueConsumerReg (queue.c:1603)
==32211==    by 0x423AF6: wtiWorker (wti.c:421)
==32211==    by 0x422BB1: wtpWorker (wtp.c:430)
==32211==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==32211==    by 0x3D17AE62BC: clone (clone.S:112)
==32211==
==32211== Conditional jump or move depends on uninitialised value(s)
==32211==    at 0x3D18A04B91: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==32211==    by 0x40FBD6: doAction (omfwd.c:421)
==32211==    by 0x42B8CE: actionCallDoAction (action.c:472)
==32211==    by 0x4278B0: qqueueConsumerReg (queue.c:1603)
==32211==    by 0x423AF6: wtiWorker (wti.c:421)
==32211==    by 0x422BB1: wtpWorker (wtp.c:430)
==32211==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==32211==    by 0x3D17AE62BC: clone (clone.S:112)
==32211==
==32211== Thread 3:
==32211== Conditional jump or move depends on uninitialised value(s)
==32211==    at 0x3D18A04BAB: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==32211==    by 0x40FBD6: doAction (omfwd.c:421)
==32211==    by 0x42B8CE: actionCallDoAction (action.c:472)
==32211==    by 0x4278B0: qqueueConsumerReg (queue.c:1603)
==32211==    by 0x423AF6: wtiWorker (wti.c:421)
==32211==    by 0x422BB1: wtpWorker (wtp.c:430)
==32211==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==32211==    by 0x3D17AE62BC: clone (clone.S:112)
==32211==
==32211== Conditional jump or move depends on uninitialised value(s)
==32211==    at 0x3D18A04B9E: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==32211==    by 0x40FBD6: doAction (omfwd.c:421)
==32211==    by 0x42B8CE: actionCallDoAction (action.c:472)
==32211==    by 0x4278B0: qqueueConsumerReg (queue.c:1603)
==32211==    by 0x423AF6: wtiWorker (wti.c:421)
==32211==    by 0x422BB1: wtpWorker (wtp.c:430)
==32211==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==32211==    by 0x3D17AE62BC: clone (clone.S:112)
==32211==
==32211== Conditional jump or move depends on uninitialised value(s)
==32211==    at 0x3D18A04BD8: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==32211==    by 0x40FBD6: doAction (omfwd.c:421)
==32211==    by 0x42B8CE: actionCallDoAction (action.c:472)
==32211==    by 0x4278B0: qqueueConsumerReg (queue.c:1603)
==32211==    by 0x423AF6: wtiWorker (wti.c:421)
==32211==    by 0x422BB1: wtpWorker (wtp.c:430)
==32211==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==32211==    by 0x3D17AE62BC: clone (clone.S:112)
==32211==
==32211== Thread 2:
==32211== Conditional jump or move depends on uninitialised value(s)
==32211==    at 0x3D18A04B6A: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==32211==    by 0x40FBD6: doAction (omfwd.c:421)
==32211==    by 0x42B8CE: actionCallDoAction (action.c:472)
==32211==    by 0x4278B0: qqueueConsumerReg (queue.c:1603)
==32211==    by 0x423AF6: wtiWorker (wti.c:421)
==32211==    by 0x422BB1: wtpWorker (wtp.c:430)
==32211==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==32211==    by 0x3D17AE62BC: clone (clone.S:112)
==32211==
==32211== Thread 3:
==32211== Conditional jump or move depends on uninitialised value(s)
==32211==    at 0x3D18A04B84: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A054EC: (within /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A060BF: deflate (in /lib64/libz.so.1.2.3)
==32211==    by 0x3D18A02693: compress2 (in /lib64/libz.so.1.2.3)
==32211==    by 0x40FBD6: doAction (omfwd.c:421)
==32211==    by 0x42B8CE: actionCallDoAction (action.c:472)
==32211==    by 0x4278B0: qqueueConsumerReg (queue.c:1603)
==32211==    by 0x423AF6: wtiWorker (wti.c:421)
==32211==    by 0x422BB1: wtpWorker (wtp.c:430)
==32211==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==32211==    by 0x3D17AE62BC: clone (clone.S:112)
^CDoDie called.
rsyslogd:  [origin software="rsyslogd" swVersion="4.1.5" x-pid="32211" x-info="http://www.rsyslog.com"] exiting on signal 2.
/var/log/snmpd/var/log/messages/var/log/secure/var/log/maillog/var/log/cron/var/log/spooler/var/log/boot.log172.21.100.46172.21.100.1==32211==
==32211== ERROR SUMMARY: 2110 errors from 10 contexts (suppressed: 31 from 1)
==32211== malloc/free: in use at exit: 213,841 bytes in 137 blocks.
==32211== malloc/free: 691,001 allocs, 690,864 frees, 94,606,560 bytes allocated.
==32211== For counts of detected errors, rerun with: -v
==32211== searching for pointers to 137 not-freed blocks.
==32211== checked 131,696 bytes.
==32211==
==32211== Thread 1:
==32211==
==32211== 21 bytes in 1 blocks are still reachable in loss record 1 of 11
==32211==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==32211==    by 0x3D176053D1: local_strdup (dl-load.c:170)
==32211==    by 0x3D17608E06: _dl_map_object (dl-load.c:2147)
==32211==    by 0x3D17613354: dl_open_worker (dl-open.c:293)
==32211==    by 0x3D1760E745: _dl_catch_error (dl-error.c:178)
==32211==    by 0x3D17612C3A: _dl_open (dl-open.c:596)
==32211==    by 0x3D17B21A6F: do_dlopen (dl-libc.c:86)
==32211==    by 0x3D1760E745: _dl_catch_error (dl-error.c:178)
==32211==    by 0x3D17B21BD6: __libc_dlopen_mode (dl-libc.c:47)
==32211==    by 0x3D1860F82B: pthread_cancel_init (unwind-forcedunwind.c:47)
==32211==    by 0x3D1860C247: pthread_cancel (pthread_cancel.c:40)
==32211==    by 0x42C35C: thrdTerminate (threads.c:94)
==32211==
==32211==
==32211== 21 bytes in 1 blocks are still reachable in loss record 2 of 11
==32211==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==32211==    by 0x3D1760B253: _dl_new_object (dl-object.c:146)
==32211==    by 0x3D176078BF: _dl_map_object_from_fd (dl-load.c:973)
==32211==    by 0x3D17608BEA: _dl_map_object (dl-load.c:2239)
==32211==    by 0x3D17613354: dl_open_worker (dl-open.c:293)
==32211==    by 0x3D1760E745: _dl_catch_error (dl-error.c:178)
==32211==    by 0x3D17612C3A: _dl_open (dl-open.c:596)
==32211==    by 0x3D17B21A6F: do_dlopen (dl-libc.c:86)
==32211==    by 0x3D1760E745: _dl_catch_error (dl-error.c:178)
==32211==    by 0x3D17B21BD6: __libc_dlopen_mode (dl-libc.c:47)
==32211==    by 0x3D1860F82B: pthread_cancel_init (unwind-forcedunwind.c:47)
==32211==    by 0x3D1860C247: pthread_cancel (pthread_cancel.c:40)
==32211==
==32211==
==32211== 32 bytes in 1 blocks are still reachable in loss record 3 of 11
==32211==    at 0x4A05174: calloc (vg_replace_malloc.c:397)
==32211==    by 0x3D1820136F: _dlerror_run (dlerror.c:142)
==32211==    by 0x3D18200EF0: dlopen@@GLIBC_2.2.5 (dlopen.c:88)
==32211==    by 0x41F08A: Load (modules.c:671)
==32211==    by 0x41E595: UseObj (obj.c:1158)
==32211==    by 0x41274F: confClassInit (conf.c:1266)
==32211==    by 0x411CE8: rsrtInit (rsyslog.c:178)
==32211==    by 0x40C377: realMain (syslogd.c:3030)
==32211==    by 0x3D17A1E575: (below main) (libc-start.c:220)
==32211==
==32211==
==32211== 56 bytes in 1 blocks are still reachable in loss record 4 of 11
==32211==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==32211==    by 0x3D1760CF78: _dl_map_object_deps (dl-deps.c:507)
==32211==    by 0x3D176133B4: dl_open_worker (dl-open.c:330)
==32211==    by 0x3D1760E745: _dl_catch_error (dl-error.c:178)
==32211==    by 0x3D17612C3A: _dl_open (dl-open.c:596)
==32211==    by 0x3D17B21A6F: do_dlopen (dl-libc.c:86)
==32211==    by 0x3D1760E745: _dl_catch_error (dl-error.c:178)
==32211==    by 0x3D17B21BD6: __libc_dlopen_mode (dl-libc.c:47)
==32211==    by 0x3D1860F82B: pthread_cancel_init (unwind-forcedunwind.c:47)
==32211==    by 0x3D1860C247: pthread_cancel (pthread_cancel.c:40)
==32211==    by 0x42C35C: thrdTerminate (threads.c:94)
==32211==    by 0x42C3B4: thrdDestruct (threads.c:78)
==32211==
==32211==
==32211== 97 bytes in 16 blocks are still reachable in loss record 5 of 11
==32211==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==32211==    by 0x3D17A80BB1: strdup (strdup.c:43)
==32211==    by 0x41AEE1: dbgSetThrdName (debug.c:669)
==32211==    by 0x41B153: dbgClassInit (debug.c:1282)
==32211==    by 0x40D728: main (syslogd.c:3694)
==32211==
==32211==
==32211== 312 bytes in 1 blocks are still reachable in loss record 6 of 11
==32211==    at 0x4A05174: calloc (vg_replace_malloc.c:397)
==32211==    by 0x3D1761047D: _dl_check_map_versions (dl-version.c:299)
==32211==    by 0x3D17613688: dl_open_worker (dl-open.c:336)
==32211==    by 0x3D1760E745: _dl_catch_error (dl-error.c:178)
==32211==    by 0x3D17612C3A: _dl_open (dl-open.c:596)
==32211==    by 0x3D17B21A6F: do_dlopen (dl-libc.c:86)
==32211==    by 0x3D1760E745: _dl_catch_error (dl-error.c:178)
==32211==    by 0x3D17B21BD6: __libc_dlopen_mode (dl-libc.c:47)
==32211==    by 0x3D1860F82B: pthread_cancel_init (unwind-forcedunwind.c:47)
==32211==    by 0x3D1860C247: pthread_cancel (pthread_cancel.c:40)
==32211==    by 0x42C35C: thrdTerminate (threads.c:94)
==32211==    by 0x42C3B4: thrdDestruct (threads.c:78)
==32211==
==32211==
==32211== 568 bytes in 1 blocks are still reachable in loss record 7 of 11
==32211==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==32211==    by 0x3D17A681CC: fdopen@@GLIBC_2.2.5 (iofdopen.c:142)
==32211==    by 0x41180C: write_pid (pidfile.c:100)
==32211==    by 0x40AE53: doGlblProcessInit (syslogd.c:3254)
==32211==    by 0x40CEB4: realMain (syslogd.c:3664)
==32211==    by 0x3D17A1E575: (below main) (libc-start.c:220)
==32211==
==32211==
==32211== 1,174 bytes in 1 blocks are still reachable in loss record 8 of 11
==32211==    at 0x4A05174: calloc (vg_replace_malloc.c:397)
==32211==    by 0x3D1760AFD5: _dl_new_object (dl-object.c:52)
==32211==    by 0x3D176078BF: _dl_map_object_from_fd (dl-load.c:973)
==32211==    by 0x3D17608BEA: _dl_map_object (dl-load.c:2239)
==32211==    by 0x3D17613354: dl_open_worker (dl-open.c:293)
==32211==    by 0x3D1760E745: _dl_catch_error (dl-error.c:178)
==32211==    by 0x3D17612C3A: _dl_open (dl-open.c:596)
==32211==    by 0x3D17B21A6F: do_dlopen (dl-libc.c:86)
==32211==    by 0x3D1760E745: _dl_catch_error (dl-error.c:178)
==32211==    by 0x3D17B21BD6: __libc_dlopen_mode (dl-libc.c:47)
==32211==    by 0x3D1860F82B: pthread_cancel_init (unwind-forcedunwind.c:47)
==32211==    by 0x3D1860C247: pthread_cancel (pthread_cancel.c:40)
==32211==
==32211==
==32211== 1,680 bytes in 15 blocks are still reachable in loss record 9 of 11
==32211==    at 0x4A05174: calloc (vg_replace_malloc.c:397)
==32211==    by 0x41E313: InfoConstruct (obj.c:143)
==32211==    by 0x422021: varClassInit (var.c:445)
==32211==    by 0x41CCE1: objClassInit (obj.c:1323)
==32211==    by 0x411AE7: rsrtInit (rsyslog.c:136)
==32211==    by 0x40C377: realMain (syslogd.c:3030)
==32211==    by 0x3D17A1E575: (below main) (libc-start.c:220)
==32211==
==32211==
==32211== 6,040 bytes in 1 blocks are still reachable in loss record 10 of 11
==32211==    at 0x4A05174: calloc (vg_replace_malloc.c:397)
==32211==    by 0x41AE16: dbgGetThrdInfo (debug.c:610)
==32211==    by 0x41AEC5: dbgSetThrdName (debug.c:666)
==32211==    by 0x41B153: dbgClassInit (debug.c:1282)
==32211==    by 0x40D728: main (syslogd.c:3694)
==32211==
==32211==
==32211== 203,840 bytes in 98 blocks are definitely lost in loss record 11 of 11
==32211==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==32211==    by 0x40FBA3: doAction (omfwd.c:418)
==32211==    by 0x42B8CE: actionCallDoAction (action.c:472)
==32211==    by 0x4278B0: qqueueConsumerReg (queue.c:1603)
==32211==    by 0x423AF6: wtiWorker (wti.c:421)
==32211==    by 0x422BB1: wtpWorker (wtp.c:430)
==32211==    by 0x3D186073D9: start_thread (pthread_create.c:297)
==32211==    by 0x3D17AE62BC: clone (clone.S:112)
==32211==
==32211== LEAK SUMMARY:
==32211==    definitely lost: 203,840 bytes in 98 blocks.
==32211==      possibly lost: 0 bytes in 0 blocks.
==32211==    still reachable: 10,001 bytes in 39 blocks.
==32211==         suppressed: 0 bytes in 0 blocks.
nixar
Avarage
 
Posts: 12
Joined: Mon Feb 23, 2009 5:07 pm

Re: Memory leak on 3.21.{9,10} on RHEL5

Postby rgerhards » Wed Mar 25, 2009 6:22 pm

I tried to reproduce the issue, but so far without success. I am not yet running in compatibility mode, maybe these not-freed memory blocks are actually left-overs from the compatibility layer. I will try, but I would appreciate if you could re-run your test with -c4 on the command line.

Thanks,
Rainer
User avatar
rgerhards
Site Admin
 
Posts: 2647
Joined: Thu Feb 13, 2003 11:57 am

Google Ads



Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 0 guests

cron