Bug 192681 - Getting PM: Image mismatch: memory size occasionally
Summary: Getting PM: Image mismatch: memory size occasionally
Status: CLOSED DOCUMENTED
Alias: None
Product: Power Management
Classification: Unclassified
Component: Hibernation/Suspend (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: Chen Yu
URL: https://bbs.archlinux.org/viewtopic.p...
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-16 14:39 UTC by Siarhei
Modified: 2017-02-14 06:15 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.8.13
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Siarhei 2017-01-16 14:39:00 UTC
I've taken relevant lines from journalctl, follow the link.
https://gist.github.com/anonymous/454d9c955119d2ee897706dea976a542
Comment 1 Siarhei 2017-01-17 04:47:14 UTC
What are the possible reasons for getting this?
I have a swap about 16GB, whereas RAM size is 7.7GB.
The problem tends to appear when RAM is loaded with at least few gigabytes,
but not necessary.
Is there available tool to verify the swap consistency with a help
of live cd linux?
Comment 2 Chen Yu 2017-02-06 02:37:07 UTC
This might be because your BIOS has provided different memory layout, please provide the full bootup dmesg both before and after the failure of hibernation.
Comment 3 Siarhei 2017-02-12 14:54:46 UTC
Here is the two consecutive kernel boot ups with Image mismatch during the last one.
https://gist.github.com/anonymous/21bbac4f158441e1ff4e57a87a343314

It has really a difference in some units:

Feb 08 21:14:44 siarhei_asus kernel:   Normal zone: 1306623 pages, LIFO batch:31
Feb 08 21:14:44 siarhei_asus kernel:   Normal zone: 20416 pages used for memmap
Feb 08 21:14:44 siarhei_asus kernel:   DMA32 zone: 683489 pages, LIFO batch:31
Feb 08 21:14:44 siarhei_asus kernel:   DMA32 zone: 10680 pages used for memmap
Feb 08 21:14:44 siarhei_asus kernel:   DMA zone: 3999 pages, LIFO batch:0
Feb 08 21:14:44 siarhei_asus kernel:   DMA zone: 26 pages reserved
Feb 08 21:14:44 siarhei_asus kernel:   DMA zone: 64 pages used for memmap
Feb 08 21:14:44 siarhei_asus kernel: On node 0 totalpages: 1994111

Feb 08 10:40:52 siarhei_asus kernel:   Normal zone: 1306623 pages, LIFO batch:31
Feb 08 10:40:52 siarhei_asus kernel:   Normal zone: 20416 pages used for memmap
Feb 08 10:40:52 siarhei_asus kernel:   DMA32 zone: 683488 pages, LIFO batch:31
Feb 08 10:40:52 siarhei_asus kernel:   DMA32 zone: 10680 pages used for memmap
Feb 08 10:40:52 siarhei_asus kernel:   DMA zone: 3999 pages, LIFO batch:0
Feb 08 10:40:52 siarhei_asus kernel:   DMA zone: 26 pages reserved
Feb 08 10:40:52 siarhei_asus kernel:   DMA zone: 64 pages used for memmap
Feb 08 10:40:52 siarhei_asus kernel: On node 0 totalpages: 1994110

The number of total pages is different by one page.
Comment 4 Chen Yu 2017-02-12 16:07:38 UTC
This looks like a bogus BIOS that does not keep memory coherence across hibernation(S4), and linux does not allow this situation because it might make the system unstable after resumed.
Sometimes the BIOS behaves normally, but sometimes it does not.
For this part, we have different size (1 page difference) usable memory region:

siarhei_asus kernel: BIOS-e820: [mem 0x0000000000100000-0x00000000a7c6dfff] usable
and then
siarhei_asus kernel: BIOS-e820: [mem 0x0000000000100000-0x00000000a7c6cfff] usable

Maybe we can update the BIOS firmware to see if it works more reliable, but for linux part I think there isn't much thing we can do with it.
Comment 5 Siarhei 2017-02-13 07:02:56 UTC
Chen, is it a bios memory region?
So that I should not try to test by taking out RAM memory module. I have 2x4Gb RAM.

To my knowleadge I updated the bios to the latest 0x503 firmware. I didn't try to use coreboot.
Comment 6 Chen Yu 2017-02-14 03:03:24 UTC
The 'usable' region is for OS use, not for BIOS.
Comment 7 Siarhei 2017-02-14 06:15:08 UTC
If this memory is for OS usage. May it be because of corrupted RAM? So that It needs to replace memory modules. At least they may be swaped, do they?

Does it make sense to locate the broken memory region? I heard kernel allows to ignore corrupted ones.

Note You need to log in before you can comment on or make changes to this bug.