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.
Description of problem:
running on RHEL 6.4/6.5
ssh 10.34.63.19 ausearch -m avc,user_avc -ts today
gets stuck
while running the command on the node returns result immediately
ausearch -m avc,user_avc -ts today
<no matches>
Version-Release number of selected component (if applicable):
rpm -qa audit
audit-2.2-2.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1. run ssh $IP ausearch -m avc,user_avc -ts today
Actual results:
command gets stuck
Expected results:
command returns valid response
Additional info:
this BZ was raised based on bug 1005066 , there is some more information which might be useful
Thanks for the strace. It shows the client end waiting for something. What I am curious about is what ausearch is doing. If this is still reproducable, could you get an strace of ausearch? Thanks.
If it may help, ssh -t seems to solve the issue.
In https://bugzilla.redhat.com/show_bug.cgi?id=1010472
Derrick Ornelas says:
The issue appears to be that the ausearch command requires a controlling TTY(pty), and hangs indefinitely without access to one.
Comment 6RHEL Program Management
2013-10-13 23:11:57 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.
Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Florian pointed out in bug 1032706 that this is actually expected behaviour when stdin is a pipe:
> ausearch doesn't need a TTY, it alters behavior if the input is a pipe.
> This is documented behavior, mentioned in the manpage:
>
> --input-logs
> Use the log file location from auditd.conf as input for searchâ
> ing. This is needed if you are using ausearch from a cron job.
And reading the log from stdin is mentioned in the opening paragraph of the man pages for ausearch and aureport (which has the same logic):
"The ausearch utility can also take input from stdin as long as the input
is the raw log data."
Seems this is NOTABUG.