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 1764642 - Reporting installer crashes fails when installing from live images due to RPM header string type issue (QA:Testcase_Anaconda_save_traceback_to_bugzilla)
Summary: Reporting installer crashes fails when installing from live images due to RPM...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-meh
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Chris Lumens
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker
Depends On:
Blocks: F31FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2019-10-23 13:55 UTC by Alessio
Modified: 2019-10-24 17:09 UTC (History)
19 users (show)

Fixed In Version: python-meh-0.48-1.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-24 17:09:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
journalctl -xe -g anaconda (20.59 KB, text/plain)
2019-10-23 14:03 UTC, Alessio
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github rhinstaller python-meh pull 22 0 None None None 2019-10-23 16:27:33 UTC
Github rhinstaller python-meh pull 23 0 None None None 2019-10-23 16:27:33 UTC

Description Alessio 2019-10-23 13:55:03 UTC
RC1.8 Live image 
https://kojipkgs.fedoraproject.org/compose/31/Fedora-31-20191022.4/compose/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-31-1.8.iso

While QA:Testcase_Anaconda_traceback_debug_mode (GUI mode) passed, performing QA:Testcase_Anaconda_save_traceback_to_bugzilla (GUI mode) fails.

Nothing happens hitting "Report Bug". Or better, the related window disappears.

In the terminal this exception is fired:

Traceback (most recent call last):
  File "/usr/lib64/python3.7/site-packages/pyanaconda/exception.py", line 119, in _main_loop_handleException
    super().handleException(dump_info)
  File "/usr/lib/python3.7/site-packages/meh/handler.py", line 123, in handleException
    responseHash[rc](dump_info.exc_info)
  File "/usr/lib/python3.7/site-packages/meh/handler.py", line 223, in runSave
    params.update(self.exn.environment_info)
  File "/usr/lib/python3.7/site-packages/meh/dump.py", line 262, in environment_info
    return self._get_environment_info()
  File "/usr/lib/python3.7/site-packages/meh/dump.py", line 235, in _get_environment_info
    pkg_info, component = get_package_and_component()
  File "/usr/lib/python3.7/site-packages/meh/dump.py", line 158, in get_package_and_component
    pkg_info = PackageInfo(header["name"].decode("utf-8"), header["version"].decode("utf-8"),
AttributeError: 'str' object has no attribute 'decode'



Such test case is reported as working using Server DVD.

Comment 1 Alessio 2019-10-23 13:56:04 UTC
Anaconda versions:

[liveuser@localhost-live ~]$ rpm -qa|grep anaconda
anaconda-live-31.22.6-2.fc31.x86_64
anaconda-widgets-31.22.6-2.fc31.x86_64
anaconda-gui-31.22.6-2.fc31.x86_64
anaconda-31.22.6-2.fc31.x86_64
anaconda-tui-31.22.6-2.fc31.x86_64
libreport-anaconda-2.10.1-2.fc31.x86_64
anaconda-user-help-26.1-10.fc31.noarch
anaconda-core-31.22.6-2.fc31.x86_64
kdump-anaconda-addon-005-5.20190103gitb16ea2c.fc31.noarch
anaconda-install-env-deps-31.22.6-2.fc31.x86_64

Comment 2 Alessio 2019-10-23 14:03:16 UTC
Created attachment 1628466 [details]
journalctl -xe -g anaconda

Result of journalctl -xe -g anaconda

Comment 3 Alessio 2019-10-23 14:05:37 UTC
[liveuser@localhost-live ~]$ rpm -qa |grep libreport
libreport-fedora-2.10.1-2.fc31.x86_64
python3-libreport-2.10.1-2.fc31.x86_64
libreport-gtk-2.10.1-2.fc31.x86_64
libreport-filesystem-2.10.1-2.fc31.noarch
libreport-plugin-reportuploader-2.10.1-2.fc31.x86_64
libreport-cli-2.10.1-2.fc31.x86_64
libreport-anaconda-2.10.1-2.fc31.x86_64
libreport-2.10.1-2.fc31.x86_64
libreport-plugin-ureport-2.10.1-2.fc31.x86_64
libreport-plugin-logger-2.10.1-2.fc31.x86_64
libreport-plugin-systemd-journal-2.10.1-2.fc31.x86_64
libreport-web-2.10.1-2.fc31.x86_64
libreport-plugin-bugzilla-2.10.1-2.fc31.x86_64
libreport-plugin-kerneloops-2.10.1-2.fc31.x86_64

Comment 4 Fedora Blocker Bugs Application 2019-10-23 14:06:47 UTC
Proposed as a Blocker for 31-final by Fedora user alciregi using the blocker tracking app because:

 The installer must be able to report failures to Bugzilla, with appropriate information included.

Comment 5 Lukas Ruzicka 2019-10-23 14:14:54 UTC
I was able to reproduce it on a WS Live installation, the traceback looked pretty much the same, so I am not including it here.
I also tried again with the Server DVD and was able to report Anaconda failure to Bugzilla, see #1764649.

Comment 6 Martin Kolman 2019-10-23 14:27:33 UTC
Traceback (most recent call last):
  File "/usr/lib64/python3.7/site-packages/pyanaconda/exception.py", line 119, in _main_loop_handleException
    super().handleException(dump_info)
  File "/usr/lib/python3.7/site-packages/meh/handler.py", line 123, in handleException
    responseHash[rc](dump_info.exc_info)
  File "/usr/lib/python3.7/site-packages/meh/handler.py", line 223, in runSave
    params.update(self.exn.environment_info)
  File "/usr/lib/python3.7/site-packages/meh/dump.py", line 262, in environment_info
    return self._get_environment_info()
  File "/usr/lib/python3.7/site-packages/meh/dump.py", line 235, in _get_environment_info
    pkg_info, component = get_package_and_component()
  File "/usr/lib/python3.7/site-packages/meh/dump.py", line 158, in get_package_and_component
    pkg_info = PackageInfo(header["name"].decode("utf-8"), header["version"].decode("utf-8"),
AttributeError: 'str' object has no attribute 'decode'

That looks like python-meh will need to be adjusted to a semi-recent DNF change where they unified how they return strings.

Comment 7 Adam Williamson 2019-10-23 16:02:29 UTC
I guess you mean: https://github.com/rpm-software-management/rpm/commit/84920f898315d09a57a3f1067433eaeb7de5e830#diff-33c080669e7074507f1860a9e782d82c ?

Panu, j'accuse again: apparently this was not true - "In the almost ten years of rpm sort of supporting Python 3 bindings, quite obviously nobody has actually tried to use them." :)

It looks to me like this is going to fail any time the RPM header query finds something. And, thinking about it, that makes sense - because in the installer environment, we're never going to find the package a given file belongs to (which is what we're doing here) because we don't actually have an RPM database, really, the installer environment doesn't really have "packages installed". I just confirmed this by doing this:

import rpm
ts = rpm.TransactionSet()
mi = ts.dbMatch('basenames', '/usr/bin/xz')
next(mi)

on an installed system that gives you a result (an rpm.hdr object), but run in the installer environment it gives you StopIteration, i.e. it didn't find anything, even though /usr/bin/xz is present in both cases. In the installer environment it isn't seen as being part of an installed package.

I believe https://github.com/rhinstaller/python-meh/pull/22 should fix this.

Comment 8 Martin Kolman 2019-10-23 16:12:41 UTC
What about:
https://github.com/rhinstaller/python-meh/pull/23

I think that one looks nicer. ;-)

