Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1836114

Summary: tracer -it produces python traceback "AttributeError: 'str' object has no attribute 'decode'"
Product: [Fedora] Fedora Reporter: Steven Bakker <sb>
Component: tracerAssignee: Jakub Kadlčík <jkadlcik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 32CC: jkadlcik, laurent.rineau__fedora, sokeeffe
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tracer-0.7.4-1.fc32 tracer-0.7.4-1.fc31 tracer-0.7.4-1.el7 tracer-0.7.4-1.el8 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-19 01:02:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steven Bakker 2020-05-15 08:15:04 UTC
Description of problem:

Running "tracer -iat 1589528011.6932232" would allow me to see which applications need a restart since a particular package upgrade.

It lists the components that need a restart and invites me to select one for more details. When I do so, the program crashes with a python backtrace.

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

0.7.1-8

How reproducible:

Always

Steps to Reproduce:
1. Run "sudo tracer -iat 1589528011.6932232"
2. Select a component (other than kernel). In my case, I selected "8" (gjs), but YMMV.

Actual results:

Press application number for help or 'q' to quit
--> 8
Traceback (most recent call last):
  File "/usr/bin/tracer", line 34, in <module>
    tracer.main.run()
  File "/usr/lib/python3.8/site-packages/tracer/main.py", line 45, in run
    return router.dispatch()
  File "/usr/lib/python3.8/site-packages/tracer/resources/router.py", line 56, in dispatch
    controller.render_interactive()
  File "/usr/lib/python3.8/site-packages/tracer/controllers/default.py", line 109, in render_interactive
    helper_controller.print_helper(filtered[int(answer) - 1], self.args)
  File "/usr/lib/python3.8/site-packages/tracer/controllers/helper.py", line 48, in print_helper
    package = manager.provided_by(app)
  File "/usr/lib/python3.8/site-packages/tracer/resources/PackageManager.py", line 63, in provided_by
    return self.package_managers[0].provided_by(app)
  File "/usr/lib/python3.8/site-packages/tracer/packageManagers/rpm.py", line 129, in provided_by
    package = self._file_provided_by(process.exe)
  File "/usr/lib/python3.8/site-packages/tracer/packageManagers/rpm.py", line 148, in _file_provided_by
    p = Package(pkg[rpm.RPMTAG_NAME].decode())
AttributeError: 'str' object has no attribute 'decode'

Expected results:

Details on "gjs" and why/how it needs to be restarted.

Additional info:

Here's the complete command sequence:

----
$ sudo tracer -iat 1589528011.6932232

You should restart:
[1]  (sd-pam)
[2]  Keybase
[3]  cloud-drive-ui
[4]  dbus-broker
[5]  dbus-broker
[6]  firefox
[7]  flameshot
[8]  gjs
[9]  gnome-shell
[10] gnome-software
[11] gsd-color
[12] gsd-keyboard
[13] gsd-media-keys
[14] gsd-power
[15] gsd-wacom
[16] gsd-xsettings
[17] ibus-x11
[18] kernel

Press application number for help or 'q' to quit
--> 8
Traceback (most recent call last):
  File "/usr/bin/tracer", line 34, in <module>
    tracer.main.run()
  File "/usr/lib/python3.8/site-packages/tracer/main.py", line 45, in run
    return router.dispatch()
  File "/usr/lib/python3.8/site-packages/tracer/resources/router.py", line 56, in dispatch
    controller.render_interactive()
  File "/usr/lib/python3.8/site-packages/tracer/controllers/default.py", line 109, in render_interactive
    helper_controller.print_helper(filtered[int(answer) - 1], self.args)
  File "/usr/lib/python3.8/site-packages/tracer/controllers/helper.py", line 48, in print_helper
    package = manager.provided_by(app)
  File "/usr/lib/python3.8/site-packages/tracer/resources/PackageManager.py", line 63, in provided_by
    return self.package_managers[0].provided_by(app)
  File "/usr/lib/python3.8/site-packages/tracer/packageManagers/rpm.py", line 129, in provided_by
    package = self._file_provided_by(process.exe)
  File "/usr/lib/python3.8/site-packages/tracer/packageManagers/rpm.py", line 148, in _file_provided_by
    p = Package(pkg[rpm.RPMTAG_NAME].decode())
AttributeError: 'str' object has no attribute 'decode'
$
----

Comment 1 Fedora Update System 2020-06-08 04:10:34 UTC
FEDORA-EPEL-2020-140d0e644a has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-140d0e644a

Comment 2 Fedora Update System 2020-06-08 04:10:35 UTC
FEDORA-2020-2e33457aa0 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-2e33457aa0

Comment 3 Fedora Update System 2020-06-08 04:10:36 UTC
FEDORA-EPEL-2020-89299cdfbe has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-89299cdfbe

Comment 4 Fedora Update System 2020-06-08 04:10:37 UTC
FEDORA-2020-8847397947 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-8847397947

Comment 5 Fedora Update System 2020-06-11 18:19:48 UTC
tracer-0.7.4-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-89299cdfbe

Comment 6 Fedora Update System 2020-06-11 19:20:38 UTC
tracer-0.7.4-1.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-8847397947

Comment 7 Fedora Update System 2020-06-11 19:23:31 UTC
tracer-0.7.4-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-2e33457aa0

Comment 8 Fedora Update System 2020-06-11 19:24:16 UTC
tracer-0.7.4-1.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-140d0e644a

Comment 9 Fedora Update System 2020-06-19 01:02:26 UTC
FEDORA-2020-8847397947 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2020-06-23 01:12:37 UTC
FEDORA-2020-2e33457aa0 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2020-06-26 00:35:47 UTC
FEDORA-EPEL-2020-89299cdfbe has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2020-06-26 01:52:09 UTC
FEDORA-EPEL-2020-140d0e644a has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.