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 1713358 - Rsyslog holds open deleted files, which consumes all free disk space
Summary: Rsyslog holds open deleted files, which consumes all free disk space
Keywords:
Status: CLOSED DUPLICATE of bug 1595840
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rsyslog
Version: 7.6
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Jiří Vymazal
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-23 13:16 UTC by matousejem
Modified: 2022-10-25 12:15 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-29 11:07:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description matousejem 2019-05-23 13:16:37 UTC
Systemd (journal) creates many files similar to `/var/log/journal/d6d244379c464a13a38ae1b05cab0c0a/user-22263`.
Later they are deleted.

### Expected behavior
When a file is deleted from disk, rsyslogd should close it prior to disk is full.

### Actual behavior
From the output of `lsof /var/log` you can see that rsyslog holds open many files. For example:
```
Apr 23 12:25:06 rsyslogd   62213     root 1469r   REG 253,11  8388608  920711 /var/log/journal/d6d244379c464a13a38ae1b05cab0c0a/user-16328 (deleted)
Apr 23 12:25:06 rsyslogd   62213     root 1480r   REG 253,11  8388608  917891 /var/log/journal/d6d244379c464a13a38ae1b05cab0c0a/user-19660 (deleted)
Apr 23 12:25:06 rsyslogd   62213     root 1487r   REG 253,11  8388608  920573 /var/log/journal/d6d244379c464a13a38ae1b05cab0c0a/user-22769 (deleted)
...
...
```
This results to full disk.

### Steps to reproduce the behavior

This is `/etc/systemd/journald.conf`
```
[Journal]
SystemMaxUse=5G
SystemKeepFree=5G
```

### Environment
- rsyslog version: 8.24.0-34
- platform: RHEL 7

### Configuration
`/etc/rsyslog.conf`
```
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imjournal # provides access to the systemd journal
$WorkDirectory /var/lib/rsyslog
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
$OmitLocalLogging on
$IMJournalStateFile imjournal.state
*.info;mail.none;authpriv.none;cron.none;local1.none     /var/log/messages
authpriv.*                                              /var/log/secure
mail.*                                                  -/var/log/maillog
cron.*                                                  /var/log/cron
*.emerg                                                 :omusrmsg:*
uucp,news.crit                                          /var/log/spooler
local7.*                                                /var/log/boot.log
$MaxOpenFiles 4096
local1.*                                                /var/log/dovecot/syslog
*.info                                                  @147.251.48.140
$SystemLogSocketName /run/systemd/journal/syslog
```

Comment 2 Jiří Vymazal 2019-05-29 11:07:44 UTC

*** This bug has been marked as a duplicate of bug 1595840 ***

Comment 3 1224412750 2020-09-24 06:41:18 UTC
(In reply to Jiří Vymazal from comment #2)
> 
> *** This bug has been marked as a duplicate of bug 1595840 ***

Hello, jvymazal,
I have faced the same problem recently and have been troubled for a long time. I asked for help in the rsyslog and systemd communities, but did not get the root cause. 
BUG1595840 requires internal permissions to access. I would love to know the current status of this problem and how to solve it. 
Hope you can help me. 

thank you very much

Comment 4 Buto 2022-10-25 12:15:57 UTC
Hi, 
Is there any news to this issue ?
I also can't see the original bug as mentioned because of permissions.
Thnaks


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