|
|
7a865b |
From 5519b3eba68544dc484d85e9540d440d93f8c924 Mon Sep 17 00:00:00 2001
|
|
|
7a865b |
From: Pingfan Liu <piliu@redhat.com>
|
|
|
7a865b |
Date: Tue, 3 Dec 2019 15:37:07 +0800
|
|
|
7a865b |
Subject: [PATCH] [PATCH] assign bitmap1/2 fd for subprocess in non-cyclic mode
|
|
|
7a865b |
|
|
|
7a865b |
In non-cyclic mode with the --split option, each subprocess inherits
|
|
|
7a865b |
bitmap1/2->fd from parent. Then they lseek()/read() on the same fd,
|
|
|
7a865b |
which means that they interfere with each other.
|
|
|
7a865b |
|
|
|
7a865b |
This breaks the purpose of SPLITTING_FD_BITMAP(i) for each subprocess.
|
|
|
7a865b |
Without this patch, makedumpfile can fail with error like the following
|
|
|
7a865b |
in refiltering, or can break the dumpfile silently by excluding pages
|
|
|
7a865b |
wrongly.
|
|
|
7a865b |
|
|
|
7a865b |
readpage_kdump_compressed: pfn(2fc1000) is excluded from vmcore.
|
|
|
7a865b |
readmem: type_addr: 1, addr:2fc1000000, size:4096
|
|
|
7a865b |
read_pfn: Can't get the page data.
|
|
|
7a865b |
|
|
|
7a865b |
Fix it by assigning a subprocess dedicated fd to bitmap1/2->fd.
|
|
|
7a865b |
|
|
|
7a865b |
Signed-off-by: Pingfan Liu <piliu@redhat.com>
|
|
|
7a865b |
Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
|
|
|
7a865b |
---
|
|
|
7a865b |
makedumpfile.c | 4 ++++
|
|
|
7a865b |
1 file changed, 4 insertions(+)
|
|
|
7a865b |
|
|
|
7a865b |
diff --git a/makedumpfile-1.6.6/makedumpfile.c b/makedumpfile-1.6.6/makedumpfile.c
|
|
|
7a865b |
index 43107d9..7586d7c 100644
|
|
|
7a865b |
--- a/makedumpfile-1.6.6/makedumpfile.c
|
|
|
7a865b |
+++ b/makedumpfile-1.6.6/makedumpfile.c
|
|
|
7a865b |
@@ -10091,6 +10091,10 @@ writeout_multiple_dumpfiles(void)
|
|
|
7a865b |
info->split_start_pfn = SPLITTING_START_PFN(i);
|
|
|
7a865b |
info->split_end_pfn = SPLITTING_END_PFN(i);
|
|
|
7a865b |
|
|
|
7a865b |
+ if (!info->flag_cyclic) {
|
|
|
7a865b |
+ info->bitmap1->fd = info->fd_bitmap;
|
|
|
7a865b |
+ info->bitmap2->fd = info->fd_bitmap;
|
|
|
7a865b |
+ }
|
|
|
7a865b |
if (!reopen_dump_memory())
|
|
|
7a865b |
exit(1);
|
|
|
7a865b |
if ((status = writeout_dumpfile()) == FALSE)
|
|
|
7a865b |
--
|
|
|
7a865b |
2.7.5
|
|
|
7a865b |
|