Regression: Kernel 3.2.0-39 misreads DMI on some machines, disables ACPI

Bug #1161134 reported by Maciej Puzio
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

This report concerns changes introduced to file linux-3.2/drivers/firmware/dmi_scan.c as a result of backport of patches as described in bug #1117693, specifically: "drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists". This modification has been introduced in kernel 3.2.0-39, as of this writing the newest kernel for Ubuntu 12.04 LTS. The new logic attempts to read SMBIOS entry point structure, failing back to DMI entry point structure if SMBIOS structure is not present. However, if SMBIOS structure is present but invalid (as happens on older machines), the new logic fails to properly handle such a case (please see attached patch for details). As a result DMI information is read incorrectly, and ACPI is disabled.

Workarounds:
1. Revert to kernel 3.2.0-38, or:
2. Pass acpi=force as kernel boot parameter.

# uname -a
Linux time 3.2.0-39-generic-pae #62-Ubuntu SMP Wed Feb 27 22:25:11 UTC 2013 i686 i686 i386 GNU/Linux
# lsb_release -rd
Description: Ubuntu 12.04.2 LTS
Release: 12.04

Additional notes:
As benign as this issue may seem, it resulted in a routine kernel update disabling one of my servers. This machine, being past its prime, was relegated to a nightly backup duty. The machine would wake up at 3am every night, perform a backup, then set an alarm for 3:00 next day (using /sys/class/rtc/rtc0/wakealarm) and power off. After a routine update from kernel 3.2.0-38 to 3.2.0-39 the machine ceased to function: it would remain powered but shut down, and would not perform nightly backups. An investigation revealed that the machine reported its SMBIOS structure as being 32 bytes long, while SMBIOS specification requires that value to be 31. Apart from this extra byte the structure was perfectly valid, but this was enough to make validation in dmi_scan.c fail. This resulted in a string of events that disabled the machine: the code assumed that SMBIOS structure was invalid, then proceeded to read the DMI structure, but failed to do so because of the bug described here. Not having the DMI BIOS year, ACPI was disabled, and the wake alarm was not set when requested. As a result the machine did not wake up when it was supposed to, and failed to perform its main function.

Patch has been tested on three machines, including the affected one.

Revision history for this message
Maciej Puzio (maciej-puzio) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1161134

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: precise
Revision history for this message
Maciej Puzio (maciej-puzio) wrote :

In response to the above automatic message:
Invoking apport-collect yields the following message: "ERROR: connecting to Launchpad failed: [Errno 110] Connection timed out". This is likely due to the affected machine being behind the corporate firewall. None of the usual ways of passing proxy information (e.g. http(s)_proxy variables) was able to go around this error.

Changing status to 'Confirmed', as no assistance in diagnosing the problem is needed and the solution in form of a kernel patch has already been included in the bug report.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
tags: added: patch
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key
Revision history for this message
Julian Wiedmann (jwiedmann) wrote :

Maciej Puzio,

could you please test the latest kernel in -updates (3.2.0-41.66) and confirm that this bug is fixed? Thanks.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Maciej Puzio (maciej-puzio) wrote :

I tested the latest kernel on the affected machine and can confirm that the bug is fixed. The affected machine correctly reads "legacy DMI" information and ACPI works without acpi=force boot parameter.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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