update-intel-microcode crashed with KeyError in getmember(): "filename u'microcode-20110428.dat' not found"

Bug #783239 reported by Moritz Naumann
172
This bug affects 19 people
Affects Status Importance Assigned to Milestone
microcode.ctl (Ubuntu)
Fix Released
Medium
Stefano Rivera
Natty
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: microcode.ctl

It looks like the update-intel-microcode python script which replaced the old bash script runs into some trouble parsing the JSON file Intel provides, and so microcode updates fail on Linux... again. :-/

I'm sure it would be so easy for Intel to provide a stable interface which would allow for retrieving this information in a proper and reliable way, they /just/ need to do this... ;-)

== SRU Test Case ==

1. Install microcode.ctl
Success: "successfully downloaded Intel ... microcode
Failure: Fails to instal with a traceback including KeyError

ProblemType: Crash
DistroRelease: Ubuntu 11.04
Package: microcode.ctl 1.17-13ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-9.43-generic 2.6.38.4
Uname: Linux 2.6.38-9-generic x86_64
Architecture: amd64
Date: Mon May 16 01:43:22 2011
ExecutablePath: /usr/sbin/update-intel-microcode
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
InterpreterPath: /usr/bin/python2.7
ProcCmdline: /usr/bin/python /usr/sbin/update-intel-microcode
ProcEnviron:
 LANGUAGE=de_DE:en
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/sbin/update-intel-microcode']
SourcePackage: microcode.ctl
Title: update-intel-microcode crashed with KeyError in getmember(): "filename u'microcode-20110428.dat' not found"
UpgradeStatus: Upgraded to natty on 2011-04-09 (36 days ago)
UserGroups:

Revision history for this message
Moritz Naumann (mnaumann) wrote :
visibility: private → public
Revision history for this message
Moritz Naumann (mnaumann) wrote :

