From nobody@FreeBSD.org  Sun Jan 22 17:45:19 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5AA6116A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 22 Jan 2006 17:45:19 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2C80F43D45
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 22 Jan 2006 17:45:19 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k0MHjJm5020936
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 22 Jan 2006 17:45:19 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k0MHjIjq020935;
	Sun, 22 Jan 2006 17:45:19 GMT
	(envelope-from nobody)
Message-Id: <200601221745.k0MHjIjq020935@www.freebsd.org>
Date: Sun, 22 Jan 2006 17:45:19 GMT
From: Attila Nagy <bra@fsn.hu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: SCSI target mode LOR
X-Send-Pr-Version: www-2.3

>Number:         92164
>Category:       kern
>Synopsis:       [ips] [lor] SCSI target mode LOR
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    scottl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 22 17:50:03 GMT 2006
>Closed-Date:    Sun Dec 04 21:35:53 UTC 2011
>Last-Modified:  Sun Dec 04 21:35:53 UTC 2011
>Originator:     Attila Nagy
>Release:        7-CURRENT
>Organization:
-
>Environment:
7-CURRENT as of today.
>Description:
I'm doing some experiments with FreeBSD target mode support on Fibre Channel
and thought that I should give CURRENT a try too.

The machine itself is an HP BL25p with 8 GB of RAM (but hw.physmem set to
under 4G, it seems the isp driver needs this) and dual Opterons. Running
amd64 code.

This is what I get after issuing
scsi_target -A -S -T -W 32 2:0:0 /data/file1

lock order reversal: (sleepable after non-sleepable)
 1st 0xffffffff808ce680 targ global (targ global) @ /usr/src/sys/cam/scsi/scsi_target.c:418
 2nd 0xffffffff808e98c0 kernel environment (kernel environment) @ /usr/src/sys/kern/subr_hints.c:117
KDB: stack backtrace:
witness_checkorder() at witness_checkorder+0x4f9
_sx_slock() at _sx_slock+0x4d
res_find() at res_find+0x41a
resource_find() at resource_find+0x7e
resource_find_dev() at resource_find_dev+0x5f
cam_periph_alloc() at cam_periph_alloc+0x1df
targioctl() at targioctl+0x3a7
giant_ioctl() at giant_ioctl+0x65
devfs_ioctl_f() at devfs_ioctl_f+0x6f
ioctl() at ioctl+0x147
syscall() at syscall+0x517
Xfast_syscall() at Xfast_syscall+0xa8
--- syscall (54, FreeBSD ELF64, ioctl), rip = 0x800909aac, rsp = 0x7fffffffbb98, rbp = 0x7fffffffe700 ---

>How-To-Repeat:

>Fix:
6-STABLE works, at least the above command can be used without a LOR or panic.
But there are some other concerns with target mode, which could be improved.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->scottl 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Jan 22 18:27:24 UTC 2006 
Responsible-Changed-Why:  
scottl requested this one IIRC. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92164 

From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/92164: SCSI target mode LOR
Date: Sun, 22 Jan 2006 19:25:01 +0000 (UTC)

 For further references I added this LOR with ID 176 to "the LOR page".
  	http://sources.zabbadoz.net/freebsd/lor.html#176
State-Changed-From-To: open->closed 
State-Changed-By: scottl 
State-Changed-When: Sun Dec 4 21:30:40 UTC 2011 
State-Changed-Why:  
Closing due to age.  The CAM stack has undergone significant synchronization 
work, so if this problem is still relevant then it will need to be re-tested. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=92164 
>Unformatted:
