/usr/share/apport/dump_acpi_tables.py:PermissionError:/usr/share/apport/dump_acpi_tables.py@59:dump_acpi_tables:dump_acpi_table

Bug #1895865 reported by errors.ubuntu.com bug bridge
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Brian Murray
Focal
Fix Released
High
Brian Murray
Groovy
Fix Released
High
Brian Murray

Bug Description

Impact
------
Users running /usr/share/apport/dump_acpi_tables.py will receive a Traceback unless it is called by root.

Test Case
---------
1) Run /usr/share/apport/dump_acpi_tables.py
2) Observe the Traceback in comment #1

Additionally, running 'ubuntu-bug' about a package which calls attach_hardware (which then calls dump_acpi_tables.py) will have a Traceback in acpidump.

1) Run 'ubuntu-bug udev'
2) Save the report
3) View the report and see the Traceback from comment #1 in it

With the version of the package from -proposed you will not receive a Traceback in either situation.

Regression Potential
--------------------
If the python is bad we could have a different crash.

Original Description
--------------------
The Ubuntu Error Tracker has been receiving reports about a problem regarding apport. This problem was most recently seen with package version 2.20.11-0ubuntu45, the problem page at https://errors.ubuntu.com/problem/ad705c1a5e4068bcae9d4261519bac8fac5cb57f contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

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

Here's one Traceback about this issue:

Traceback (most recent call last):
  File "/usr/share/apport/dump_acpi_tables.py", line 59, in <module>
    dump_acpi_tables('/sys/firmware/acpi/tables', sys.stdout)
  File "/usr/share/apport/dump_acpi_tables.py", line 55, in dump_acpi_tables
    dump_acpi_table(pathname, tablename, out)
  File "/usr/share/apport/dump_acpi_tables.py", line 11, in dump_acpi_table
    f = open(filename, 'rb')
PermissionError: [Errno 13] Permission denied: '/sys/firmware/acpi/tables/SSDT4'

Changed in apport (Ubuntu Groovy):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
apport (2.20.11-0ubuntu47) groovy; urgency=medium

  [ Tiago Stürmer Daitx ]
  * apport/ui.py: improve message when origin check fails as it can be
    caused by empty apt list - candidate is limited to dpkg and we can't
    tell where it came from. (LP: #1775219)

 -- Brian Murray <email address hidden> Mon, 21 Sep 2020 15:02:17 -0700

Changed in apport (Ubuntu Groovy):
status: In Progress → Fix Released
Changed in apport (Ubuntu Focal):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Brian Murray (brian-murray)
Changed in apport (Ubuntu Focal):
status: Triaged → In Progress
Revision history for this message
Robie Basak (racb) wrote :

This needs SRU information please.

I'm also puzzled by comment 2, which doesn't seem to describe the same issue as the upload in Focal. Did some bug numbers get confused?

Changed in apport (Ubuntu Focal):
status: In Progress → Incomplete
Revision history for this message
Brian Murray (brian-murray) wrote :

Regarding comment #2 this was fixed in apport version 2.20.11-0ubuntu46 but that was likely stuck in -proposed for some reason and didn't migrate. Then ubuntu47 did migrate and this got closed but the janitor only comments with the most recent changelog entry.

description: updated
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello errors.ubuntu.com, 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.10 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.

Changed in apport (Ubuntu Focal):
status: Incomplete → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Brian Murray (brian-murray) wrote :

The verification passed as we can see there was no Traceback and it asked for root permissions to run the command.

bdmurray@clean-focal-amd64:~$ dpkg -l apport
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-====================-============-==================================================
ii apport 2.20.11-0ubuntu27.10 all automatically generate crash reports for debugging
bdmurray@clean-focal-amd64:~$ /usr/share/apport/dump_acpi_tables.py
bdmurray@clean-focal-amd64:~$ ubuntu-bug udev

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
...==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/usr/share/apport/dump_acpi_tables.py' as the super user

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Chris Halse Rogers (raof) 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-0ubuntu27.10

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

  * apport/hookutils.py: call dump_acpi_tables.py with root_command_output
    thereby avoiding a PermissionError. (LP: #1895865)
  * data/dump_acpi_tables.py: If the user cannot read the acpi tables don't
    try and print them. (LP: #1895865)

 -- Brian Murray <email address hidden> Mon, 28 Sep 2020 08:47:49 -0700

Changed in apport (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Goury (madoo) wrote :

It is not fixed.

20.04.2, apport 2.20.11-0ubuntu27.18

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.