Cannot collect dump due to "Can't get a valid pmd_pte" error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
makedumpfile (Ubuntu) |
Fix Released
|
High
|
Guilherme G. Piccoli | ||
Xenial |
Opinion
|
Low
|
Guilherme G. Piccoli | ||
Bionic |
Fix Released
|
High
|
Guilherme G. Piccoli | ||
Disco |
Invalid
|
Undecided
|
Unassigned | ||
Eoan |
Fix Released
|
High
|
Guilherme G. Piccoli | ||
Focal |
Fix Released
|
High
|
Guilherme G. Piccoli |
Bug Description
[Impact]
* Currently makedumpfile has 2 flaws due to: (a) out of synchronization with kernel code and, (b) kaslr handling. The first is related to a definition of a memory flag bit, whereas the second is about kaslr offset calculation - both cause similar failures when collecting the vmcore in kdump environment:
Excluding unnecessary pages : [ 46.3 %] / __vtop4_x86_64[ 39.341233]: Can't get a valid pmd_pte.
readmem: Can't convert a virtual address(
readmem: type_addr: 0, addr:ffffe05cb4
__exclude_
create_2nd_bitmap: Can't exclude unnecessary pages.
* The report is mainly related to the first issue, which started to happen after the merge of kernel commit 326e1b8f83a4 ("mm/sparsemem: introduce a SECTION_IS_EARLY flag"), introduced in kernel 5.3. After this commit, a memory flag was changed and induced the error in dump collection. The fix is available in makedumpfile, as commit 7bdb468c2c ("Increase SECTION_
* The other issue is fixed in both Eoan and Focal, on makedumpfile 1.6.6-based version. It is related with the kaslr offset: if the offset is small enough, we may return 0 wrongly in get_kaslr_
* Notice this modification is being worked concurrently with other kdump-tools' changes in LP #1828596.
[Test Case]
1) Deploy an Eoan VM e.g. with uvt-kvm;
2) Set-up console output in the guest;
3) Install the kdump-tools package;
4) Configure and collect a dump (with sysrq to panic the system) - the error aforementioned is observed given Eoan kernel is 5.3-based.
[Regression Potential]
* The modifications hereby proposed are minimal and scope-constrained to makedumpfile in x86_64; both are merged in makedumpfile upstream, one of them being already released in E/F. An unlikely regression would potentially fails vmcore collection in kdump environment.
Changed in makedumpfile (Ubuntu Eoan): | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in makedumpfile (Ubuntu Disco): | |
importance: | Undecided → Low |
Changed in makedumpfile (Ubuntu Xenial): | |
importance: | Undecided → Low |
Changed in makedumpfile (Ubuntu Bionic): | |
importance: | Undecided → High |
Changed in makedumpfile (Ubuntu Eoan): | |
assignee: | nobody → Guilherme G. Piccoli (gpiccoli) |
Changed in makedumpfile (Ubuntu Disco): | |
assignee: | nobody → Guilherme G. Piccoli (gpiccoli) |
Changed in makedumpfile (Ubuntu Bionic): | |
assignee: | nobody → Guilherme G. Piccoli (gpiccoli) |
Changed in makedumpfile (Ubuntu Xenial): | |
assignee: | nobody → Guilherme G. Piccoli (gpiccoli) |
Changed in makedumpfile (Ubuntu Disco): | |
importance: | Low → Undecided |
assignee: | Guilherme G. Piccoli (gpiccoli) → nobody |
tags: |
added: verification-done verification-done-bionic removed: verification-needed verification-needed-bionic |
This proved not to be the case; in fact, the issue was caused by a change in kernel that changed a bit and hence, the vmcore collection failed.
The culprit was kernel commit 326e1b8f83a4 ("mm/sparsemem: introduce a SECTION_IS_EARLY flag"), introduced in kernel 5.3. MAP_LAST_ BIT to 4").
The makedumpfile fix for this comes in commit 7bdb468c2c ("Increase SECTION_
The PPA launchpad. net/~gpiccoli/ +archive/ ubuntu/ lp1857616 contains a build with this fix for testing purposes.
Cheers,
Guilherme