Bug 955840 - [abrt] setroubleshoot-server-3.2.8-1.fc19: catchall_boolean.py:59:get_if_text:TypeError: decoding Unicode is not supported
Summary: [abrt] setroubleshoot-server-3.2.8-1.fc19: catchall_boolean.py:59:get_if_text...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: setroubleshoot-plugins
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4826c831772e55fd1a1c13356ce...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-24 00:47 UTC by 王贝贝
Modified: 2013-05-26 03:42 UTC (History)
11 users (show)

Fixed In Version: setroubleshoot-plugins-3.0.52-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-26 03:42:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (889 bytes, text/plain)
2013-04-24 00:47 UTC, 王贝贝
no flags Details
File: core_backtrace (374 bytes, text/plain)
2013-04-24 00:47 UTC, 王贝贝
no flags Details
File: dso_list (78 bytes, text/plain)
2013-04-24 00:48 UTC, 王贝贝
no flags Details
File: environ (1015 bytes, text/plain)
2013-04-24 00:48 UTC, 王贝贝
no flags Details
setroubleshoot_database.xml (15.51 KB, text/xml)
2013-04-28 09:12 UTC, Vadim Rutkovsky
no flags Details
proposed fix (1.21 KB, patch)
2013-05-07 08:18 UTC, Philipp Dreimann
no flags Details | Diff

Description 王贝贝 2013-04-24 00:47:53 UTC
Version-Release number of selected component:
setroubleshoot-server-3.2.8-1.fc19

Additional info:
cmdline:        /usr/bin/python -Es /usr/bin/sealert -s
executable:     /usr/bin/sealert
kernel:         3.9.0-0.rc7.git3.1.fc19.x86_64
runlevel:       N 5
uid:            1000
ureports_counter: 1

Truncated backtrace:
catchall_boolean.py:59:get_if_text:TypeError: decoding Unicode is not supported

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/setroubleshoot/browser.py", line 674, in on_details_button_clicked
    message = alert.format_text()
  File "/usr/lib64/python2.7/site-packages/setroubleshoot/signature.py", line 551, in format_text
    txt = self.substitute(p.get_if_text(self.audit_event.records, args))
  File "/usr/share/setroubleshoot/plugins/catchall_boolean.py", line 59, in get_if_text
    txt=unicode(seobject.boolean_desc(args[0]), encoding="utf8")
TypeError: decoding Unicode is not supported

Local variables in innermost frame:
self: <plugins.catchall_boolean.plugin object at 0x61f7a90>
args: ('nis_enabled', '1', 'None')
avc: [<setroubleshoot.audit_data.AuditRecord object at 0x61eaa50>, <setroubleshoot.audit_data.AuditRecord object at 0x61eaa90>]

Comment 1 王贝贝 2013-04-24 00:47:56 UTC
Created attachment 739197 [details]
File: backtrace

Comment 2 王贝贝 2013-04-24 00:47:59 UTC
Created attachment 739198 [details]
File: core_backtrace

Comment 3 王贝贝 2013-04-24 00:48:01 UTC
Created attachment 739199 [details]
File: dso_list

Comment 4 王贝贝 2013-04-24 00:48:04 UTC
Created attachment 739200 [details]
File: environ

Comment 5 Daniel Walsh 2013-04-24 19:28:47 UTC
Could you attach /var/lib/setroubleshoot/setroubleshoot_database.xml

Comment 6 Daniel Walsh 2013-04-24 19:29:14 UTC
Dave any idea why this is breaking?

Comment 7 Vadim Rutkovsky 2013-04-28 09:12:18 UTC
Created attachment 741107 [details]
setroubleshoot_database.xml

Occurred on reporting steam selinux alert

Comment 8 Philipp Dreimann 2013-05-07 07:57:37 UTC
Description of problem:
This happens while trying to delete an alert within the alert browser.

Version-Release number of selected component:
setroubleshoot-server-3.2.8-1.fc19

Additional info:
cmdline:        /usr/bin/python -Es /usr/bin/sealert -s
executable:     /usr/bin/sealert
kernel:         3.9.0-301.fc19.x86_64
runlevel:       N 5
uid:            1000
ureports_counter: 1

Truncated backtrace:
catchall_boolean.py:59:get_if_text:TypeError: decoding Unicode is not supported

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/setroubleshoot/browser.py", line 683, in on_delete_button_clicked
    self.delete_current_alert()
  File "/usr/lib64/python2.7/site-packages/setroubleshoot/browser.py", line 694, in delete_current_alert
    self.show_current_alert()
  File "/usr/lib64/python2.7/site-packages/setroubleshoot/browser.py", line 770, in show_current_alert
    rb = self.add_row(p, alert, args)
  File "/usr/lib64/python2.7/site-packages/setroubleshoot/browser.py", line 412, in add_row
    if_text = _("If ") + alert.substitute(plugin.get_if_text(avc, args))
  File "/usr/share/setroubleshoot/plugins/catchall_boolean.py", line 59, in get_if_text
    txt=unicode(seobject.boolean_desc(args[0]), encoding="utf8")
TypeError: decoding Unicode is not supported

Local variables in innermost frame:
self: <plugins.catchall_boolean.plugin object at 0x68b2650>
args: ('mmap_low_allowed', '1', 'initrc_selinux')
avc: [<setroubleshoot.audit_data.AuditRecord object at 0x68ae310>]

Comment 9 Philipp Dreimann 2013-05-07 08:18:40 UTC
Created attachment 744568 [details]
proposed fix

This patch avoids converting unicode to unicode. Why is this happening anyway?

Comment 10 Daniel Walsh 2013-05-07 19:35:08 UTC
        txt=seobject.boolean_desc(args[0])
        if not isinstance(txt, unicode):
            txt=unicode(txt, encoding="utf8")

How about this ^^?

Comment 11 Philipp Dreimann 2013-05-08 08:03:36 UTC
(In reply to comment #10)

Sure. Looks even nicer. Shall I attach another patch or do you just commit yours?

#802113 might need a similar fix.

Comment 12 Daniel Walsh 2013-05-08 13:45:30 UTC
Fixed in setroubleshoot-plugins-3.0.52-1

Comment 13 Igor Gnatenko 2013-05-15 19:42:45 UTC
(In reply to comment #12)
> Fixed in setroubleshoot-plugins-3.0.52-1
works for me in 3.0.52-1.
Can you add this update in bodhi ?

Comment 14 Fedora Update System 2013-05-16 17:19:10 UTC
setroubleshoot-plugins-3.0.52-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/setroubleshoot-plugins-3.0.52-1.fc19

Comment 15 Fedora Update System 2013-05-17 22:21:30 UTC
Package setroubleshoot-plugins-3.0.52-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing setroubleshoot-plugins-3.0.52-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-8473/setroubleshoot-plugins-3.0.52-1.fc19
then log in and leave karma (feedback).

Comment 16 Fedora Update System 2013-05-26 03:42:26 UTC
setroubleshoot-plugins-3.0.52-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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