Bug 2185827

Summary: The packaging.log file is non-existent or empty during bug reporting.
Product: [Fedora] Fedora Reporter: Lukas Ruzicka <lruzicka>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 38CC: anaconda-maint-list, awilliam, kparal, robatino, sgallagh, vponcova, vslavik, w
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: AcceptedBlocker
Fixed In Version: anaconda-38.23.4-2.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-13 20:09:36 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: 2083912    
Attachments:
Description Flags
Error reported
none
Unknown error none

Description Lukas Ruzicka 2023-04-11 10:32:02 UTC
Created attachment 1956751 [details]
Error reported

Created attachment 1956751 [details]
Error reported

Created attachment 1956751 [details]
Error reported

Description of problem:

When I try to report a crash in Anaconda using the built-in bug report, the process ends up with an error complaining that the `packaging.log` cannot be read or is empty. The bug itself gets reported and populated but packaging.log is not added to the list.

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

How reproducible:
Always


Steps to Reproduce:
1. Use the Anaconda crash -> kill -USR1 `cat /var/run/anaconda.pid`
2. Follow the bug reporting process.
3. See the results.

Actual results:
The process always fails for packaging.log.

Expected results:
Bugs should be reported flawlessly.

Additional info:
See screenshot of Anaconda with the reported error.

Comment 1 Fedora Blocker Bugs Application 2023-04-11 10:35:19 UTC
Proposed as a Blocker and Freeze Exception for 38-final by Fedora user lruzicka using the blocker tracking app because:

 This might break the Failure reporting basic criteria, therefore proposing as a blocker. 

https://fedoraproject.org/wiki/Basic_Release_Criteria#Failure_reporting

Comment 2 Lukas Ruzicka 2023-04-11 11:17:58 UTC
The text version of the process also reports an error, but this time it is an unknown error, see shot.

Comment 3 Lukas Ruzicka 2023-04-11 11:18:23 UTC
Created attachment 1956794 [details]
Unknown error

Comment 4 Kamil Páral 2023-04-11 12:21:38 UTC
(In reply to Lukas Ruzicka from comment #3)
> Created attachment 1956794 [details]
> Unknown error

It's unfortunately localized, but the error line translates as "An unknown error occurred".

Comment 5 Kamil Páral 2023-04-11 12:49:33 UTC
It's not clear from the screenshot, but it is really the whole contents of the libreport output:

--- Running report_Bugzilla ---
Checking for duplicates
Creating a new bug
Adding attachments to bug 2185856
Failed to attach 'packaging.log' to bug # 2185856.
Server says: 400 Bad Request
{"error":true,"code":606,"documentation":"https://bugzilla.redhat.com/docs/en/html/api/index.html","message":"The file you are trying to attach is empty, does not exist, or you don't have permission to read it."}
Traceback (most recent call last):
  File "/usr/bin/reporter-bugzilla", line 801, in <module>
    attachment, new_id, response.json()['ids'][0])
                        ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'json'
('report_Bugzilla' exited with 1)


I see two problems with it:
1. It looks like it failed, when it actually reported the bug just fine (tested with bug 2185856).
2. It doesn't print the URL of the bug, so a regular users won't even know where to look.


Also, this only affects Live images (where packaging.log - and some other logs as well) are empty. It doesn't occur with non-Live images. I think the "unknown error" from comment 3 is actually a different problem.

Comment 6 Kamil Páral 2023-04-11 12:53:52 UTC
Actually, "An unknown error has occurred" is an expected header for the traceback displayed below it. It's not a bug :-) In the text mode, the bug was reported without issues, you can see the URL. Let's disregard comment 2 to 4.

Comment 7 Stephen Gallagher 2023-04-11 14:29:13 UTC
Does this happen no matter when anaconda crashes, or only if it crashes prior to the actual install proceeding?

Comment 8 Kamil Páral 2023-04-11 14:52:05 UTC
Packaging.log is empty the whole time, because DNF is not used on Live images, just rsync. I.e. it doesn't matter when anaconda crashes, the problem will occur always.

Comment 9 Adam Williamson 2023-04-11 17:16:48 UTC
I'm working on a fix for this.

Comment 10 Fedora Update System 2023-04-11 18:07:15 UTC
FEDORA-2023-6f653f9f99 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-6f653f9f99

Comment 11 Adam Williamson 2023-04-11 18:09:36 UTC
OK, sent a fix. You can test it by updating anaconda on a live boot before running it, or openQA will generate live and netinst images with the update in it soon. I tested it locally in the live case, it does appear to resolve the problem.

Comment 12 Adam Williamson 2023-04-11 18:23:36 UTC
+6 for blocker in https://pagure.io/fedora-qa/blocker-review/issue/1147 , marking accepted blocker (for now).

Comment 13 Kamil Páral 2023-04-11 20:17:55 UTC
(In reply to Fedora Update System from comment #10)
> FEDORA-2023-6f653f9f99 has been submitted as an update to Fedora 38.
> https://bodhi.fedoraproject.org/updates/FEDORA-2023-6f653f9f99

Tested in bug 2186010 , seem to work fine!

Comment 14 Fedora Update System 2023-04-11 22:15:05 UTC
FEDORA-2023-6f653f9f99 has been pushed to the Fedora 38 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-6f653f9f99

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2023-04-13 20:09:36 UTC
FEDORA-2023-6f653f9f99 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.