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 1960536 - rsyslog fd leak when Fsync="on" is set
Summary: rsyslog fd leak when Fsync="on" is set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rsyslog
Version: 8.3
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: beta
: ---
Assignee: Attila Lakatos
QA Contact: Dalibor Pospíšil
URL:
Whiteboard:
Depends On:
Blocks: 1972069
TreeView+ depends on / blocked
 
Reported: 2021-05-14 06:57 UTC by masanari iida
Modified: 2022-02-21 04:57 UTC (History)
3 users (show)

Fixed In Version: rsyslog-8.2102.0-3.el8
Doc Type: Bug Fix
Doc Text:
Cause: a bug in the imjournal module together with its option Fsync is set to "on" Consequence: rsyslog was opening new 3 FDs for approximately each 10 log messages Fix: Result: rsyslog does not eat up more FDs on increasing number of messages
Clone Of:
: 1972069 (view as bug list)
Environment:
Last Closed: 2021-11-09 18:05:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rsyslog rsyslog pull 4572 0 None closed imjournal: flush buffer before fsync 2021-05-31 07:30:11 UTC
Red Hat Product Errata RHBA-2021:4193 0 None None None 2021-11-09 18:05:26 UTC

Description masanari iida 2021-05-14 06:57:34 UTC
Description of problem:
If I set FSync=on in imjournal module, the rsyslogd opens 3 additional
/var/lib/rsyslog everytime 10 lines of messages are written to log.
This symptom will consume all file descriptors in the end.

Version-Release number of selected component (if applicable):
rsyslog-8.1911.0-6.el8.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install latest rsyslog.

2.Edit rsyslog.conf

2.1 disable following line. 
#$ModLoad imjournal # provides access to the systemd journal

2.2 add following lines.
module(load="imjournal"
StateFile="imjournal.state"
IgnoreNonValidStatefile="on"
IgnorePreviousMessages="on"
FSync="on"                    <==
Ratelimit.Interval="0"
)

3. Restart rsyslogd

4. Keep watching number of open files.
while true
do  
  lsof |grep /var/lib/rsyslog |wc -l
  sleep 15
done

If the number of open files change slower,
then use logger(1) to send messages to /var/log/messages.
If you send 10 messages,  rsyslogd will add 3 additional
/var/lib/rsyslog open directories.

Actual results:
The number of open directory (/var/lib/rsyslog) keep growing.

96
96
99      <- add 3
99
99
99
99
99
99
102    <- add 3

Expected results:
Number of open files by rsyslogd should be always low number.

Additional info:

This symptom can be reproduced on rsyslog on RHEL7,
and also rsyslog-8.2010.0-1.fc33.x86_64.

Comment 1 masanari iida 2021-05-19 06:01:50 UTC
Test with rsyslog from RHEL8.4,  the symptom still exist.

rsyslog-8.1911.0-7.el8.x86_64
rsyslog-relp-8.1911.0-7.el8.x86_64
rsyslog-gssapi-8.1911.0-7.el8.x86_64
rsyslog-gnutls-8.1911.0-7.el8.x86_64

Comment 2 Attila Lakatos 2021-05-31 07:30:16 UTC
Hello,

Thank you for the report. I can confirm that the bug is still present in the latest rsyslog release.
I've attached a GitHub link to upstream solution.

Comment 12 errata-xmlrpc 2021-11-09 18:05:17 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 (rsyslog and its related dependencies bug fix and enhancement update), 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-2021:4193


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