Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Re: Character driver simple lock owned panic debug
  1996-02-22  5:00 Character driver simple lock owned panic debug John Sanders
@ 1996-02-22  5:00 ` Jeffrey M. Denham
  0 siblings, 0 replies; 2+ messages in thread
From: Jeffrey M. Denham @ 1996-02-22  5:00 UTC (permalink / raw)



In article <312C824C.41C6@globalcom.net>, John Sanders <jsanders@globalcom.net> writes:
>I have a chacter driver for a HiPPi interface card that I developed. It
>intermitantly panics with a simple lock owned. The crash summary is as
>follows:
...      

>Line 1172 is the mpsleep call. Its not locking at all. Can anyone tell
>me where to look?

Well, the kernel certainly thinks you own a simple lock. I haven't seen
it lie yet.


Get it to happen in lockmode 4 (lock debugging mode). In the crash dump,
do this:

(dbx) px slock_debug[paniccpu]

This should print out the addresses of simple locks taken on the
processor your thread was running on. In other words, these the simple
locks your thread held when it called mpsleep.

Let me know if it prints out all 0s.

If it doesn't, those are lock addresses and will have the lower six
hex digits of the pc where the lock was taken in the sl_data field.

For example, if sl_data is 0x2b3808, you can see where that lock was
taken like this:

(dbx) 0xfffffc00002b3808/i
[thread_release:2187, 0xfffffc00002b3808] bsr r26, simple_unlock_D(line 822)

This shows where a thread lock was unlocked sometime in the past.




-- 

-----------------------------------------------------------------------------
Jeff Denham, Unix Software Group, Digital Equipment Corporation
email: denham@zk3.dec.com, voice: (603) 881-0057



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Character driver simple lock owned panic debug
@ 1996-02-22  5:00 John Sanders
  1996-02-22  5:00 ` Jeffrey M. Denham
  0 siblings, 1 reply; 2+ messages in thread
From: John Sanders @ 1996-02-22  5:00 UTC (permalink / raw)


I have a chacter driver for a HiPPi interface card that I developed. It
intermitantly panics with a simple lock owned. The crash summary is as
follows:

warning: Files compiled -g3: parameter values probably wrong
_stack_trace[1]_begin: 
>  0 stop_secondary_cpu() ["../../../../src/kernel/arch/alpha/cpu.c":352, 0xffff
fc00003df0a8]
   1 panic(s = 0xfffffc000050b9e8 = "event_timeout: panic request")
["../../../.
./src/kernel/bsd/subr_prf.c":664, 0xfffffc00003a6f88]
   2 event_timeout(func = 0xfffffc00003a71e0, arg = 0xfffffc000091dda8,
timeout 
= 3716520) ["../../../../src/kernel/arch/alpha/cpu.c":698,
0xfffffc00003dfb48]
   3 xcpu_puts(s = 0xffffffffd0777020, prfbufp = 0xfffffc000091dda8)
["../../../
../src/kernel/bsd/subr_prf.c":802, 0xfffffc00003a7244]
   4 printf(va_alist = -4398041235616)
["../../../../src/kernel/bsd/subr_prf.c":
351, 0xfffffc00003a6594]
   5 panic(s = 0xfffffc000050b290 = "thread_block: simple lock owned")
["../../.
./../src/kernel/bsd/subr_prf.c":714, 0xfffffc00003a70fc]
   6 thread_block() ["../../../../src/kernel/kern/sched_prim.c":1707,
0xfffffc00
003d8244]
   7 mpsleep(0x50008, 0x  reg->state=JHB_IO_PENDING
100, 0x2000, 0x1400, 0x0) ["../../../../src/kernel/bsd/k
ern_synch.c":434, 0xfffffc00003a42a4]
   8 jhwrite(dev = 51380224, uio = 0xffffffffd0777768, flag = 0)
["/sys/io/JES/j
h_driver/jh_drvr.c":1172, 0xfffffc00004bebd0]
   9 spec_write(0x0, 0xffffffff81a399c8, 0x0, 0xffffffff81a399c8,
0xfffffc000029
35a8) ["../../../../src/kernel/vfs/spec_vnops.c":1741,
0xfffffc00003b2a1c]
  10 ufsspec_write(vp = 0xffffffffaf218400, uio = 0xffffffffd0777768,
ioflag = 0
, cred = 0xffffffff81a399c8)
["../../../../src/kernel/ufs/ufs_vnops.c":3336, 0xf

The lines around 1172 in my driver source (jh_drvr.c - the jhwrite
function) is as follows:

  reg->state=JHB_IO_PENDING;    /* show ready for output */
  while(reg->state==JHB_IO_PENDING){  /* loop tring to start */
    if(jh->src.intrflag==JHI_IDLE && jh->src.stat_index ==
        jh->src.cmd_index){
      RAISE_IPL(cur_pri);               /* lock data */
/*      SRC_LOCK; */
/* Simple Lock reuse panic fix Nov 15 1995 */
      /* do a try to eliminate the panic - SRC_LOCK */
      try_ret_val =
simple_lock_try((simple_lock_t)&(jh->src.lk_jh_softc));
      if(try_ret_val == FALSE){
        /* lock is busy so try again */
        LOWER_IPL(cur_pri);             /* unlock the cpu */
        /* sleep a second to allow to queues */
        i = mpsleep(lbolt,PCATCH,"srcwait", JH_SRC_TIMEOUT_VALUE,
             (void *) NULL, 0);
        /* We continue to try access the source side again */
        continue;
      } 

Line 1172 is the mpsleep call. Its not locking at all. Can anyone tell
me where to look?

Thanks is advance!

-- 
_____________________________________
john sanders <jsanders@globalcom.net>

       >- it can be done -<

-------------------------------------



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-02-22  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-02-22  5:00 Character driver simple lock owned panic debug John Sanders
1996-02-22  5:00 ` Jeffrey M. Denham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox