rhel7/rhel8: Log loss occurred due to rsyslogd log rotation when writing to a pipe file

Solution Unverified - Updated -

Issue

Log loss occurred due to rsyslogd log rotation when writing to a pipe file on RHEL7. If log rotation occurs in rsyslogd while writing to a pipe file, the following is outputted:

rsyslogd: write error on pipe /path/fifoname: Bad file descriptor

When rsyslogd receives SIGHUP, rsyslogd closes the pipe and then reopens it. If rsyslogd writes to the pipe between the pipe closes and the pipe opens, this issue occurs because there is no File Descriptor.

The rsyslog-v8 did not perform mutual exclusion between the pipe and SIGHUP processing threads, so when a conflict occurs, this message is outputted and the log is lost. Therefore, we determined that it was a rsyslog-v8 bug.

We have two questions as follows:

  • Is Red Hat aware of the rsyslog issue?
  • Does Red Hat have any plans to fix it?

Environment

  • Red Hat Enterprise Linux (RHEL)
    • RHEL7, minor version 7.4 and later affected
    • RHEL8, minor versions 8.0-8.4 affected
  • rsyslog
    • RHEL7: versions from 8.24.0-12 on and before 8.24.0-57.el7_9.2affected
    • RHEL8: versions before 8.2102.0-5affected
  • rsyslogd, with ompipe in use
  • logrotate, sending SIGHUP

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content