Comment 9 Adam Williamson 2019-10-23 16:22:45 UTC
comments in the review.

Comment 10 Adam Williamson 2019-10-23 16:27:34 UTC
I just tested and both #22 and #23 do solve the problem.

Comment 11 Kamil Páral 2019-10-23 16:53:21 UTC
+1 blocker per criterion cited in comment 4 [1]
[1] https://fedoraproject.org/wiki/Basic_Release_Criteria#Failure_reporting

Comment 12 Adam Williamson 2019-10-23 17:10:44 UTC
+1 blocker for me too. The criterion is violated for any live install, which seems a broad enough violation to block on.

Comment 13 Fedora Update System 2019-10-23 17:18:18 UTC
FEDORA-2019-81b2f42200 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-81b2f42200

Comment 14 Kamil Páral 2019-10-23 17:33:05 UTC
(In reply to Fedora Update System from comment #13)
> FEDORA-2019-81b2f42200 has been submitted as an update to Fedora 31.
> https://bodhi.fedoraproject.org/updates/FEDORA-2019-81b2f42200

I was able to successfully report a crash after applying this update.

Comment 15 Ben Cotton 2019-10-23 17:57:27 UTC
+1 blocker

Comment 16 Mohan Boddu 2019-10-23 18:56:52 UTC
+1 Blocker

Comment 17 František Zatloukal 2019-10-23 19:20:53 UTC
+1 Blocker

Comment 18 Adam Williamson 2019-10-23 19:28:48 UTC
We're up to like +5/-0 now, so let's call this accepted.

Comment 19 Alessio 2019-10-24 07:36:17 UTC
Tested on RC1.9 and it works.
Thanks.

Comment 20 Fedora Update System 2019-10-24 17:09:56 UTC
python-meh-0.48-1.fc31 has been pushed to the Fedora 31 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.