# rsyslog 4.6.1 segfault



## zgabe (Jul 22, 2010)

Hi!

I am using FreeBSD 7.3 with rsyslog 4.6.1. This machine connects to a logserver (FreeBSD 7.1 with rsyslog 4.4.2) via an SSH tunnel and sends logs with RELP module. 
I generate logs with a short perl script (about 30 message/sec) and sometimes rsyslogd stops to work. Once I could catch the problem in debug mode:


```
7739.336306837:28203ce0: relp engine is dispatching frame with command 'rsp'
7739.336684559:28203ce0: in rsp command handler, txnr 200, code 200, text 'OK'
7739.336831792:28203ce0: DEL sess 0x282530a0 unacked 3, sessState 4
7739.336837938:28203ce0: in destructor: sendbuf 0x2822fde0
7739.336843806:28203ce0: relp engine is dispatching frame with command 'rsp'
7739.337129611:28203ce0: in rsp command handler, txnr 201, code 200, text 'OK'
7739.337135478:28203ce0: DEL sess 0x282530a0 unacked 2, sessState 4
7739.337423519:28203ce0: in destructor: sendbuf 0x28238780
7739.337429665:28203ce0: relp engine is dispatching frame with command 'rsp'
7739.337689768:28203ce0: in rsp command handler, txnr 202, code 200, text 'OK'
7739.337695915:28203ce0: DEL sess 0x282530a0 unacked 1, sessState 4
7739.337701782:28203ce0: in destructor: sendbuf 0x28238740
7739.338035361:28203ce0: relpSessWaitState returns 0
7739.338118337:28203ce0: send command relp sess state 4
7739.338124204:28203ce0: sendcommand ready to send, relp sess state 4
7739.338130351:28203ce0: frame to send: '204 syslog 122 <149>1 2010-07-09T08:40:11.078182+02:00 myhost myprogram - - - mymessage

7739.338136218:28203ce0: tcpSend returns 138
7739.338731856:28203ce0: ADD sess 0x282530a0 unacked 2, sessState 4
7739.338884956:28203ce0: sendbuf added to unacked list
Segmentation fault (core dumped)

The sending node config file contains the following:
$ModLoad imuxsock.so
$ModLoad omrelp
$ModLoad imklog

$ActionQueueType LinkedList # use asynchronous processing
$ActionQueueFileName srvrfwd1 # set file name, also enables disk mode
$ActionResumeRetryCount -1 # infinite retries on insert failure
$ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down
$ActionQueueMaxFileSize 100m # max size of the memory queue file
$ActionQueueMaxDiskSpace 1g # max size of the disk queue log file

if $syslogfacility-text == 'local1' then :omrelp:127.0.0.1:11514
```

Ideas?

p.s. I have tried to compile rsyslog with debug flag but I couldn't reproduce this problem.

BR
zgabe


----------

