Bug 1744617
Summary: | Memory leak in readjournal() when cs.bWorkAroundJournalBug = 1 | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Kyle Walker <kwalker> |
Component: | rsyslog | Assignee: | Jiří Vymazal <jvymazal> |
Status: | CLOSED ERRATA | QA Contact: | Dalibor Pospíšil <dapospis> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 7.7 | CC: | cylopez, dapospis, jvymazal, rmeggins |
Target Milestone: | rc | Keywords: | EasyFix, Patch, Triaged |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | rsyslog-8.24.0-46.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-03-31 19:10:09 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
Kyle Walker
2019-08-22 14:28:58 UTC
Whoops! Missed a step in my reproducer. You wont get stacktraces without the applicable debuginfo installed. That necessary change results in the following reproducer: 1. Remove the "imjournal" plugin configuration options from the /etc/rsyslog.conf and add the applicable module configuration option # diff -up /etc/rsyslog.conf.orig /etc/rsyslog.conf --- /etc/rsyslog.conf.orig 2019-08-22 10:12:22.152412234 -0400 +++ /etc/rsyslog.conf 2019-08-21 12:01:53.838303690 -0400 @@ -7,7 +7,7 @@ # The imjournal module bellow is now used as a message source instead of imuxsock. $ModLoad imuxsock # provides support for local system logging (e.g. via logger command) -$ModLoad imjournal # provides access to the systemd journal +#$ModLoad imjournal # provides access to the systemd journal #$ModLoad imklog # reads kernel messages (the same are read from journald) #$ModLoad immark # provides --MARK-- message capability @@ -40,7 +40,8 @@ $IncludeConfig /etc/rsyslog.d/*.conf $OmitLocalLogging on # File to store the position in the journal -$IMJournalStateFile imjournal.state +#$IMJournalStateFile imjournal.state +module(load="imjournal" StateFile="imjournal.state" WorkAroundJournalBug="on") #### RULES #### 2. Stop the service-initiated rsyslog instance # systemctl stop rsyslog 3. Install the applicable debuginfo # debuginfo-install rsyslog 4. Start rsyslog in a valgrind instance with the following flags # valgrind --keep-debuginfo=yes --show-leak-kinds=definite --leak-check=full --show-leak-kinds=all -v --log-file=/tmp/valgrind.rsyslog $(which rsyslogd) -n 5. Issue a fairly large amount of "logger" commands to exercise the logging processes, and then stop the valgrind/rsyslog instance # for entry in {0..9999}; do logger test-$entry; done && kill $(cat /var/run/syslogd.pid) 6. Verify the output of the /tmp/valgrind.rsyslog log file to verify the amount of definitely lost memory chunks. Specifically within the readjournal() codepath Sorry for the confusion! 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/RHSA-2020:1000 |