opps building sparc64 packages
trying to build openbabel sparc64
https://sparc.koji.fedoraproject.org/koji/taskinfo?taskID=112540 I got an opps
sun4v_data_access_exception: ADDR[ffffb83000000008] CTX[16ba] TYPE[0009], going.
\|/ ____ \|/
"@'/ .. \`@"
/_| \__/ |_\
\__U_/ lt-atom(22311): Dax [#1]
TSTATE: 0000009911001600 TPC: 00000000004821d8 TNPC: 00000000004821dc Y:
00000000 Not tainted
TPC: <exit_robust_list+0x78/0x10c>
g0: 0000000000000064 g1: 0000000000000000 g2: fff8b83000000008 g3:00000000000004ac
g4: fffff803e10e9740 g5: fffff803ff392000 g6: fffff8038a094000 g7: 0000000000000001
o0: 00000014000014a4 o1: 000007fefff9d718 o2: 000007fefff9d728 o3:
0000000000000000
o4: 0000000000000000 o5: 0000000000000001 sp: fffff8038a097441 ret_pc:00000000004666c8
RPC: <do_group_exit+0x8c/0xc4>
l0: fffff803e10e9740 l1: 0000000000000800 l2: 00000014000014a4 l3:fffff80100612790
l4: 0000000000000000 l5: 0000000000000000 l6: fffff8038a097cf8 l7:
0000000000466700
i0: fffff803e10e9740 i1: 0000000000000001 i2: 0000000000000001 i3:
0000000000000000
i4: 0000000000000000 i5: 0000000000000001 i6: fffff8038a097511 i7:0000000000465f64
I7: <do_exit+0x1d0/0x8a8>
Caller[0000000000465f64]: do_exit+0x1d0/0x8a8 Caller[00000000004666c8]: do_group_exit+0x8c/0xc4 Caller[00000000004062d4]: linux_sparc_syscall+0x34/0x44 Caller[fffff80100a9203c]: 0xfffff80100a9203c
Instruction DUMP: a8102000 1068001d ac07a7e7 <c6d8a000> 82100000 a0103ff2 80a06000 90008015 92100018
Fixing recursive fault but reboot is needed!
Ive seen something similar building OOo also
22311 ? D 0:00 /builddir/build/BUILD/openbabel-2.2.0b3-20080215-
r2249/test/.libs/lt-atom
the process that should be running ends up in a D state so it is sleeping and unkillable. the processes hang around until a reboot. any ideas where I should start looking? this happens on a T1000 and T2000 i've not yet tried on non-niagara hardware.
Dennis
From: Dennis Gilmore <[email protected]>
Date: Fri, 2 Jan 2009 14:35:19 -0600
Quoted 5 lines
trying to build openbabel sparc64
https://sparc.koji.fedoraproject.org/koji/taskinfo?taskID2540 I got an opps
sun4v_data_access_exception: ADDR[ffffb83000000008] CTX[16ba] TYPE[0009], going.
...
Quoted 4 lines
lt-atom(22311): Dax [#1]
TSTATE: 0000009911001600 TPC:00000000004821d8TNPC:00000000004821dcY:
00000000 Not tainted
TPC: <exit_robust_list+0x78/0x10c>
...
Quoted 8 lines
Ive seen something similar building OOo also
22311 ? D 0:00 /builddir/build/BUILD/openbabel-2.2.0b3-20080215-
r2249/test/.libs/lt-atomthe process that should be running ends up in a D state so it is sleeping and unkillable. the processes hang around until a reboot. any ideas where I should start looking? this happens on a T1000 and T2000 i've not yet tried on non-niagara hardware.
Thanks for this report. I think I know why this happens.
exit_robust_list() just walks the userland linked list of robust FUTEX objects to release. Since it's userland, anything can be there, so this can generate all kinds of exceptions depending upon the address used. Such exceptions should just silently be handled and cause an abort of the FUTEX list traversal.
The address in question is in register %g2 as the faulting instruction is:
ldxa [ %g2 ] %asi, %g3
And register %g2 holds 0xfff8b83000000008 which is inside of the address space hole on Niagara. Any acccess there is illegal and will generate a data access exception as we see here.
The code in sun4v_data_access_exception() needs some logic to properly handle the case of the kernel doing a userspace access. Currently it does an OOPS unconditionally when triggered from kernel space, which is wrong.
I'll fix this up and post a patch.
Thanks again.
From: David Miller <[email protected]>
Date: Mon, 19 Jan 2009 22:35:17 -0800 (PST)
Quoted 6 lines
The code in
sun4v_data_access_exception()needs some logic to properly handle the case of the kernel doing a userspace access. Currently it does an OOPS unconditionally when triggered from kernel space, which is wrong.I'll fix this up and post a patch.
Dennis, here is a 2.6.27 based patch that should fix this bug.
sparc64: Fix DAX handling via userspace access from kernel.
If we do a userspace access from kernel mode, and get a data access exception, we need to check the exception table just like a normal fault does.
The spitfire DAX handler was doing this, but such logic was missing from the sun4v DAX code.
arch/sparc64/kernel/traps.c +16 -1
@@ -1,6 +1,6 @@/* arch/sparc64/kernel/traps.c * -* Copyright (C) 1995,1997,2008 David S. Miller ([email protected]) +* Copyright (C) 1995,1997,2008,2009 David S. Miller ([email protected]) * Copyright (C) 1997,1999,2000 Jakub Jelinek ([email protected]) */
@@ -262,6 +262,21 @@ void sun4v_data_access_exception(struct pt_regs *regs, unsigned long addr, unsigreturn ;if (regs->tstate &TSTATE_PRIV ) { +/* Test if this comes from uaccess places. */ +const struct exception_table_entry *entry; + + entry =search_exception_tables (regs->tpc); +if (entry) { +/* Ouch, somebody is trying VM hole tricks on us... */ +#ifdef DEBUG_EXCEPTIONS +printk ("Exception: PC<%016lx> faddr<UNKNOWN>\n" , regs->tpc); +printk ("EX_TABLE: insn<%016lx> fixup<%016lx>\n" , + regs->tpc, entry->fixup); +#endif + regs->tpc = entry->fixup; + regs->tnpc = regs->tpc +4 ; +return ; + }printk ("sun4v_data_access_exception: ADDR[%016lx] " "CTX[%04x] TYPE[%04x], going.\n" , addr, ctx, type);
Quoted 9 lines · David Miller
From: David Miller <[email protected]>
Date: Mon, 19 Jan 2009 22:35:17 -0800 (PST)Quoted 6 lines
The code in
sun4v_data_access_exception()needs some logic to properly handle the case of the kernel doing a userspace access. Currently it does an OOPS unconditionally when triggered from kernel space, which is wrong.I'll fix this up and post a patch.
Dave,
The patch does fix the issue.
Dennis
Quoted 52 lines
Dennis, here is a 2.6.27 based patch that should fix this bug.
sparc64: Fix DAX handling via userspace access from kernel.
If we do a userspace access from kernel mode, and get a data access exception, we need to check the exception table just like a normal fault does.
The spitfire DAX handler was doing this, but such logic was missing from the sun4v DAX code.
Reported-by Dennis Gilmore <[email protected]>Signed-off-by David S. Miller <[email protected]>arch/sparc64/kernel/traps.c +16
-2@@ -1,6 +1,6 @@/* arch/sparc64/kernel/traps.c * -* Copyright (C) 1995,1997,2008 David S. Miller ([email protected]) +* Copyright (C) 1995,1997,2008,2009 David S. Miller ([email protected]) * Copyright (C) 1997,1999,2000 Jakub Jelinek ([email protected]) */ @@ -262,6 +262,21 @@ void sun4v_data_access_exception(struct pt_regs *regs, unsigned long addr, unsig return;if (regs->tstate &TSTATE_PRIV ) { +/* Test if this comes from uaccess places. */ +const struct exception_table_entry *entry; + + entry =search_exception_tables (regs->tpc); +if (entry) { +/* Ouch, somebody is trying VM hole tricks on us... */ +#ifdef DEBUG_EXCEPTIONS +printk ("Exception: PC<%016lx> faddr<UNKNOWN>\n" , regs->tpc); +printk ("EX_TABLE: insn<%016lx> fixup<%016lx>\n" , + regs->tpc, entry->fixup); +#endif + regs->tpc = entry->fixup; + regs->tnpc = regs->tpc +4 ; +return ; + }printk ("sun4v_data_access_exception: ADDR[%016lx] " "CTX[%04x] TYPE[%04x], going.\n" , addr, ctx, type); --To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Dennis Gilmore <[email protected]>
Date: Fri, 23 Jan 2009 11:31:48 -0600
Quoted 9 lines · David Miller
Quoted 8 lines
From: David Miller <[email protected]>
Date: Mon, 19 Jan 2009 22:35:17 -0800 (PST)Quoted 5 lines
The code in
sun4v_data_access_exception()needs some logic to properly handle the case of the kernel doing a userspace access. Currently it does an OOPS unconditionally when triggered from kernel space, which is wrong.
Quoted 4 lines
Quoted 1 line
Quoted 1 line
I'll fix this up and post a patch.
Dave,
The patch does fix the issue.
Thanks a lot for testing.