andikleen / mcelog

Linux kernel machine check handling middleware
http://www.mcelog.org
GNU General Public License v2.0
133 stars 63 forks source link

mcelog fails to initialize when 'dmi' option is turned on #22

Open vpedabal opened 9 years ago

vpedabal commented 9 years ago

After enabling the dmi option in the mcelog.conf file and restarting the mcelog service fails. The 'service mcelog status' shows the following: linux-y3iu:/home/vpedabal # service mcelog status mcelog.service - Machine Check Exception Logging Daemon Loaded: loaded (/usr/lib/systemd/system/mcelog.service; enabled) Active: failed (Result: exit-code) since Tue 2015-03-17 00:34:01 PDT; 1s ago Process: 2761 ExecStart=/usr/sbin/mcelog --ignorenodev --daemon --foreground (code=exited, status=1/FAILURE) Main PID: 2761 (code=exited, status=1/FAILURE)

Is there a way to see what was the underlying failure? The syslog doesn't seem to report anything.

andikleen commented 9 years ago

You can just run the command line outside systemd. It should log all errors to stdout or system log.

One reason for --dmi failing is if the daemon runs as non root or /dev/mem is not accessible or protected.

vpedabal commented 9 years ago

I tried doing that, but it still doesn't output any error, and I am also running it as root. It still works when I don't turn on the --dmi option though.

ykondrashyn commented 9 years ago

It happens when mcelog fails to access /sys/firmware/efi/systab and /proc/efi/systab on your system. I assume they only appear when you have UEFI instead of BIOS. Look at dmi.c for more info.

However, you can run mcelog with --dmi option on non-efi system after slight change in dmi.c: In this commit there were two strings added (system and return -1), remove them and mcelog will complain about failure to read the dmi tables but it should still work. https://github.com/andikleen/mcelog/commit/3d782896d8cd040aae94692d09129a53d63e31eb Another way: try to rebuilt kernel with CONFIG_EFI and CONFIG_MEMORY_FAILURE enabled