Bug #1364

panic: Fatal trap 12

Added by ftigeot almost 5 years ago. Updated almost 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

I've got yet an other panic on my backup box.

System is Opteron-170, 2GB RAM, em0 NIC.
DragonFly-2.2.0

Panic messages I found on the console:

Fatal trap 12: page fault while in kernel mode
mp_lock = 00000001; cpuid = 1; lapic.id = 01000000

fault virtual address = 0x7c
fault code = supervisor write, page not present
instruction pointer = 0x8:0xc0451953
stack pointer = 0x10:0xdf322a14
frame pointer = 0x10:0xdf322a34
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enabled, resume, IOPL=0
current process = 13142 (find)
current thread = pri 10
<- SMP: XXX

kernel: type 12 trap, code = 2
CPU1 stopping CPUs : 0x00000001
stopped

Stopped at hammer_get_vnode+0x61: movl $0x8, 0x7c

History

#1 Updated by ftigeot almost 5 years ago

On Fri, May 15, 2009 at 12:53:36AM -0700, Matthew Dillon wrote:
>
> :Stopped at hammer_get_vnode+0x61: movl $0x8, 0x7c
>
> Got it. Simple code bug, if hammer_get_vnode() races it does
> not properly clean-up the raced vnode.
>
> (I'm committing this now, it's an obvious fix)

I have upgraded to 2.3.1. Thanks !

#2 Updated by luxh almost 5 years ago

fixed in ee23ac7ddab85b277a9e2f24d41c09fac2b0496c

#3 Updated by dillon almost 5 years ago

:I've got yet an other panic on my backup box.
:
:System is Opteron-170, 2GB RAM, em0 NIC.
:DragonFly-2.2.0
:
:Panic messages I found on the console:
:
:Fatal trap 12: page fault while in kernel mode
:mp_lock = 00000001; cpuid = 1; lapic.id = 01000000
:
:fault virtual address = 0x7c
:fault code = supervisor write, page not present
:instruction pointer = 0x8:0xc0451953
:stack pointer = 0x10:0xdf322a14
:frame pointer = 0x10:0xdf322a34
:code segment = base 0x0, limit 0xfffff, type 0x1b
: = DPL 0, pres 1, def32 1, gran 1
:processor eflags = interrupt enabled, resume, IOPL=0
:current process = 13142 (find)
:current thread = pri 10
: <- SMP: XXX
:
:kernel: type 12 trap, code = 2
:CPU1 stopping CPUs : 0x00000001
: stopped
:
:Stopped at hammer_get_vnode+0x61: movl $0x8, 0x7c
:
:--
:Francois Tigeot

Got it. Simple code bug, if hammer_get_vnode() races it does
not properly clean-up the raced vnode.

(I'm committing this now, it's an obvious fix)

-Matt
Matthew Dillon
<>

diff --git a/sys/vfs/hammer/hammer_inode.c b/sys/vfs/hammer/hammer_inode.c
index 7069c4b..a123dff 100644
--- a/sys/vfs/hammer/hammer_inode.c
+++ b/sys/vfs/hammer/hammer_inode.c
@@ -251,6 +251,7 @@ hammer_get_vnode(struct hammer_inode *ip, struct vnode **vpp)
hammer_lock_ex(&ip->lock);
if (ip->vp != NULL) {
hammer_unlock(&ip->lock);
+ vp = *vpp;
vp->v_type = VBAD;
vx_put(vp);
continue;

Also available in: Atom PDF