reading casper-md5check.json fails

Bug #1922937 reported by Brian Murray
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Undecided
Brian Murray
Focal
Fix Released
Undecided
Brian Murray
Groovy
Fix Released
Undecided
Brian Murray
Hirsute
Fix Released
Undecided
Brian Murray

Bug Description

[Impact]
Bugs reported by apport are not including information about the results of the md5 check of the installation media used. Additionally, users are presented with a traceback regarding the ubuntu hook which is used with all bug reports.

[Test Case]
1) Boot an Ubuntu 20.04 LTS or Ubuntu 20.10 install
2) Create the file /var/log/installer/casper-md5check.json with mode 0600.
3) Run 'ubuntu-bug coreutils'

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
......ERROR: hook /usr/share/apport/general-hooks/ubuntu.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 228, in _run_hook
    symb['add_info'](report, ui)
  File "/usr/share/apport/general-hooks/ubuntu.py", line 84, in add_info
    apport.hookutils.attach_casper_md5check(report,
  File "/usr/lib/python3/dist-packages/apport/hookutils.py", line 995, in attach_casper_md5check
    with open(location) as json_file:
PermissionError: [Errno 13] Permission denied: '/var/log/installer/casper-md5check.json'

[Where problems could occur]
We are switching to reading the file with attach_root_command_outputs which is a well tested function in apport so the only problem would be a result of the new code being added. This works well in Hirsute so there is little chance of their being an error.

Changed in apport (Ubuntu Hirsute):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
milestone: none → ubuntu-21.04
tags: added: fr-1268
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.11-0ubuntu62

---------------
apport (2.20.11-0ubuntu62) hirsute; urgency=medium

  * apport/hookutils.py: spawn pkttyagent so that log files can be gathered as
    root in a non-graphical environment (LP: #1821415). Thanks to Iain Lane
    for the patch.
  * apport/hookutils.py: root access is needed to read the
    casper-md5check.json file so switch to using that. (LP: #1922937)
  * data/general-hooks/ubuntu.py: improving tagging of bugs from images we
    create so that they are tagged $arch-image and better identify Raspberry
    Pi devices (LP: #1920837). Thanks to Dave Jones for the patch.

 -- Brian Murray <email address hidden> Wed, 07 Apr 2021 13:14:04 -0700

Changed in apport (Ubuntu Hirsute):
status: In Progress → Fix Released
description: updated
Changed in apport (Ubuntu Focal):
status: New → In Progress
Changed in apport (Ubuntu Groovy):
status: New → In Progress
Changed in apport (Ubuntu Focal):
assignee: nobody → Brian Murray (brian-murray)
Changed in apport (Ubuntu Groovy):
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Brian, or anyone else affected,

Accepted apport into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.20.11-0ubuntu50.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in apport (Ubuntu Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-groovy
Changed in apport (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Brian, or anyone else affected,

Accepted apport into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.20.11-0ubuntu27.17 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (apport/2.20.11-0ubuntu27.17)

All autopkgtests for the newly accepted apport (2.20.11-0ubuntu27.17) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

apport/2.20.11-0ubuntu27.17 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#apport

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

With the version of apport from groovy-proposed it is possible to read the caspermd5-check.json file.

bdmurray@clean-groovy-amd64:~$ apt-cache policy python3-apport
python3-apport:
  Installed: 2.20.11-0ubuntu50.6
  Candidate: 2.20.11-0ubuntu50.6
  Version table:
 *** 2.20.11-0ubuntu50.6 500
        500 http://192.168.10.7/ubuntu groovy-proposed/main amd64 Packages
        500 http://192.168.10.7/ubuntu groovy-proposed/main i386 Packages
        100 /var/lib/dpkg/status
     2.20.11-0ubuntu50.5 500
        500 http://192.168.10.7/ubuntu groovy-updates/main amd64 Packages
        500 http://192.168.10.7/ubuntu groovy-updates/main i386 Packages
        500 http://192.168.10.7/ubuntu groovy-security/main amd64 Packages
        500 http://192.168.10.7/ubuntu groovy-security/main i386 Packages
     2.20.11-0ubuntu50 500
        500 http://192.168.10.7/ubuntu groovy/main amd64 Packages
        500 http://192.168.10.7/ubuntu groovy/main i386 Packages
bdmurray@clean-groovy-amd64:~$ ubuntu-bug coreutils

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
....==== AUTHENTICATING FOR com.ubuntu.apport.root-info ===
Authentication is required to collect system information for this problem report
Authenticating as: Ubuntu,,, (bdmurray)
Password: ...
==== AUTHENTICATION COMPLETE ===
....

tags: added: verification-done-groovy
removed: verification-needed-groovy
Revision history for this message
Brian Murray (brian-murray) wrote :

The verification also passed on focal.

bdmurray@clean-focal-amd64:~$ apt-cache policy apport
apport:
  Installed: 2.20.11-0ubuntu27.17
  Candidate: 2.20.11-0ubuntu27.17
  Version table:
 *** 2.20.11-0ubuntu27.17 500
        500 http://192.168.10.7/ubuntu focal-proposed/main amd64 Packages
        500 http://192.168.10.7/ubuntu focal-proposed/main i386 Packages
        100 /var/lib/dpkg/status
     2.20.11-0ubuntu27.16 500
        500 http://192.168.10.7/ubuntu focal-updates/main amd64 Packages
        500 http://192.168.10.7/ubuntu focal-updates/main i386 Packages
        500 http://192.168.10.7/ubuntu focal-security/main amd64 Packages
        500 http://192.168.10.7/ubuntu focal-security/main i386 Packages
     2.20.11-0ubuntu27 500
        500 http://192.168.10.7/ubuntu focal/main amd64 Packages
        500 http://192.168.10.7/ubuntu focal/main i386 Packages
bdmurray@clean-focal-amd64:~$ ubuntu-bug coreutils

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
..==== AUTHENTICATING FOR com.ubuntu.apport.root-info ===
Authentication is required to collect system information for this problem report
Authenticating as: Ubuntu,,, (bdmurray)
Password: ....
==== AUTHENTICATION COMPLETE ===
....

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (1.9 KB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C): c

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (apport/2.20.11-0ubuntu50.6)

All autopkgtests for the newly accepted apport (2.20.11-0ubuntu50.6) for groovy have finished running.
The following regressions have been reported in tests triggered by the package:

ubuntu-release-upgrader/1:20.10.15 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/groovy/update_excuses.html#apport

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for apport has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.11-0ubuntu50.6

---------------
apport (2.20.11-0ubuntu50.6) groovy; urgency=medium

  * data/general-hooks/ubuntu.py: tag bugs from Raspberry Pi images and RISCV
    images appropriately. (LP: #1920837)
  * apport/hookutils.py: spawn pkttyagent so that log files can be gathered as
    root in a non-graphical environment (LP: #1821415). Thanks to Iain Lane
    for the patch.
  * apport/hookutils.py: root access is needed to read the
    casper-md5check.json file so switch to using that. (LP: #1922937)

 -- Brian Murray <email address hidden> Mon, 26 Apr 2021 12:45:36 -0700

Changed in apport (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.11-0ubuntu27.17

---------------
apport (2.20.11-0ubuntu27.17) focal; urgency=medium

  * data/general-hooks/ubuntu.py: tag bugs from Raspberry Pi images and RISCV
    images appropriately. (LP: #1920837)
  * apport/hookutils.py: spawn pkttyagent so that log files can be gathered as
    root in a non-graphical environment (LP: #1821415). Thanks to Iain Lane
    for the patch.
  * apport/hookutils.py: root access is needed to read the
    casper-md5check.json file so switch to using that. (LP: #1922937)

 -- Brian Murray <email address hidden> Mon, 26 Apr 2021 13:28:49 -0700

Changed in apport (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.