Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Apr 2008 12:58:57 +1000
From:      Andrew Snow <andrew@modulus.org>
To:        freebsd-stable@freebsd.org
Subject:   Panic in kqueue_close from kern_close
Message-ID:  <480AB171.6060901@modulus.org>

next in thread | raw e-mail | index | archive | help

Hello,

Can anyone help me try and work out what went wrong here?

I am running on 7.0-PRERELEASE on amd64.  However, the file kern_event.c 
hasn't changed anytime since then in 7-STABLE.



Fatal trap 12: page fault while in kernel mode
cpuid = 2; apic id = 02
fault virtual address   = 0x9a050
fault code              = supervisor write data, page not present
instruction pointer     = 0x8:0xffffffff8027f877
stack pointer           = 0x10:0xffffffffb4c0a9e0
frame pointer           = 0x10:0xffffff005c0ccda0
code segment            = base 0x0, limit 0xfffff, type 0x1b
                         = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 12949 (smtpd)
trap number             = 12
panic: page fault
cpuid = 2
Uptime: 6d11h8m19s
Physical memory: 8183 MB



(kgdb) bt
#0  doadump () at pcpu.h:194
#1  0x0000000000000004 in ?? ()
#2  0xffffffff8029e6ef in boot (howto=260) at 
/usr/src/sys/kern/kern_shutdown.c:409
#3  0xffffffff8029eb37 in panic (fmt=Variable "fmt" is not available.
) at /usr/src/sys/kern/kern_shutdown.c:563
#4  0xffffffff803df54e in trap_fatal (frame=0xc, eva=Variable "eva" is 
not available.
) at /usr/src/sys/amd64/amd64/trap.c:724
#5  0xffffffff803df903 in trap_pfault (frame=0xffffffffb4c0a930, 
usermode=0) at /usr/src/sys/amd64/amd64/trap.c:641
#6  0xffffffff803e00a1 in trap (frame=0xffffffffb4c0a930) at 
/usr/src/sys/amd64/amd64/trap.c:410
#7  0xffffffff803c6fde in calltrap () at 
/usr/src/sys/amd64/amd64/exception.S:169
#8  0xffffffff8027f877 in kqueue_close (fp=0xffffff0114352000, 
td=0xffffff003bcb3680)
     at /usr/src/sys/kern/kern_event.c:1457
#9  0xffffffff802762cf in fdrop (fp=0xffffff0114352000, 
td=0xffffff003bcb3680) at file.h:297
#10 0xffffffff802775cd in closef (fp=0xffffff0114352000, 
td=0xffffff003bcb3680) at /usr/src/sys/kern/kern_descrip.c:1958
#11 0xffffffff80277d3e in kern_close (td=0xffffff003bcb3680, fd=Variable 
"fd" is not available.
) at /usr/src/sys/kern/kern_descrip.c:1054
#12 0xffffffff803dfaeb in syscall (frame=0xffffffffb4c0ac70) at 
/usr/src/sys/amd64/amd64/trap.c:852
#13 0xffffffff803c71eb in Xfast_syscall () at 
/usr/src/sys/amd64/amd64/exception.S:290
#14 0x0000000800bee16c in ?? ()
Previous frame inner to this frame (corrupt stack?)


The offending line:

#8  0xffffffff8027f877 in kqueue_close (fp=0xffffff0114352000, 
td=0xffffff003bcb3680)
     at /usr/src/sys/kern/kern_event.c:1457
1457                    while ((kn = SLIST_FIRST(&kq->kq_knlist[i])) != 
NULL) {


The process that made the syscall was a postfix smtpd inside a jail.  It 
had been running fine for almost a week before this.


Any hints appreciated,


- Andrew




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?480AB171.6060901>