Re: ATA_CAM-ed mvsata(4) on OpenRD-client

From: Norikatsu Shigemura <nork_at_FreeBSD.org>
Date: Sun, 28 Feb 2010 13:59:47 +0900
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() _at_sys/cam/cam_periph.c
	-> adainit() _at_sys/cam/ata/ata_da.c			OK
	-> probe_periph_init() _at_sys/cam/scsi/scsi_xpt.c		OK
	-> pmpinit() _at_sys/cam/ata/ata_pmp.c			FREEZE
		-> xpt_register_async() _at_sys/cam/cam_xpt.c
			-> xpt_for_all_devices() _at_sys/cam/cam_xpt.c
				-> xptbustraverse() _at_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}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Received on Sun Feb 28 2010 - 03:59:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:01 UTC