Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* 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