Subject: Re: NetBSD-1.1-current crash in tsleep
To: None <netbsd-bugs@NetBSD.ORG>
From: Darren Hosking <dmh@tusc.com.au>
List: netbsd-bugs
Date: 03/08/1996 15:55:31
Previously I write:

> I'm running NetBSD 1.1-current (as of Monday 26/2/96) on a Pentium 90 with
> 16Mb of memory and after a few hours the system crashes in tsleep with the
> following trace from the kernel debugger:
> 
> _tsleep+0x1e
> _lock_clear_recursive
> _vm_pager_get_pages
> _vm_pager_get
> _vm_fault
> _vm_fault_wire
> _vm_map_pageable
> _swapin
> _gdt_put_slot
> _tss_free
> _switch_exit
> _bpendtsleep
> _scheduler
> _main
> 

Well I didn't get any replies so...

The crash occurs in the kernel trace (KTRACE) checking and so I took it out of
my configuration and built a new kernel and I haven't had a crash since.
Previously I was getting around a crash a day. The system has been up for
7 days since removing KTRACE from the kernel.

Here is where I kept getting crashes:

int
tsleep(ident, priority, wmesg, timo)
        void *ident;
        int priority, timo;
        char *wmesg;
{
        register struct proc *p = curproc;
        register struct slpque *qp;
        register s;
        int sig, catch = priority & PCATCH;
        extern int cold;
        void endtsleep __P((void *));

#ifdef KTRACE
        if (KTRPOINT(p, KTR_CSW))		<-------------- crashes in
                ktrcsw(p->p_tracep, 1, 0);	<-------------- here
#endif
...
...

I've seen similar stack traces to mine reported here so this may fix other
peoples problems too.

	dmh

Darren Hosking TUSC Computer Systems dmh@tusc.com.au