Bug 1199263

Summary: anaconda crash handling fails if any related package has an epoch due to bad handling of epochs in python-meh
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: python-mehAssignee: Vratislav Podzimek <vpodzime>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 22CC: danofsatx, mkolman, mruckman, robatino, satellitgo, sgallagh, vpodzime
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: AcceptedBlocker
Fixed In Version: python-meh-0.36-1.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-07 00:08:27 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:
Bug Depends On:    
Bug Blocks: 1043121    

Description Adam Williamson 2015-03-05 18:48:59 UTC
See https://lists.fedorahosted.org/pipermail/anaconda-patches/2015-March/016411.html .

Since 0.34 python-meh assumed all RPM header fields were strings but in fact epoch is a long. This breaks anaconda crash reporting when any 'involved' package has an epoch. You click 'Submit report' and anaconda goes grey, then...nothing else happens (unless you spot whatever console the python-meh traceback is printed on).

Notably, python-blivet has an epoch, so this likely affects any case where the crash is in blivet.

We tested this by making python-blivet crash artificially in doAutoPartition() . When you do that and try to report the crash, it does not work.

Proposing as an Alpha blocker: https://fedoraproject.org/wiki/Fedora_22_Alpha_Release_Criteria#Failure_reporting - "The installer must be able to report failures to Bugzilla, with appropriate information included."

It's a *bit* arguable since crashes which don't involve blivet (or any other package with an epoch) can be successfully reported, so this is a conditional violation, and it's a question of how significant we think it is.

Comment 1 Adam Williamson 2015-03-05 18:49:59 UTC
For Posterity, the traceback you see when this happens is:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/exception.py", line 86, in _main_loop_handleException
    super(AnacondaExceptionHandler, self).handleException(dump_info)
  File "/usr/lib/python2.7/site-packages/meh/handler.py", line 123, in handleException
    responseHash[rc](dump_info.exc_info)
  File "/usr/lib/python2.7/site-packages/meh/handler.py", line 223, in runSave
    params.update(self.exn.environment_info)
  File "/usr/lib/python2.7/site-packages/meh/dump.py", line 263, in environment_info
    return self._get_environment_info()
  File "/usr/lib/python2.7/site-packages/meh/dump.py", line 241, in _get_environment_info
    other_packages = ", ".join(get_other_packages(self))
  File "/usr/lib/python2.7/site-packages/meh/dump.py", line 199, in get_other_packages
    pkg_info = get_package_and_component(fn)[0]
  File "/usr/lib/python2.7/site-packages/meh/dump.py", line 160, in get_package_and_component
    header["epoch"].decode("utf-8") if header["epoch"] else "0",
AttributeError: 'long' object has no attribute 'decode'

Comment 2 Dennis Gilmore 2015-03-05 18:59:42 UTC
+1 we really need to be able to have bugs reported.

Comment 3 Stephen Gallagher 2015-03-05 19:04:32 UTC
I'm -1 to a blocker. The criterion doesn't mandate that every possible crash can be reported (I realize that's a bit of a fudge, but it's not like we can report a kernel panic or a network failure either...)

I'd be +1 to FE though, if RC1 doesn't get green-lit.

Comment 4 Kevin Fenzi 2015-03-05 19:05:17 UTC
+1 blocker.

Comment 5 Adam Williamson 2015-03-05 19:07:16 UTC
sgallagh: we can actually re-do RC1 with this; mkolman is going to do a quick build with the fix for it, and dgilmore is still around to refire the compose.

Comment 6 Adam Williamson 2015-03-05 19:07:57 UTC
For the record I've tested the fix by hand-editing python-meh in a live image, and it looks good (I also tested that it doesn't break the negative case, where no epoch is involved).

Comment 7 Mike Ruckman 2015-03-05 19:10:50 UTC
+1 blocker, since it does actually violate the criteria and we have a fix and can refire the build. If it was going to lead to us slipping I would have leaned more towards -1 with the same logic as sgallagh.

Comment 8 Dan Mossor [danofsatx] 2015-03-05 19:34:58 UTC
+1. Read Mike's response for the reasoning.

Comment 9 Stephen Gallagher 2015-03-05 19:36:38 UTC
After a long conversation on IRC, I'm going to change my vote to +0. I can't make myself believe this is a true blocker, but I'm not going to stand in the way.

Comment 10 Fedora Update System 2015-03-05 19:37:01 UTC
python-meh-0.36-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/python-meh-0.36-1.fc22

Comment 11 Adam Williamson 2015-03-05 20:07:56 UTC
I count +4 (not including myself) here, with votes from QA, releng and dev (sgallagh), so that makes this a blocker. Will file RC1 respin request shortly.

Comment 12 Adam Williamson 2015-03-06 20:16:30 UTC
The update was pulled into RC3 and I verified the fix in testing. Setting VERIFIED. Thanks a lot for the quick response on this!

Comment 13 Fedora Update System 2015-03-07 00:08:27 UTC
python-meh-0.36-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.