Bug 630788

Summary: setroubleshoot browser cannot report alerts leaving an error in /var/log/messages
Product: Red Hat Enterprise Linux 6 Reporter: Kenichi Takemura <ktakemur>
Component: setroubleshootAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: ebaak, ksrot, mmalik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: setroubleshoot-3.0.31-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 09:48:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 581971    
Attachments:
Description Flags
xml file requested none

Description Kenichi Takemura 2010-09-07 00:52:13 UTC
Description of problem:

As I produce SELinux alert and click 'show' to bring up setroubleshoot browser but the browser shows no alert instead of showing the alert.

I noticed following error in /var/log/messages

Sep  7 09:44:35 dhcp-1-200 setroubleshoot: [rpc.ERROR] exception parserError: xmlParseDoc() failed#012Traceback (most recent call last):#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/rpc.py", line 942, in handle_client_io#012    self.receiver.feed(data)#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/rpc.py", line 764, in feed#012    self.process()#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/rpc.py", line 756, in process#012    self.dispatchFunc(self.header, self.body)#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/rpc.py", line 974, in default_request_handler#012    self.handle_return(type, rpc_id, body)#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/rpc.py", line 960, in handle_return#012    interface, method, args = convert_rpc_xml_to_args(body)#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/rpc.py", line 142, in convert_rpc_xml_to_args#012    doc = libxml2.parseDoc(cmd)#012  File "/usr/lib/python2.6/site-packages/libxml2.py", line 1263, in parseDoc#012    if ret is None:raise parserError('xmlParseDoc() failed')#012parserError: xmlParseDoc() failed


Version-Release number of selected component (if applicable):
RHEL6.0-RC-1

# rpm -qa | grep setroub
setroubleshoot-server-2.2.94-1.el6.i686
setroubleshoot-plugins-2.1.60-1.el6.noarch
setroubleshoot-2.2.94-1.el6.i686


How reproducible:
always

Steps to Reproduce:
1. Produce a SELinux alert(I did for httpd)
2. Click 'show' in a SELinux alert dialog
3. Confirm setrobleshoot browser
  
Actual results:
Browser shows 0 alert

Expected results:
Browser shows the alert detected.

Additional info:

Comment 2 Daniel Walsh 2010-09-07 18:34:56 UTC
Please attach your /var/lib/setroubleshoot/audit_listener_database.xml

Comment 3 Kenichi Takemura 2010-09-08 23:40:38 UTC
Created attachment 446103 [details]
xml file requested

Comment 4 Milos Malik 2010-09-14 14:07:21 UTC
I'm able to reproduce this bug too.

Sep 14 15:31:00 localhost setroubleshoot: [rpc.ERROR] exception UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: invalid data#012Traceback (most recent call last):#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/rpc.py", line 942, in handle_client_io#012    self.receiver.feed(data)#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/rpc.py", line 764, in feed#012    self.process()#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/rpc.py", line 756, in process#012    self.dispatchFunc(self.header, self.body)#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/rpc.py", line 974, in default_request_handler#012    self.handle_return(type, rpc_id, body)#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/rpc.py", line 963, in handle_return#012    self.process_async_return(async_rpc)#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/rpc.py", line 811, in process_async_return#012    callback(*async_rpc.return_args)#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/browser.py", line 773, in first_load#012    self.show_current_alert()#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/browser.py", line 589, in show_current_alert#012    self.show_alert(alert)#012  File "/usr/lib/python2.6/site-packages/setroubleshoot/browser.py", line 689, in show_alert#012    date_text = _("<span foreground='#555555'>%s on %s</span>") % (self.time_since_days(alert_date, TimeStamp()), alert_date.format(date_format))#012UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: invalid data

Comment 5 Daniel Walsh 2010-11-22 21:27:48 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 7 Daniel Walsh 2011-05-23 18:51:18 UTC
Fixed in setroubleshoot-3.0.31-1.el6

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

Comment 13 Karel Srot 2011-10-31 12:14:15 UTC
I have retested this bug with setroubleshoot-3.0.38-2.1.el6. 

setroubleshoot package changed the xml database format after the rebase. Now, /var/lib/setroubleshoot/setroubleshoot_database.xml database doesn't contain translated content. It is translated in the sealert application (although the translation is not complete, bug 575686).

Comment 15 errata-xmlrpc 2011-12-06 09:48:53 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