dump_acpi_tables.py: fix incorrect output and change format

Bug #1883027 reported by Alex Hung
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apport
Fix Released
Undecided
Unassigned
apport (Ubuntu)
Fix Released
Medium
Brian Murray
Focal
Fix Released
Medium
Brian Murray
Groovy
Fix Released
Medium
Brian Murray

Bug Description

[Impact]

  dump_acpi_tables.py does not always generate 4-char table names (which is defined by ACPI spec), and it can miss or duplicate data of ACPI tables in /sys/firmware/acpi/tables.

[Test Case]
  Tested with ACPI tables from Dell's Precision 3530. The outputs are almost the same as ones from "acpidump". The difference is the order of ACPI tables in the output but the order is not important.

  1. run dump_acpi_tables.py
  2. run acpidump
  3. compare the outputs

  Note: acpidump is from acpica-tools

[Regression Potential]

  Formats were changed to be the same as outputs from "acpidump", but known tools, such as acpiexec and fwts, by default reads outputs from acpidump and they do not reply on spaces and upper/lower cases.

[Other Info]

  See original bug reports as below:

dump_acpi_tables.py generates log files that is similar as the output from "acpidump" in acpica-tools. The output can be passed to other utilities in acpica-tools and fwts.

It, however, has some subtle differences and some errors.

Summary:

1. ACPI tables have 4-char signatures - meaning SSDT's are SSDT, not SSDT1, SSDT2 and so on. Each table is unique by its table ID.

Original:
  SSDT1, SSDT2, SSDT3 ...

Changed:
  SSDT, SSDT, SSDT ...

2. (Minor) acpidump outputs are all in upper cases

3. (Minor) acpidump offset are aligned by data, not address

Original:
  FFF0: 53 41 56 43 52 44 43 41 4E 43 52 4E 72 4E 50 4D SAVCRDCANCRNrNPM
  10000: 56 0A 04 00 0C FC FF FF FF 0A 03 0A 03 52 44 43 V............RDC

Changed:
    FFF0: 53 41 56 43 52 44 43 41 4E 43 52 4E 72 4E 50 4D SAVCRDCANCRNrNPM
   10000: 56 0A 04 00 0C FC FF FF FF 0A 03 0A 03 52 44 43 V............RDC

4. (Bug) dump_acpi_tables.py generates an extra line when data sizes are multiple of 16 bytes

Original:
    05F0: 30 30 0B 00 08 00 A4 48 50 53 44 A4 53 50 53 44 00.....HPSD.SPSD
    05F0: 30 30 0B 00 08 00 A4 48 50 53 44 A4 53 50 53 44 00.....HPSD.SPSD

Corrected:
    05F0: 30 30 0B 00 08 00 A4 48 50 53 44 A4 53 50 53 44 00.....HPSD.SPSD

5. (Bug) dump_acpi_tables.py misses an line when data sizes are multiple of 15 bytes

Original:
    07E0: 42 0A 87 5C 2F 03 5F 53 42 5F 55 42 54 43 43 43 B..\/._SB_UBTCCC

Corrected:
    07E0: 42 0A 87 5C 2F 03 5F 53 42 5F 55 42 54 43 43 43 B..\/._SB_UBTCCC
    07F0: 49 33 86 5C 2E 5F 53 42 5F 55 42 54 43 0A 80 I3.\._SB_UBTC..

Revision history for this message
Alex Hung (alexhung) wrote :

Updated version of dump_acpi_tables.py

Revision history for this message
Alex Hung (alexhung) wrote :

Patches for each change

description: updated
description: updated
Changed in apport (Ubuntu Focal):
status: New → Triaged
status: Triaged → Confirmed
Changed in apport (Ubuntu Groovy):
status: New → Confirmed
Changed in apport:
status: New → Confirmed
Mathew Hodson (mhodson)
Changed in apport (Ubuntu Focal):
importance: Undecided → Medium
Changed in apport (Ubuntu Groovy):
importance: Undecided → Medium
tags: added: rls-ff-incoming
Changed in apport (Ubuntu Groovy):
status: Confirmed → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Brian Murray (brian-murray) wrote :

Could you please add some SRU information to the bug description so the SRU team can prcoess an upload of this update?

Revision history for this message
Alex Hung (alexhung) wrote :

@brian-murray,

Bug description is updated. Please keep me posted if it needs more information. Thanks

description: updated
description: updated
Changed in apport (Ubuntu Focal):
assignee: nobody → Brian Murray (brian-murray)
status: Confirmed → In Progress
tags: removed: rls-ff-incoming
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * Fix pep8 errors regarding ambiguous variables.

 -- Brian Murray <email address hidden> Wed, 24 Jun 2020 09:15:51 -0700

Changed in apport (Ubuntu Groovy):
status: In Progress → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Alex, 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.4 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: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Alex Hung (alexhung) wrote :

Proposed package is tested (version below) and this fixes dump_acpi_tables.py.

~$ lsb_release -c ; apt-cache policy apport
Codename: focal
apport:
  Installed: 2.20.11-0ubuntu27.4
  Candidate: 2.20.11-0ubuntu27.4

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
tags: added: verification-needed
removed: verification-done
tags: added: verification-done
removed: verification-needed
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-0ubuntu27.4

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

  [ Lukas Märdian ]
  * Backport snap handling for ubuntu-bug from Groovy (LP: #1861082)
  * Build-depend on python3-requests-unixsocket.

  [ Brian Murray ]
  * data/dump_acpi_tables.py: update the output thanks to Alex Hung for the
    patch. (LP: #1883027)

 -- Brian Murray <email address hidden> Wed, 24 Jun 2020 09:57:22 -0700

Changed in apport (Ubuntu Focal):
status: Fix Committed → Fix Released
Benjamin Drung (bdrung)
Changed in apport:
status: Confirmed → 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.