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 625468 - sealert --analyze together with --service or --browser hangs
Summary: sealert --analyze together with --service or --browser hangs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: setroubleshoot
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-19 14:31 UTC by David Kutálek
Modified: 2016-02-11 15:47 UTC (History)
3 users (show)

Fixed In Version: setroubleshoot-3.0.38-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 09:46:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1509 0 normal SHIPPED_LIVE setroubleshoot bug fix update 2011-12-06 00:39:33 UTC

Description David Kutálek 2010-08-19 14:31:16 UTC
Description of problem:

These commands start to analyze, but hangs with 0% done:

sealert -a ./dummy-audit.log -b
sealert -a ./dummy-audit.log -s

With parameters swapped, sealert informs user these are mutually exclusive.
Therefore it seems like a bug in parameter checks.

Anyway, it would be nice to see a way how to start gui browser with custom file data. Original intention with above commands was to report alert from custom file to GSS service, which is probably not possible with current feature set.

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

setroubleshoot-server-2.2.93-1.el6.x86_64

How reproducible:

Always

Steps to Reproduce:
1a. sealert -a /var/log/audit/audit.log -b
1b. sealert -a /var/log/audit/audit.log -s

  
Actual results:


Expected results:


Additional info:

Traceback when interrupted by double Ctrl-C:

[root@timothy bz567972-create-plugin-to-talk-with-GSS-s-Support-API]# sealert -a ./dummy-audit.log -s
  0% done^CTraceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/analyze.py", line 619, in task
    new_data = os.read(self.fileno, self.read_size)
KeyboardInterrupt
^CTraceback (most recent call last):
  File "/usr/bin/sealert", line 999, in <module>
    do_analyze_logfile(logfile, html)
  File "/usr/bin/sealert", line 829, in do_analyze_logfile
    scanner.scan_file()
  File "/usr/bin/sealert", line 809, in scan_file
    self.main_loop.run()
KeyboardInterrupt

Comment 1 Milos Malik 2010-09-13 13:15:15 UTC
The same result with '-S' option instead of '-b' or '-s'.

# sealert -a /var/log/audit/audit.log -S
  0% done^CTraceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/setroubleshoot/analyze.py", line 619, in task
    new_data = os.read(self.fileno, self.read_size)
KeyboardInterrupt
^CTraceback (most recent call last):
  File "/usr/bin/sealert", line 1000, in <module>
    do_analyze_logfile(logfile, html)
  File "/usr/bin/sealert", line 830, in do_analyze_logfile
    scanner.scan_file()
  File "/usr/bin/sealert", line 810, in scan_file
    self.main_loop.run()
KeyboardInterrupt
#

Comment 2 Milos Malik 2010-09-13 13:17:21 UTC
# sealert -a /var/log/audit/audit.log -l
  0% done^CTraceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/setroubleshoot/analyze.py", line 619, in task
    new_data = os.read(self.fileno, self.read_size)
KeyboardInterrupt
^CTraceback (most recent call last):
  File "/usr/bin/sealert", line 1000, in <module>
    do_analyze_logfile(logfile, html)
  File "/usr/bin/sealert", line 830, in do_analyze_logfile
    scanner.scan_file()
  File "/usr/bin/sealert", line 810, in scan_file
    self.main_loop.run()
KeyboardInterrupt
# sealert -a /var/log/audit/audit.log -H
  0% done^CTraceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/setroubleshoot/analyze.py", line 619, in task
    new_data = os.read(self.fileno, self.read_size)
KeyboardInterrupt
^CTraceback (most recent call last):
  File "/usr/bin/sealert", line 1000, in <module>
    do_analyze_logfile(logfile, html)
  File "/usr/bin/sealert", line 830, in do_analyze_logfile
    scanner.scan_file()
  File "/usr/bin/sealert", line 810, in scan_file
    self.main_loop.run()
KeyboardInterrupt
#

Comment 3 Daniel Walsh 2010-11-22 21:25:46 UTC
I would prefer to push off setroubleshoot to see how well the redesign in Fedora 15 goes, and then update to that package in 6.2.

Comment 4 Daniel Walsh 2010-11-22 21:27:49 UTC
I would prefer to push off setroubleshoot to see how well the redesign in Fedora 15 goes, and then update to that package in 6.2.

Comment 6 Daniel Walsh 2011-05-23 18:51:19 UTC
Fixed in setroubleshoot-3.0.31-1.el6

Comment 7 Eduard Benes 2011-06-27 09:05:08 UTC
Clearing qa_ack, setroubleshoot has been removed from 6.2 approved list.

Comment 13 Miroslav Grepl 2011-09-08 08:42:37 UTC
Ok, the problem is also the new setroubleshoot does not have this ability. I think we could add it but I believe is too late for RHEL6.2.

So I would just add a "fix" which will say "do not use -a or --analyze option with other options"

Something like

        if sys.argv.count('-a') > 0:
            if valid_opts.count(sys.argv[-1]) == 0:
                last = True
+            else:
+                print >> sys.stderr, "-a or --analyze option can not be used with an other option"
+                usage()
+                sys.exit(3)

Comment 14 David Kutálek 2011-09-08 11:24:52 UTC
(In reply to comment #13)
> Ok, the problem is also the new setroubleshoot does not have this ability. I
> think we could add it but I believe is too late for RHEL6.2.
> 
> So I would just add a "fix" which will say "do not use -a or --analyze option
> with other options"

Not ideal, but still better than hang. If closing bug this way, please fill new one requesting at least -a and -b working together (seems to me usefull).

Comment 15 Miroslav Grepl 2011-09-15 08:36:30 UTC
Fixed in  setroubleshoot-3.0.38-2.el6

David,
I agree with you and I will open a new bug on RHEL6.3.

Comment 18 errata-xmlrpc 2011-12-06 09:46:31 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1509.html


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