For what it's worth, the latest microcode update seems to be the one dated 2011-04-28 (DwnldID=20050) as available at
http://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=20050
(or at hxxp://downloadmirror.intel.com/20050/eng/microcode-20110428.tgz bypassing the license screen).

Manual instructions as a workaround:
Downloading this archive and extract the microcode.ctl file it contains, then store this file at /usr/share/misc/intel-microcode.dat (optionally after moving the previous version out of the place). Then optionally run "microcode_ctl -u" to apply (or reboot).
This file, microcode_ctl and a hook to execute microcode_ctl should probably be included in an initrd so that it is loaded early in the boot process (but this is really beyond this bug report).

Revision history for this message
Apport retracing service (apport) wrote : This bug is a duplicate

Thank you for taking the time to report this crash and helping to make Ubuntu better. This particular crash has already been reported and is a duplicate of bug #790073, so is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Please continue to report any other bugs you may find.

tags: removed: need-duplicate-check
Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Since other bug is private I think it's more correct to mark private bug as a duplicate of this public bug.

Changed in microcode.ctl (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel J Blueman (danielblueman) wrote :

Intel changed in internal filename of the microcode. I've fixed this in the attached debdiff.

SRU justification:
- impact: inability to update to current Intel microcode, ie regression from previous
- addressed: simple, low risk fix to update to Intel's new firmware naming convention within downloaded tar file
- patch: see attached debdiff
- reproducer: 1. sudo update-intel-microcode 2. <observe failure>
- regression potential: none, since already fatally regressed

Revision history for this message
Daniel J Blueman (danielblueman) wrote :
Changed in microcode.ctl (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Daniel J Blueman (danielblueman)
Revision history for this message
Stefano Rivera (stefanor) wrote :

Before we can SRU this, it needs to be fixed in oneiric.

Daniel: Is that patch appropriate for oneiric?

Revision history for this message
Daniel J Blueman (danielblueman) wrote :

Hi Stefano - yes, the patch is good for oneiric (as both use the same package [1]), so addresses the issue in both releases. Thanks for your help!

[1] http://archive.ubuntu.com/pool/multiverse/m/microcode.ctl/

Revision history for this message
Stefano Rivera (stefanor) wrote :

I was actually looking at merges that needed doing, that I'd sponsored, and so came across this.
In future, you can catch sponsor attention by subscribing 'ubuntu-sponsors'. The SRU team don't tend to respond until there's an upload awaiting their approval.

I see there's a newer version available in Debian sid. Is it worth merging in while we are at it?
https://wiki.ubuntu.com/UbuntuDevelopment/Merging

Revision history for this message
Laurent Bigonville (bigon) wrote :

What the status of this bug?

Should it require a sponsorship or something?

Revision history for this message
Uqbar (uqbar) wrote :

I don't really understand this status of "floating in the void".
Is it fixable without asking Intel do make changes on their side?
If so, please do what's needed.
If not, please modify the update-intel-microcode program to force users to do it manually.
Having non working stuff you cannot fix is really bad from any point of view.

tags: added: bugpattern-needed
Gary M (garym)
tags: added: oneiric
Gary M (garym)
tags: added: patch
Revision history for this message
Stefano Rivera (stefanor) wrote :

Prepared this myself.

Changed in microcode.ctl (Ubuntu):
importance: Undecided → Medium
Changed in microcode.ctl (Ubuntu):
assignee: Daniel J Blueman (danielblueman) → Stefano Rivera (stefanor)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package microcode.ctl - 1.17-13.1ubuntu1

---------------
microcode.ctl (1.17-13.1ubuntu1) oneiric; urgency=low

  [ Stefano Rivera ]
  * Merge from Debian unstable. Remaining changes:
    - debian/{templates,microcode.ctl.config}: Default to downloading
      microcode, and reduce the debconf priority on this question to medium.
      (LP: #604257)
    - Rewrote update-intel-microcode script to robustly parse and
      download updated microcode correctly (LP: #569488)
    - update-intel-microcode: Do not eval() code from the Internet, and use
      Python's built in tarfile library rather than a temporary directory.
    - debian/microcode.ctl.init: Depend on $remote_fs.

  [ Daniel J Blueman]
  * Fix failure to untar firmware from Intel, due to internal filename change
    (LP: #783239)

microcode.ctl (1.17-13.1) unstable; urgency=low

  * Non-maintainer upload.
  * Fix pending l10n issues. Debconf translations:
    - Danish (Joe Hansen). Closes: #595630
    - Japanese (Hideki Yamane). Closes: #599890
    - Slovak (Ivan Masár). Closes: #619312
 -- Stefano Rivera <email address hidden> Sun, 09 Oct 2011 20:13:12 +0200

Changed in microcode.ctl (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Thomas Mayer (thomas303) wrote :

Hi, I've got the same problem using ubuntu natty:

$ sudo update-intel-microcode
[sudo] password for thomas:
Traceback (most recent call last):
  File "/usr/sbin/update-intel-microcode", line 42, in <module>
    src = tar.extractfile(datname)
  File "/usr/lib/python2.7/tarfile.py", line 2110, in extractfile
    tarinfo = self.getmember(member)
  File "/usr/lib/python2.7/tarfile.py", line 1794, in getmember
    raise KeyError("filename %r not found" % name)
KeyError: "filename u'microcode-20110915.dat' not found"

Could you please also provide a fix for natty?

Revision history for this message
Moritz Naumann (mnaumann) wrote :

That's a good point since I originally reported this against natty.

Changed in microcode.ctl (Ubuntu):
status: Fix Released → Incomplete
status: Incomplete → Confirmed
Changed in microcode.ctl (Ubuntu):
status: Confirmed → Fix Released
Changed in microcode.ctl (Ubuntu Natty):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Stefano Rivera (stefanor) wrote :

Uploaded, pending SRU team review

Changed in microcode.ctl (Ubuntu Natty):
status: Confirmed → Fix Committed
description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Moritz, or anyone else affected,

Accepted microcode.ctl into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Moritz Naumann (mnaumann) wrote :

Thanks everyone, microcode.ctl 1.17-13ubuntu2.1 (natty-proposed) works fine for me on Natty.

Martin Pitt (pitti)
tags: added: verification-donee
removed: verification-needed
tags: added: verification-done
removed: verification-donee
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package microcode.ctl - 1.17-13ubuntu2.1

---------------
microcode.ctl (1.17-13ubuntu2.1) natty-proposed; urgency=low

  * Fix failure to untar firmware from Intel, due to internal filename change.
    Thanks to Daniel J Blueman for the patch. (LP: #783239)
 -- Stefano Rivera <email address hidden> Thu, 20 Oct 2011 18:22:44 +0200

Changed in microcode.ctl (Ubuntu Natty):
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.