Bug 1875290 - sealert "hangs" if setroubleshootd dies unexpectedly
Summary: sealert "hangs" if setroubleshootd dies unexpectedly
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: setroubleshoot
Version: 8.2
Hardware: All
OS: Linux
Target Milestone: rc
: 8.0
Assignee: Vit Mojzis
QA Contact: Milos Malik
Khushbu Borole
Depends On:
TreeView+ depends on / blocked
Reported: 2020-09-03 08:30 UTC by Renaud Métrich
Modified: 2021-09-15 12:48 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
.Fixed `sealert` connection issue handling Previously, a crash of the `setroubleshoot` daemon could cause the `sealert` process to stop responding. Consequently, the GUI did not show any analysis and also became unresponsive, the command line tool did not print any output and kept running until killed. This update improves handling of connection issues between `sealert` and `setroubleshootd`. Now `sealert` reports an error message and exits in case the `setroubleshoot` daemon crashes.
Clone Of:
Last Closed: 2021-05-18 16:11:46 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5478591 0 None None None 2020-10-09 10:38:50 UTC
Red Hat Product Errata RHBA-2021:1929 0 None None None 2021-05-18 16:11:52 UTC

Description Renaud Métrich 2020-09-03 08:30:13 UTC
Description of problem:

If for some reason setroubleshootd dies and the connection has not be accepted yet (e.g. BZ #1871869), sealert waits forever and user must use ^C to bail out.

Version-Release number of selected component (if applicable):


How reproducible:

Always mimicing setroubleshootd dying

Steps to Reproduce:
1. Edit /usr/lib/python3.6/site-packas/setroubleshoot/rpc.py to exit before accepting the connection

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# diff -u /usr/lib/python3.6/site-packages/setroubleshoot/rpc.py.orig /usr/lib/python3.6/site-packas/setroubleshoot/rpc.py
--- /usr/lib/python3.6/site-packages/setroubleshoot/rpc.py.orig	2020-09-03 10:18:17.717679610 +0200
+++ /usr/lib/python3.6/site-packages/setroubleshoot/rpc.py	2020-09-03 10:18:45.670973694 +0200
@@ -703,6 +703,8 @@
             if io_condition & GLib.IO_IN:
+                    import sys
+                    sys.exit(1)
                     client_socket, client_address = socket.accept()
                     fcntl.fcntl(client_socket.fileno(), fcntl.F_SETFD, fcntl.FD_CLOEXEC)
                     client_handler = self.client_connection_handler_class(self.socket_address)
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

2. Execute sealert

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# sealert -l \*
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Actual results:


Expected results:

Exit after some time / upon detecting connection is dead

Comment 3 Vit Mojzis 2021-02-02 12:26:25 UTC

Comment 14 errata-xmlrpc 2021-05-18 16:11:46 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 (setroubleshoot 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.


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