makedumpfile v1.5.5
Subsystems (2)
Hi Daisuke,
I found a problem with the latest makedumpfile v1.5.5. I have narrowed down the bug to your patch set:
72d9d063 [PATCH v2 1/2] Use memset() to improve the 1st bitmap initialization performance.
363d53fc [PATCH v2 2/2] Write out a whole part of the 1st bitmap before entering cyclic process.
After reversed this patch set out, this problem was gone. Could you check this problem?
I got a segmentation fault during dump kernel. I have copied the vmcore to my system to debug it.
makedumpfile -l --message-level 23 -d 31 -f /vmcores/vmcore /dev/null cyclic buffer size has been changed: 1060863 => 1060736
Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.280002 seconds Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.000194 seconds Excluding unnecessary pages : [100.0 %] -STEP [Excluding unnecessary pages] : 0.276371 seconds Excluding unnecessary pages : [100.0 %] /STEP [Excluding unnecessary pages] : 0.000205 seconds Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.279320 seconds
Segmentation fault (core dumped)
gdb --args ./makedumpfile -l --message-level 23 -d 31 -f /vmcores/vmcore /dev/null
(gdb) run
Starting program: /home/majingb/work/source/makedumpfile/makedumpfile -l --message-level 23 -d 31 -f /vmcores/vmcore /dev/null [Thread debugging using libthread_db enabled]
cyclic buffer size has been changed: 1060863 => 1060736
Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.306783 seconds Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.000197 seconds Excluding unnecessary pages : [100.0 %] /STEP [Excluding unnecessary pages] : 0.274979 seconds Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.000177 seconds Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.274816 seconds Copying data : [ 7.0 %] -
Program received signal SIGSEGV, Segmentation fault. __memset_sse2 () at ../sysdeps/x86_64/memset.S:65
65 movswq (%rcx,%r8,2),%rcx
(gdb) bt
#0 __memset_sse2 () at ../sysdeps/x86_64/memset.S:65 #1 0x000000000042ea73 in readpage_elf (type_addr=1, addr=3881992192, bufptr=0x7fffffffbc90, size=4096) at makedumpfile.c:402 #2 readmem (type_addr=1, addr=3881992192, bufptr=0x7fffffffbc90, size=4096) at makedumpfile.c:594 #3 0x000000000042fe0f in read_pfn (pfn=<value optimized out>, buf=<value optimized out>) at makedumpfile.c:5798 #4 0x0000000000430089 in write_kdump_pages_cyclic (cd_header=0x7fffffffde00, cd_page=0x7fffffffddd0, pd_zero=0x7fffffffdd50, offset_data=0x7fffffffdd88) at makedumpfile.c:6402 #5 0x0000000000437073 in write_kdump_pages_and_bitmap_cyclic (cd_header=0x7fffffffde00, cd_page=0x7fffffffddd0) at makedumpfile.c:6880 #6 0x000000000043827b in writeout_dumpfile () at makedumpfile.c:7835 #7 0x00000000004386a5 in create_dumpfile () at makedumpfile.c:8038 #8 0x000000000043944e in main (argc=<value optimized out>, argv=<value optimized out>) at makedumpfile.c:9214
In makedumpfile line 402:
memset(bufptr, 0, frac_head);
I have printed out the value of frac_head:
p frac_head
$2 = 18446744069827559424
It seems something wrong here.
Here is the paddr in this context.
(gdb) p paddr
$3 = 3881992192
I also have printed out the pt_loads for your reference:
(gdb) p *pt_loads@num_pt_loads
$3 = {{file_offset = 12288, phys_start = 16777216, phys_end = 33579008, virt_start = 18446744071578845184, virt_end = 18446744071595646976}, {file_offset = 16814080, phys_start = 65536, phys_end = 621568,
virt_start = 18446612132314284032, virt_end =
18446612132314840064}, {file_offset = 17371136, phys_start = 1048576, phys_end = 637534208, virt_start = 18446612132315267072, virt_end = 18446612132951752704}, {
file_offset = 653856768, phys_start = 905969664, phys_end =
3881955328, virt_start = 18446612133220188160, virt_end = 18446612136196173824}, {file_offset = 3629842432, phys_start = 3882008576, phys_end = 3882012672,
virt_start = 18446612136196227072, virt_end = 18446612136196231168}, {file_offset = 3629846528, phys_start = 4294967296, phys_end = 34762387456, virt_start = 18446612136609185792, virt_end = 18446612167076605952}}
Signature · 7 lines
Thanks, Jingbai Ma _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
From: Jingbai Ma <[email protected]>
Subject: [BUG] makedumpfile v1.5.5
Date: Wed, 26 Mar 2014 19:09:59 +0800
Quoted 90 lines
Hi Daisuke,
I found a problem with the latest makedumpfile v1.5.5. I have narrowed down the bug to your patch set:
72d9d063[PATCH v2 1/2] Usememset()to improve the 1st bitmap initialization performance.
363d53fc[PATCH v2 2/2] Write out a whole part of the 1st bitmap before entering cyclic process.After reversed this patch set out, this problem was gone. Could you check this problem?
I got a segmentation fault during dump kernel. I have copied the vmcore to my system to debug it.
makedumpfile -l --message-level 23 -d 31 -f /vmcores/vmcore
/dev/nullcyclic buffer size has been changed: 1060863 => 1060736 Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.280002 seconds
Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.000194 seconds
Excluding unnecessary pages : [100.0 %] -STEP [Excluding unnecessary pages] : 0.276371 seconds
Excluding unnecessary pages : [100.0 %] /STEP [Excluding unnecessary pages] : 0.000205 seconds
Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.279320 seconds
Segmentation fault (core dumped)gdb --args ./makedumpfile -l --message-level 23 -d 31 -f /vmcores/vmcore
/dev/null(gdb) run
Starting program:/home/majingb/work/source/makedumpfile/makedumpfile-l --message-level 23 -d 31 -f /vmcores/vmcore/dev/null[Thread debugging usinglibthread_dbenabled]
cyclic buffer size has been changed: 1060863 => 1060736 Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.306783 seconds
Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.000197 seconds
Excluding unnecessary pages : [100.0 %] /STEP [Excluding unnecessary pages] : 0.274979 seconds
Excluding unnecessary pages : [100.0 %] |STEP [Excluding unnecessary pages] : 0.000177 seconds
Excluding unnecessary pages : [100.0 %] \STEP [Excluding unnecessary pages] : 0.274816 seconds
Copying data : [ 7.0 %] -
Program received signal SIGSEGV, Segmentation fault.__memset_sse2() at../sysdeps/x86_64/memset.S:65
65 movswq (%rcx,%r8,2),%rcx
(gdb) bt
#0__memset_sse2() at../sysdeps/x86_64/memset.S:65
#10x000000000042ea73inreadpage_elf(type_addr=1, addr=3881992192, #bufptr=0x7fffffffbc90, size=4096) at makedumpfile.c:402
#2 readmem (type_addr=1, addr=3881992192, bufptr=0x7fffffffbc90, #size=4096) at makedumpfile.c:594
#30x000000000042fe0finread_pfn(pfn=<value optimized out>, #buf=<value optimized out>) at makedumpfile.c:5798
#40x0000000000430089inwrite_kdump_pages_cyclic#(cd_header=0x7fffffffde00, cd_page=0x7fffffffddd0, #pd_zero=0x7fffffffdd50, offset_data=0x7fffffffdd88) at #makedumpfile.c:6402
#50x0000000000437073inwrite_kdump_pages_and_bitmap_cyclic#(cd_header=0x7fffffffde00, cd_page=0x7fffffffddd0) at #makedumpfile.c:6880
#60x000000000043827binwriteout_dumpfile() at makedumpfile.c:7835 #70x00000000004386a5increate_dumpfile() at makedumpfile.c:8038 #80x000000000043944ein main (argc=<value optimized out>, argv=<value #optimized out>) at makedumpfile.c:9214In makedumpfile line 402:
memset(bufptr, 0, frac_head);I have printed out the value of
frac_head:
pfrac_head
$2 = 18446744069827559424
It seems something wrong here.Here is the paddr in this context.
(gdb) p paddr
$3 = 3881992192I also have printed out the
pt_loadsfor your reference:
(gdb) p *pt_loads@num_pt_loads
$3 = {{file_offset= 12288,phys_start= 16777216,phys_end= 33579008,virt_start= 18446744071578845184,virt_end= 18446744071595646976}, {file_offset= 16814080,phys_start= 65536,phys_end= 621568,
Quoted 12 lines
virt_start = 18446612132314284032, virt_end = 18446612132314840064},
{file_offset = 17371136, phys_start = 1048576, phys_end = 637534208,
virt_start = 18446612132315267072, virt_end = 18446612132951752704}, {
file_offset = 653856768, phys_start = 905969664, phys_end =
3881955328, virt_start = 18446612133220188160, virt_end =
18446612136196173824}, {file_offset = 3629842432, phys_start =
3882008576, phys_end = 3882012672,
virt_start = 18446612136196227072, virt_end = 18446612136196231168},
{file_offset = 3629846528, phys_start = 4294967296, phys_end =
34762387456, virt_start = 18446612136609185792, virt_end =
18446612167076605952}}Sorry. This was fixed by the following patch.
commit 4404368a0860e3b6c845eb41782e97a9bf7593b8
Author: WANG Chao <[email protected]> Date: Wed Dec 18 22:34:43 2013 +0900
[PATCH] memset() in cyclic bitmap initialization introduce segment fault.
Thanks.
HATAYAMA, Daisuke
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 12 lines · HATAYAMA Daisuke
Sorry. This was fixed by the following patch.
commit
4404368a0860e3b6c845eb41782e97a9bf7593b8Author: WANG Chao <[email protected]> Date: Wed Dec 18 22:34:43 2013 +0900[PATCH]
memset()in cyclic bitmap initialization introduce segment fault.Thanks.
HATAYAMA, Daisuke
I have applied this patch, the problem still exists, so I investigated on it a bit more, I found the root cause. I have sent a patch to fix it:
http://lists.infradead.org/pipermail/kexec/2014-March/011408.html
Signature · 7 lines
Thanks, Jingbai Ma _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec