ATA_CAM-ed mvsata(4) on OpenRD-client

Norikatsu Shigemura nork at FreeBSD.org
Sun Feb 28 04:59:51 UTC 2010


Hi mav.

On Sun, 28 Feb 2010 13:31:45 +0900
Norikatsu Shigemura <nork at ninth-nine.com> wrote:
> 	I didn't know what's happen.  So I'll report code trace and
> 	cam related struct dump with ddb which I made.

	Code trace with printf debug:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
periphdriver_init() @sys/cam/cam_periph.c
	-> adainit() @sys/cam/ata/ata_da.c			OK
	-> probe_periph_init() @sys/cam/scsi/scsi_xpt.c		OK
	-> pmpinit() @sys/cam/ata/ata_pmp.c			FREEZE
		-> xpt_register_async() @sys/cam/cam_xpt.c
			-> xpt_for_all_devices() @sys/cam/cam_xpt.c
				-> xptbustraverse() @sys/cam/cam_xpt.c

	- - - - - in xptbustraverse() - - - - -
	for (bus = (start_bus ? start_bus : TAILQ_FIRST(&xsoftc.xpt_busses));
	     bus != NULL;
	     bus = next_bus) {
		 next_bus = TAILQ_NEXT(bus, links);

		 mtx_unlock(&xsoftc.xpt_topo_lock);
->		 CAM_SIM_LOCK(bus->sim);
freeze at this point, because of not catch lock, in the first loop.
		 retval = tr_func(bus, arg);
		 CAM_SIM_UNLOCK(bus->sim);
		 if (retval == 0)
			  return(retval);
		 mtx_lock(&xsoftc.xpt_topo_lock);
	}
	- - - - - in xptbustraverse() - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

	So I dumped following mtx, cam_eb IN (0xc36c88c0, 0xc3770840,
	0xc35df5c0)->sim.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
db> show lock 0xc35e5974
 class: spin mutex
 name:
 flags: {SPIN}
 state: {OWNED, CONTESTED}
 owner: 0xc36c8d00 (tid 0, pid -1062090240, "")
db> show lock 0xc35e5774
 class: sleep mutex
 name: ATA state lock
 flags: {DEF}
 state: {UNOWNED}
db> show lock 0xc0be5204
 class: sleep mutex
 name: XPT lock
 flags: {DEF}
 state: {UNOWNED}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


More information about the freebsd-current mailing list