Subject: Re: PR 8924, scsi crashes (was Re: Existing PRs)
To: Jan-Uwe.Finck@bigfoot.de, Jan-Uwe Finck <ju.finck@nord-com.net>
From: Chris Gilbert <chris@paradox.demon.co.uk>
List: port-arm32
Date: 03/31/2001 13:35:17
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.

Cheers,
Chris