segmentation fault on power system
Hey there,
When trying to run fio on one of our power system, segmentation fault occured and I got two core file. This is the backtraces:
Core was generated by `./fio/fio fio-jobs/randomw.fio '.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000010062aac in init_disk_util (td=0xfff8ad00000) at diskutil.c:481
481 if (!td->o.do_disk_util ||
(gdb) bt
#0 0x0000000010062aac in init_disk_util (td=0xfff8ad00000) at diskutil.c:481
#1 0x0000000010050f30 in run_threads () at backend.c:1691
#2 0x000000001005179c in fio_backend () at backend.c:1911
#3 0x0000000010066bc4 in main (argc=<value optimized out>, argv=0xfffd33602d8, envp=<value optimized out>)
at fio.c:50(gdb) p td->io_ops
$1 = (struct ioengine_ops *) 0x0
(gdb) p td
$2 = (struct thread_data *) 0xfff8ad00000
(gdb) p threads->io_ops
$3 = (struct ioengine_ops *) 0x100349126c0
(gdb)
Core was generated by `./fio/fio fio-jobs/randomw.fio '. Program terminated with signal 4, Illegal instruction. #0 mfspr (envp=<value optimized out>) at arch/arch-ppc.h:55
55 asm volatile("mfspr %0,%1": "=r" (val) : "K" (reg));
(gdb) bt
#0 mfspr (envp=<value optimized out>) at arch/arch-ppc.h:55 #1 get_cpu_clock (envp=<value optimized out>) at arch/arch-ppc.h:71 #2 atb_child (envp=<value optimized out>) at arch/arch-ppc.h:88 #3 atb_clocktest (envp=<value optimized out>) at arch/arch-ppc.h:98 #4 arch_init (envp=<value optimized out>) at arch/arch-ppc.h:116 #5 initialize_fio (envp=<value optimized out>) at libfio.c:248 #6 0x0000000010066b44 in main (argc=<value optimized out>, argv=<value optimized out>,
envp=<value optimized out>) at fio.c:33
(gdb)
This is the job file:
[sequential-read]
rw=read
ioengine=libaio
direct=0
iodepth=4
size=${SIZE}
numjobs=${NUMJOBS}
; -- end job file --
Please have a look. Thanks in advance!
Quoted 4 lines · Han Pingtian
Hey there,
When trying to run fio on one of our power system, segmentation fault
Can you give us the kind of cpu you are using ? (/proc/cpuinfo)
I'm not used with PPC but maybe your processor doesn't support ATBU call on mfspr.
Erwan,
Quoted 8 lines · Erwan Velu
Quoted 4 lines · Han Pingtian
Hey there,
When trying to run fio on one of our power system, segmentation fault
Can you give us the kind of cpu you are using ? (
/proc/cpuinfo) I'm not used with PPC but maybe your processor doesn't support ATBU call on mfspr.
That is definitely the problem, so CPU info would help. In the mean time, you can use clocksource=clock_gettime to get rid of the illegal instruction.
Signature · 1 line
Jens Axboe
Quoted 6 lines · Jens Axboe
Quoted 5 lines · Erwan Velu
Quoted 4 lines · Han Pingtian
Hey there,
When trying to run fio on one of our power system, segmentation fault
Quoted 7 lines
Quoted 3 lines
Can you give us the kind of cpu you are using ? (
/proc/cpuinfo) I'm not used with PPC but maybe your processor doesn't support ATBU call on mfspr.That is definitely the problem, so CPU info would help. In the mean time, you can use clocksource=clock_gettime to get rid of the illegal instruction.
This is the contents of /proc/cpuinfo:
processor : 0
cpu : POWER7 (architected), altivec supported
clock : 3550.000000MHz
revision : 2.3 (pvr 003f 0203)
processor : 1
cpu : POWER7 (architected), altivec supported
clock : 3550.000000MHz
revision : 2.3 (pvr 003f 0203)
processor : 2
cpu : POWER7 (architected), altivec supported
clock : 3550.000000MHz
revision : 2.3 (pvr 003f 0203)
processor : 3
cpu : POWER7 (architected), altivec supported
clock : 3550.000000MHz
revision : 2.3 (pvr 003f 0203)
timebase : 512000000
platform : pSeries
model : IBM,8231-E2C
machine : CHRP IBM,8231-E2C
But 'clocksource=clock_gettime' doesn't fix the fault. I can also get the same two cores.
If I changed the code like this:
================================================================================
arch/arch-ppc.h +6 -6
@@ -67,15 +67,15 @@ static inline unsigned long long get_cpu_clock(void)unsigned long long ret;do { -if (arch_flags &ARCH_FLAG_1 ) { - tbu0 =mfspr (SPRN_ATBU ); - tbl =mfspr (SPRN_ATBL ); - tbu1 =mfspr (SPRN_ATBU ); - }else { +//if (arch_flags & ARCH_FLAG_1) { +// tbu0 = mfspr(SPRN_ATBU); +// tbl = mfspr(SPRN_ATBL); +// tbu1 = mfspr(SPRN_ATBU); +//} else { tbu0 =mfspr (SPRN_TBRU ); tbl =mfspr (SPRN_TBRL ); tbu1 =mfspr (SPRN_TBRU ); - } +//} }while (tbu0 != tbu1); ret = (((unsigned long long )tbu0) <<32 ) | tbl;
================================================================================
then only one core dumpped which has this backtrace:
================================================================================
Core was generated by `./fio/fio --debug=parse fio-jobs/randomw.fio '. Program terminated with signal 11, Segmentation fault.
#0 0x000000001006288c in init_disk_util (td=0xfff9a730000) at diskutil.c:481
481 if (!td->o.do_disk_util ||
(gdb) bt
#0 0x000000001006288c in init_disk_util (td=0xfff9a730000) at diskutil.c:481
#1 0x0000000010050d30 in run_threads () at backend.c:1691
#2 0x000000001005159c in fio_backend () at backend.c:1911
#3 0x00000000100669a4 in main (argc=<value optimized out>, argv=0xfffd20c9ec8, envp=<value optimized out>)
at fio.c:50(gdb) p td
$1 = (struct thread_data *) 0xfff9a730000
(gdb) p threads
$2 = (struct thread_data *) 0xfff9a730000
(gdb) p td->io_ops
$3 = (struct ioengine_ops *) 0x0
(gdb) p threads->io_ops
$4 = (struct ioengine_ops *) 0x1000e262720
(gdb)
================================================================================
I think I have found what's wrong. After 'make distclean' then 'make', the problem of segfault has gone. There were some object files compiled on another machine. The recompilation fixed it. But looks like the ATBU call dosen't work on power7 system.
Quoted 104 lines · Han Pingtian
Quoted 6 lines · Jens Axboe
Quoted 5 lines · Erwan Velu
Quoted 4 lines · Han Pingtian
Hey there,
When trying to run fio on one of our power system, segmentation fault
Quoted 7 lines
Quoted 3 lines
Can you give us the kind of cpu you are using ? (
/proc/cpuinfo) I'm not used with PPC but maybe your processor doesn't support ATBU call on mfspr.That is definitely the problem, so CPU info would help. In the mean time, you can use clocksource=clock_gettime to get rid of the illegal instruction.
This is the contents of
/proc/cpuinfo:processor : 0
cpu : POWER7 (architected), altivec supported
clock : 3550.000000MHz
revision : 2.3 (pvr 003f 0203)processor : 1
cpu : POWER7 (architected), altivec supported
clock : 3550.000000MHz
revision : 2.3 (pvr 003f 0203)processor : 2
cpu : POWER7 (architected), altivec supported
clock : 3550.000000MHz
revision : 2.3 (pvr 003f 0203)processor : 3
cpu : POWER7 (architected), altivec supported
clock : 3550.000000MHz
revision : 2.3 (pvr 003f 0203)timebase : 512000000
platform : pSeries
model : IBM,8231-E2C
machine : CHRP IBM,8231-E2CBut 'clocksource=clock_gettime' doesn't fix the fault. I can also get the same two cores.
If I changed the code like this:
================================================================================
arch/arch-ppc.h +6
-6@@ -67,15 +67,15 @@ static inline unsigned long long get_cpu_clock(void)unsigned long long ret;do { -if (arch_flags &ARCH_FLAG_1 ) { - tbu0 =mfspr (SPRN_ATBU ); - tbl =mfspr (SPRN_ATBL ); - tbu1 =mfspr (SPRN_ATBU ); - }else { +//if (arch_flags & ARCH_FLAG_1) { +// tbu0 = mfspr(SPRN_ATBU); +// tbl = mfspr(SPRN_ATBL); +// tbu1 = mfspr(SPRN_ATBU); +//} else { tbu0 =mfspr (SPRN_TBRU ); tbl =mfspr (SPRN_TBRL ); tbu1 =mfspr (SPRN_TBRU ); - } +//} }while (tbu0 != tbu1); ret = (((unsigned long long )tbu0) <<32 ) | tbl;================================================================================
then only one core dumpped which has this backtrace:
================================================================================
Core was generated by `./fio/fio --debug=parse fio-jobs/randomw.fio '. Program terminated with signal 11, Segmentation fault.
#00x000000001006288cininit_disk_util(td=0xfff9a730000) at diskutil.c:481
481 if (!td->o.do_disk_util ||
(gdb) bt#0 0x000000001006288c in init_disk_util (td=0xfff9a730000) at diskutil.c:481 #1 0x0000000010050d30 in run_threads () at backend.c:1691 #2 0x000000001005159c in fio_backend () at backend.c:1911 #3 0x00000000100669a4 in main (argc=<value optimized out>, argv=0xfffd20c9ec8, envp=<value optimized out>) at fio.c:50(gdb) p td
$1 = (structthread_data*)0xfff9a730000
(gdb) p threads
$2 = (structthread_data*)0xfff9a730000
(gdb) ptd->io_ops
$3 = (structioengine_ops*)0x0
(gdb) pthreads->io_ops
$4 = (structioengine_ops*)0x1000e262720
(gdb)
================================================================================--
To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Han Pingtian
I think I have found what's wrong. After 'make distclean' then 'make', the problem of segfault has gone. There were some object files compiled on another machine. The recompilation fixed it. But looks like the ATBU call dosen't work on power7 system.
So the recompilation fixed the segfault, but not the illegal instruction due to ATBU?
Signature · 1 line
Jens Axboe
Quoted 8 lines · Jens Axboe
Quoted 4 lines · Han Pingtian
I think I have found what's wrong. After 'make distclean' then 'make', the problem of segfault has gone. There were some object files compiled on another machine. The recompilation fixed it. But looks like the ATBU call dosen't work on power7 system.
So the recompilation fixed the segfault, but not the illegal instruction due to ATBU?
Yes. If we set unlimit core dump, fio will generate a core with backtrace like this one:
#0 mfspr (envp=<value optimized out>) at arch/arch-ppc.h:55
55 asm volatile("mfspr %0,%1": "=r" (val) : "K" (reg));
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.107.el6.ppc64 libaio-0.3.107-10.el6.ppc64 (gdb) bt
#0 mfspr (envp=<value optimized out>) at arch/arch-ppc.h:55 #1 get_cpu_clock (envp=<value optimized out>) at arch/arch-ppc.h:71 #2 atb_child (envp=<value optimized out>) at arch/arch-ppc.h:88 #3 atb_clocktest (envp=<value optimized out>) at arch/arch-ppc.h:98 #4 arch_init (envp=<value optimized out>) at arch/arch-ppc.h:116 #5 initialize_fio (envp=<value optimized out>) at libfio.c:248 #6 0x0000000010067294 in main (argc=<value optimized out>, argv=<value optimized out>,
envp=<value optimized out>) at fio.c:33
Apologize for late to reply.
Quoted 24 lines · Han Pingtian
Quoted 8 lines · Jens Axboe
Quoted 4 lines · Han Pingtian
I think I have found what's wrong. After 'make distclean' then 'make', the problem of segfault has gone. There were some object files compiled on another machine. The recompilation fixed it. But looks like the ATBU call dosen't work on power7 system.
So the recompilation fixed the segfault, but not the illegal instruction due to ATBU?
Yes. If we set unlimit core dump, fio will generate a core with backtrace like this one:
#0 mfspr (envp=<value optimized out>) at
arch/arch-ppc.h:55
55 asmvolatile("mfspr %0,%1": "=r" (val) : "K" (reg));
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.107.el6.ppc64 libaio-0.3.107-10.el6.ppc64 (gdb) bt#0 mfspr (envp=<value optimized out>) at arch/arch-ppc.h:55 #1 get_cpu_clock (envp=<value optimized out>) at arch/arch-ppc.h:71 #2 atb_child (envp=<value optimized out>) at arch/arch-ppc.h:88 #3 atb_clocktest (envp=<value optimized out>) at arch/arch-ppc.h:98 #4 arch_init (envp=<value optimized out>) at arch/arch-ppc.h:116 #5 initialize_fio (envp=<value optimized out>) at libfio.c:248 #6 0x0000000010067294 in main (argc=<value optimized out>, argv=<value optimized out>,
Quoted 4 lines
envp=<value optimized out>) at fio.c:33
Apologize for late to reply.
Alright, I'll have PPC default to the normal clock until we can improve and detect this properly.
Signature · 1 line
Jens Axboe
Quoted 10 lines · Erwan Velu
Quoted 4 lines · Han Pingtian
Hey there,
When trying to run fio on one of our power system, segmentation fault
Can you give us the kind of cpu you are using ? (
/proc/cpuinfo) I'm not used with PPC but maybe your processor doesn't support ATBU call on mfspr.Erwan,
This is the contents of /proc/cpuinfo:
processor : 0
cpu : POWER7 (architected), altivec supported
clock : 3550.000000MHz
revision : 2.3 (pvr 003f 0203)
processor : 1
cpu : POWER7 (architected), altivec supported
clock : 3550.000000MHz
revision : 2.3 (pvr 003f 0203)
processor : 2
cpu : POWER7 (architected), altivec supported
clock : 3550.000000MHz
revision : 2.3 (pvr 003f 0203)
processor : 3
cpu : POWER7 (architected), altivec supported
clock : 3550.000000MHz
revision : 2.3 (pvr 003f 0203)
timebase : 512000000
platform : pSeries
model : IBM,8231-E2C
machine : CHRP IBM,8231-E2C