Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2005 08:33:14 -0700
From:      othermark <atkin901@yahoo.com>
To:        freebsd-current@freebsd.org
Subject:   SMP hard lock with libpthread (thread X holds Y but isn't blocked on a lock)
Message-ID:  <d6aef1$bmc$1@sea.gmane.org>

next in thread | raw e-mail | index | archive | help
I have an application that uses shared memory/threads and is linked with
libpthread, running on May 10 -current.  Every time I run it, after a few
minutes *poof* hard lock on a SMP box.  All debug options are enabled in
the kernel, but it won't break to debugger.  Here's what appears on the
console, and addr2line output follows:


kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 01
fault virtual address   = 0x4
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc06b5dd9
stack pointer           = 0x28:0xe76eeb4c
frame pointer           = 0x28:0xe76eeb74
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = resume, IOPL = 0
current process         = 640 (tgen)
 

# addr2line -e kernel.debug 0xc06b5dd9
/usr/src/sys/kern/subr_turnstile.c:226
# ls -l /boot/kernel
total 13920
-r-xr-xr-x  1 root  wheel  7102901 May 10 17:15 kernel

215 #ifndef SMP
216                 /*
217                  * For UP, we check to see if td is curthread (this shou
217 ldn't
218                  * ever happen however as it would mean we are in a dead
218 lock.)
219                  */
220                 KASSERT(td != curthread, ("Deadlock detected"));
221 #endif
222
223                 /*
224                  * If we aren't blocked on a lock, we should be.
225                  */
226                 KASSERT(TD_ON_LOCK(td), (
227                     "thread %d(%s):%d holds %s but isn't blocked on a lo
227 ck\n",
228                     td->td_tid, td->td_proc->p_comm, td->td_state,
229                     ts->ts_lockobj->lo_name));


-- 
othermark
atkin901 at nospam dot yahoo dot com
(!wired)?(coffee++):(wired);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d6aef1$bmc$1>