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 2003236

Summary: journalctl --follow does not exit immediately after stdout is closed
Product: Red Hat Enterprise Linux 8 Reporter: Benjamin Gilbert <bgilbert>
Component: systemdAssignee: David Tardon <dtardon>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.4CC: dtardon, miabbott, systemd-maint-list
Target Milestone: rcKeywords: Bugfix, Reproducer, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-239-61.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-08 10:49:17 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 Benjamin Gilbert 2021-09-10 17:58:29 UTC
Description of problem:
journalctl --follow continues to block on more input after its stdout pipe has been closed by the reader.

Version-Release number of selected component (if applicable):
systemd-239-45.el8_4.3.x86_64

How reproducible:
Always

Steps to Reproduce:
1. journalctl -b -q -f --no-tail -o cat MESSAGE_ID=8d45620c1a4348dbb17410da57c60c66 | head -1

Actual results:
The command prints one line of output, then blocks.  If an additional SSH session is established to the machine, the command returns.

Expected results:
The command prints one line of output, then returns immediately.

Additional info:
We were using this command in a CoreOS CI test to check whether console autologin was working correctly.  The command works properly on current Fedora.

The cause is https://github.com/systemd/systemd/issues/9374, fixed in https://github.com/systemd/systemd/pull/10511.  We're not blocked on a fix (we've changed the CI test) but the fix seems useful enough for a backport to be worth considering.

Comment 1 Plumber Bot 2022-07-07 15:12:33 UTC
fix merged to github master branch -> https://github.com/redhat-plumbers/systemd-rhel8/pull/271

Comment 7 errata-xmlrpc 2022-11-08 10:49: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 (systemd 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-2022:7727