Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1509987

Summary: rsyslog+mmjsonparse dumps core in loop at startup
Product: Red Hat Enterprise Linux 7 Reporter: Renaud Métrich <rmetrich>
Component: rsyslogAssignee: Jiří Vymazal <jvymazal>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.4CC: jvymazal, rmetrich, rsroka, sdordevi
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rsyslog-8.24.0-16.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-10 09:11:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Renaud Métrich 2017-11-06 14:13:29 UTC
Description of problem:

After installing rsyslog and mmjsonparse, I configured mmjsonparse to handle all messages, by setting cookie='':

# cat /etc/rsyslog.d/json.conf 
module(load="mmjsonparse") # Load mmjsonparse module for structured logs
action(type="mmjsonparse" cookie='')
if $parsesuccess == "OK" then {
      action(type="omfile" File="/tmp/output")
} else if $parsesuccess == "FAIL" then {
   action(type="omfile" File="/tmp/parsing_failure")
}

After restart, rsyslog dumps core continuously until systemd stops respawning it:

# systemctl status rsyslog
● rsyslog.service - System Logging Service
   Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit) since Mon 2017-11-06 15:08:40 CET; 650ms ago
     Docs: man:rsyslogd(8)
           http://www.rsyslog.com/doc/
  Process: 2544 ExecStart=/usr/sbin/rsyslogd -n $SYSLOGD_OPTIONS (code=killed, signal=SEGV)
 Main PID: 2544 (code=killed, signal=SEGV)

Nov 06 15:08:40 vm-rsyslog74-json systemd[1]: rsyslog.service: main process exited, code=killed, status=11/SEGV
Nov 06 15:08:40 vm-rsyslog74-json systemd[1]: Unit rsyslog.service entered failed state.
Nov 06 15:08:40 vm-rsyslog74-json systemd[1]: rsyslog.service failed.
Nov 06 15:08:40 vm-rsyslog74-json systemd[1]: rsyslog.service holdoff time over, scheduling restart.
Nov 06 15:08:40 vm-rsyslog74-json systemd[1]: start request repeated too quickly for rsyslog.service
Nov 06 15:08:40 vm-rsyslog74-json systemd[1]: Failed to start System Logging Service.
Nov 06 15:08:40 vm-rsyslog74-json systemd[1]: Unit rsyslog.service entered failed state.
Nov 06 15:08:40 vm-rsyslog74-json systemd[1]: rsyslog.service failed.


Version-Release number of selected component (if applicable):

rsyslog-mmjsonparse-8.24.0-12.el7.x86_64
rsyslog-8.24.0-12.el7.x86_64


How reproducible:

Always

Steps to Reproduce:
1. Install package

# yum -y install rsyslog-mmjsonparse

2. Configure mmjsonparse

# cat /etc/rsyslog.d/json.conf 
module(load="mmjsonparse") # Load mmjsonparse module for structured logs
action(type="mmjsonparse" cookie='')
if $parsesuccess == "OK" then {
   action(type="omfile" File="/tmp/output")
} else if $parsesuccess == "FAIL" then {
   action(type="omfile" File="/tmp/parsing_failure")
}

3. Restart rsyslog

# systemctl restart rsyslog


Actual results:

Nov 06 15:08:40 vm-rsyslog74-json systemd[1]: rsyslog.service: main process exited, code=killed, status=11/SEGV
Nov 06 15:08:40 vm-rsyslog74-json systemd[1]: Unit rsyslog.service entered failed state.
Nov 06 15:08:40 vm-rsyslog74-json systemd[1]: rsyslog.service failed.


Additional info:

This is due to using:
  cookie='' (simple quotes)
instead of
  cookie="" (double quotes)