RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1505103 - rsyslog omrelp rebindinterval crash
Summary: rsyslog omrelp rebindinterval crash
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rsyslog
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jiří Vymazal
QA Contact: Stefan Dordevic
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-22 07:43 UTC by Jarno Huuskonen
Modified: 2018-04-10 15:27 UTC (History)
6 users (show)

Fixed In Version: rsyslog-8.24.0-14.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 15:26:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed patch (908 bytes, patch)
2017-10-31 14:43 UTC, Jiří Vymazal
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github rsyslog rsyslog issues 120 0 None None None 2017-10-27 11:54:24 UTC
Red Hat Product Errata RHBA-2018:0856 0 None None None 2018-04-10 15:27:12 UTC

Description Jarno Huuskonen 2017-10-22 07:43:57 UTC
Description of problem:
rsyslog (rsyslog-8.24.0-12.el7.x86_64 / rsyslog-relp-8.24.0-12.el7.x86_64)
crashes if omrelp forwarding action has RebindInterval.

Version-Release number of selected component (if applicable):
rsyslog-8.24.0-12.el7.x86_64 / rsyslog-relp-8.24.0-12.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Set up omrelp forwarding I used:
*.debug action(
        type="omrelp"
        timeout="60" conn.timeout="10"
        template="RSYSLOG_ForwardFormat"
        target="peername.example.org"
        port="2514"
        tls="on"
        RebindInterval="512"
        tls.cacert="/etc/pki/rsyslog/ca.pem"
        tls.mycert="/etc/pki/rsyslog/client.crt"
        tls.myprivkey="/etc/pki/rsyslog/client.key"
        tls.authmode="name"
        tls.permittedpeer=["peername.example.org"]
        queue.filename="fwd1"
        queue.maxdiskspace="512m"
        queue.maxfilesize="32m"
        queue.syncqueuefiles="on" # fsync queue
        queue.saveonshutdown="on"
        queue.type="LinkedList"
        queue.timeoutenqueue="0"
        queue.highwatermark="102400"
        queue.lowwatermark="16384"  
        queue.timeoutshutdown="8000"
        action.resumeretrycount="-1"
        action.resumeinterval="15"
        action.reportSuspension="on"
        action.reportSuspensionContinuation="on"
)
2. restart rsyslogd: systemctl restart rsyslogd
3. Use iptables to drop OUTPUT to rsyslog remote server (iptables -I OUTPUT 1 -p tcp -d ser.er.ip.address -j DROP
and wait rsyslog to crash

Actual results:
Running rsyslogd -n in gdb gives this:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdbfff700 (LWP 11296)]
0x00007ffff44c70a4 in relpCltHintBurstEnd (pThis=0x7fffd4003f60)
    at relpclt.c:371
371             relpTcpHintBurstEnd(pThis->pSess->pTcp);


(gdb) bt
#0  0x00007ffff44c70a4 in relpCltHintBurstEnd (pThis=0x7fffd4002250)
    at relpclt.c:371
#1  0x00007ffff46cebeb in endTransaction (pWrkrData=0x7fffd4002220)
    at omrelp.c:518
#2  0x0000555555599226 in actionTryCommit (pWti=0x555555849240,
    pThis=0x555555838a20) at ../action.c:1237
#3  actionCommit (pThis=pThis@entry=0x555555838a20,
    pWti=pWti@entry=0x555555849240) at ../action.c:1323
#4  0x000055555559a388 in processBatchMain (pVoid=0x555555838a20,
    pBatch=0x555555849270, pWti=0x555555849240) at ../action.c:1433
#5  0x000055555558eb8f in ConsumerReg (pThis=0x555555838ee0,
    pWti=0x555555849240) at queue.c:2005
#6  0x000055555558b66e in wtiWorker (pThis=pThis@entry=0x555555849240)
    at wti.c:365
#7  0x000055555558a7dd in wtpWorker (arg=0x555555849240) at wtp.c:410
#8  0x00007ffff79b0e25 in start_thread () from /lib64/libpthread.so.0
#9  0x00007ffff6aa934d in clone () from /lib64/libc.so.6

(gdb) p pThis
$1 = (relpClt_t *) 0x7fffd4002250
(gdb) p pThis->pSess
$2 = (relpSess_t *) 0x0

Expected results:
Rsyslog not crashing.

Additional info:
This seems to be fixed in upstream rsyslog: https://github.com/rsyslog/rsyslog/commit/3d1007ab701ec6e18c30d0db1f20bdd2a10b2930

Comment 2 Radovan Sroka 2017-10-27 11:55:53 UTC
Here is the patch from upstream:

https://github.com/rgerhards/rsyslog/commit/cc09e7a6e893157a4d7a173c78f4b0a0496e8fbd.patch

Comment 3 Radovan Sroka 2017-10-30 14:20:44 UTC
Is it reproducible without TLS?

Comment 4 Jarno Huuskonen 2017-10-30 16:33:45 UTC
(In reply to Radovan Sroka from comment #3)
> Is it reproducible without TLS?

Yes. (Commented out tls from client / server rsyslog.conf and confirmed with tcpdump that messages are sent in plaintext). rsyslogd crashes:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffeb3fd700 (LWP 29455)]
0x00007ffff44c70a4 in relpCltHintBurstEnd (pThis=0x7fffd0002250)
    at relpclt.c:371
371             relpTcpHintBurstEnd(pThis->pSess->pTcp);

(gdb) bt
#0  0x00007ffff44c70a4 in relpCltHintBurstEnd (pThis=0x7fffd0002250)
    at relpclt.c:371
#1  0x00007ffff46cebeb in endTransaction (pWrkrData=0x7fffd0002220)
    at omrelp.c:518
#2  0x0000555555599226 in actionTryCommit (pWti=0x555555849180,
    pThis=0x555555838820) at ../action.c:1237
#3  actionCommit (pThis=pThis@entry=0x555555838820,
    pWti=pWti@entry=0x555555849180) at ../action.c:1323
#4  0x000055555559a388 in processBatchMain (pVoid=0x555555838820,
    pBatch=0x5555558491b0, pWti=0x555555849180) at ../action.c:1433
#5  0x000055555558eb8f in ConsumerReg (pThis=0x555555838c50,
    pWti=0x555555849180) at queue.c:2005
#6  0x000055555558b66e in wtiWorker (pThis=pThis@entry=0x555555849180)
    at wti.c:365
#7  0x000055555558a7dd in wtpWorker (arg=0x555555849180) at wtp.c:410
#8  0x00007ffff79b0e25 in start_thread () from /lib64/libpthread.so.0
#9  0x00007ffff6aa934d in clone () from /lib64/libc.so.6
(gdb) p pThis
$1 = (relpClt_t *) 0x7fffd0002250
(gdb) p pThis->pSess
$2 = (relpSess_t *) 0x0

Comment 5 Radovan Sroka 2017-10-31 11:54:18 UTC
Still not able to reproduce this issue.

Can you minimize this reproducer? And provide exact steps?

This is still pretty complex config.

> 2. restart rsyslogd: systemctl restart rsyslogd
> 3. Use iptables to drop OUTPUT to rsyslog remote server (iptables -I OUTPUT 1 -p tcp -d ser.er.ip.address -j DROP

Does this server really exist? Is it possible to reproduce it on localhost?

> and wait rsyslog to crash

What does that mean?

Comment 7 Jiří Vymazal 2017-10-31 14:43:08 UTC
Created attachment 1345944 [details]
proposed patch

Comment 13 errata-xmlrpc 2018-04-10 15:26:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0856


Note You need to log in before you can comment on or make changes to this bug.