post-install fails

Bug #1279293 reported by Lenin
84
This bug affects 14 people
Affects Status Importance Assigned to Milestone
mcelog (Debian)
Fix Released
Unknown
mcelog (Ubuntu)
Fix Released
High
Unassigned

Bug Description

# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up mcelog (100-0ubuntu1) ...
Starting Machine Check Exceptions decoder: CPU is unsupported
invoke-rc.d: initscript mcelog, action "start" failed.
dpkg: error processing package mcelog (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mcelog
E: Sub-process /usr/bin/dpkg returned an error code (1)

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mcelog (Ubuntu):
status: New → Confirmed
Dominik Kupschke (bommi)
information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Sergio Gelato (sergio-gelato) wrote :

The description of this bug is incomplete, so I can't be sure that the root cause is the same in my case as for the original reporter. Anyway, here goes:

I'm seeing this on an AMD family 15 CPU. If I try to run mcelog --foreground by hand, I get the following output:

mcelog: AMD Processor family 15: Please load edac_mce_amd module.
: Success
CPU is unsupported

That module is, in fact, already loaded into my running kernel.

I can work around the problem by forcing cpu=k8 in /etc/mcelog/mcelog.conf .

Looking at the source code I see that upstream commit b986691d9c5656beb8a6a0f65b8c7abc29d73a96 is buggy. I'm attaching a patch which I believe improves the situation, at least for family 15. (I've just tested it, and it does solve the problem in my case.)

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix-amd-cpu-supported.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Sergio Gelato (sergio-gelato) wrote : Re: [Bug 1279293] Re: post-install fails

My earlier patch solves the problem for AMD family 15, but clearly not for
family 16 and newer. For a complete fix one will need to modify the init
script. If the CPU is unsupported, both daemon and trigger mode should be
disabled.

It may be useful to add an --is-cpu-supported command-line option to mcelog.
This would check whether the CPU type is supported and return true or false
accordingly. One could then take advantage of this in the init script
(and perhaps in postinst, to alert the user about the lack of support; and
maybe in puppet manifests as well, to avoid useless ensure=>running).

By the way, are the return codes for /etc/init.d/mcelog status LSB-compliant?
I thought not.

One might conceivably want to install mcelog on systems with an unsupported
CPU, e.g. to decode data obtained from other systems. Right now the way to
do it involves "update-rc.d mcelog disable", but this doesn't cope very
well with software upgrades that add or remove support for certain CPUs.

Revision history for this message
James Turner (james-turner) wrote :

Last paragraph of comment #4 is the key consideration - not that certain unsupported CPU types exist, but that successful package configuration (i.e. dpkg --configure mcelog) depends on the CPU type being supported.

Effect on the graphical update-manager tool isn't ideal - reports all subsequent updates as failing and (IIRC) users need to go to command line to find out why.

Revision history for this message
Sergio Gelato (sergio-gelato) wrote :

I've now implemented and tested (on AMD families 15 and 16) the solution I suggested in comment #4. The patch is in two parts: one for the upstream source code, to be dropped into debian/patches/, and a new version of debian/mcelog.init to take advantage of the new feature.

Revision history for this message
Sergio Gelato (sergio-gelato) wrote :
Changed in mcelog (Debian):
status: Unknown → New
Changed in mcelog (Debian):
status: New → Fix Released
Revision history for this message
Andreas Moog (ampelbein) wrote :

This is fixed in the latest development version of Ubuntu (Vivid Ververt, 15.04), if you need a fix for the bug in previous versions of Ubuntu, please perform as much as possible of the SRU Procedure (https://wiki.ubuntu.com/StableReleaseUpdates#Procedure) to bring it to a developer's attention.

Changed in mcelog (Ubuntu):
importance: Undecided → High
status: Confirmed → 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.