Subject: Re: PR 8924, scsi crashes (was Re: Existing PRs)
To: None <port-arm32@NetBSD.ORG>
From: Leo Smiers <l.smiers@chello.nl>
List: port-arm32
Date: 03/31/2001 15:21:50
In message <01033113351700.00335@pinky.paradox.demon.co.uk> you wrote:

> On Saturday 31 March 2001  8:36 am, Jan-Uwe Finck wrote:
> > On Fri, Mar 30, 2001 at 11:36:49PM +0100, Chris Gilbert wrote:
> > > On Thursday 29 March 2001  7:33 am, Jan-Uwe Finck wrote:
> > > > On Wed, Mar 28, 2001 at 11:57:15PM +0100, Chris Gilbert wrote:
> > > > > port-arm32/8924[open sw-bug] port-arm32: use of Cumana SCSI II
> > > > > crashes system Can anyone with one of these confirm it still crashes?
> > > >
> > > > Three weeks ago I tested it and it did.
> > > >
> > > > Same with Connect32, BTW, tested 2 weeks ago.
> > > > Just trying to mount a CD or HD crashes the system and brings you
> > > > to the kernel debugger.
> > >
> > > Can you get a trace of this?
> >
> > Sure. Here it is: (Connect 32, trying to mount a CD with : mount
> > /dev/cd0a /mnt)
> >
> > ...
> > ...
> > dumping to dev 16,9 offset 199536
> > dump 0 panic: pmap_remove_pv: lost entry
> > Stopped in pid 181 (mount_cd9660) at _cpu_Debugger+0x10: ldmbd r11
> > {r11, r13, r15}
> > db> trace
> > _cpu_Debugger(_cpu_Debugger+0x10)
> > _panic(_panic+0x14)
> > _pmap_remove_pv(_pmap_remove_pv+0x10)
> > _pmap_enter(_pmap_enter+0x10)
> > _pmap_map(_pamp_map+0x10)
> > _dumpsys(_dumpsys+0x10)
> > _cpu_reboot(_cpu_reboot+0x10)
> > _panic(_panic+0x14)
> > __pool_get(__pool_get+0x754)
> > __pool_put(__pool_put+0x10)
> > _scsipi_free_xs(_scsipi_free_xs+0x10)
> > _cdstart(_cdstart+0x10)
> > _cdstrategy(_cdstrategy+0x10)
> > _spec_strategy(_spec_strategy+0x10)
> > _VOP_STRATEGY(_VOP_STRATEGY+0x10)
> > _bread(_bread+0x10)
> > _cd9660_mount(_cd9660_mount+0x358)
> > _cd9660_mount(_cd9660_mount+0x10)
> > _sys_mount(_sys_mount+0x10)
> > _syscall(_syscall+0x10)
> > db>
> 
> It looks like we panic, attempt to dump core and panic 
> again.  However looking at the code I can't see a code path from 
> scsipi_free_xs into pool_put, there's a pool_get call though, so I'm a tad 
> confused.
> 
> Could you try adding:
> -DSCSIDEBUG=1
> to your makeoptions DEBUG= line (or if you've not got one, add:
> makeoptions DEBUG="-g -DSCSIDEBUG=1" to your config file.
> 
> And rebuild.
> 
> I can't make any promises that I'll be able to debug this but the option will 
> give a bit more info of what the scsi was doing when it crashes.
> 
A couple of months ago I have looked into this. The problem is that we are
polling the SCSI device. The generic drivers handle polling not very well.
Mark Brinicomp sis some work on this about two years ago and last December
I fixed these (for the second time) to fit into the current (I believe it 
was 1.5) source tree. It worked for the Connect 32 card. I did not commit 
these files or made it public. But before you start all over again I think
I should make it public now. However it did work in december and I do not
know if the new files will work with the current source tree.

As I am not in sync with the current source tree and have other interests at
the moment I would like to ask some one else to take these files from me and
finish the work of Mark and me.

Leo

-- 
Leo Smiers
System specialist FB/SP             bv Nederland Haarlem
!PDF 0.73a | !Flash 0.49.4.0        http://members.ams.chello.nl/l.smiers