Panic in camisr() w/CTL in stable-9

John jwd at FreeBSD.org
Thu Sep 12 00:06:44 UTC 2013


Hi Folks,

   I've been giving CTL a try and thought things were going well.

   I installed a QLogic 2532 card in a ZFS server and a second in
a rh62 linux system. Src is current as this afternoon - r255479.

isp0: <Qlogic ISP 2432 PCI FC-AL Adapter> port 0x8000-0x80ff mem 0xfbdf0000-0xfbdf3fff irq 64 at device 0.0 on pci33
isp1: <Qlogic ISP 2432 PCI FC-AL Adapter> port 0x8400-0x84ff mem 0xfbde0000-0xfbde3fff irq 68 at device 0.1 on pci33

   I create a lun via:

ctladm create -b block -o file=/dev/zvol/pool0/testvol   -S serialnum-fc -d testvol
ctladm realsync off
ctladm port -o on -t fc
ctladm port -l
ctladm devlist -v

LUN created successfully
backend:       block
device type:   0
LUN size:      107374182400 bytes
blocksize      512 bytes
LUN ID:        0
Serial Number: serialnum-fc
Device ID;     testvol

Port Online Type     Name         pp vp WWNN               WWPN              
0    NO     IOCTL    CTL ioctl    0  0  0                  0                 
1    NO     INTERNAL CTL internal 0  0  0                  0                 
2    NO     INTERNAL ctl2cam      0  0  0x5000000aa6e06700 0x5000000aa6e06703
3    YES    FC       isp0         0  0  0x2000001b328fc440 0x2100001b328fc440
4    YES    FC       isp1         1  0  0x2000001b32afc440 0x2101001b32afc440

LUN Backend       Size (Blocks)   BS Serial Number    Device ID       
  0 block             209715200  512 serialnum-fc     testvol         
      lun_type=0
      num_threads=14
      file=/dev/zvol/pool0/testvol


   I can run commands against the lun from the linux side with
no problems. For instance:

# sg_inq /dev/sdc
standard INQUIRY:
  PQual=0  Device_type=0  RMB=0  version=0x05  [SPC-3]
  [AERC=0]  [TrmTsk=0]  NormACA=0  HiSUP=1  Resp_data_format=2
  SCCS=0  ACC=0  TPGS=1  3PC=0  Protect=0  BQue=0
  EncServ=0  MultiP=1 (VS=0)  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=0  Linked=0  [TranDis=0]  CmdQue=1
    length=257 (0x101), but only fetched 36 bytes   Peripheral device type: disk
 Vendor identification: FREEBSD 
 Product identification: CTLDISK         
 Product revision level: 0001
 Unit serial number: serialnum-fc

# sg_readcap /dev/sdc
Read Capacity results:
   Last logical block address=209715199 (0xc7fffff), Number of blocks=209715200
   Logical block length=512 bytes
Hence:
   Device size: 107374182400 bytes, 102400.0 MiB, 107.37 GB



   However, when I try to partition the drive and format it, the ZFS server
panics with the following:

db:0:kdb.enter.default>  show pcpu
cpuid        = 11
dynamic pcpu = 0xffffff807f162c80
curthread    = 0xfffffe0021e20000: pid 12 "swi2: cambio"
curpcb       = 0xffffffbf8f69ebc0
fpcurthread  = none
idlethread   = 0xfffffe0021de9490: tid 100014 "idle: cpu11"
curpmap      = 0xffffffff81430118
tssp         = 0xffffffff8149e378
commontssp   = 0xffffffff8149e378
rsp0         = 0xffffffbf8f69ebc0
gs32p        = 0xffffffff8149c4b0
ldt          = 0xffffffff8149c4f0
tss          = 0xffffffff8149c4e0
db:0:kdb.enter.default>  bt
Tracing pid 12 tid 100043 td 0xfffffe0021e20000
uart_sab82532_class() at 0/frame 0xffffffbf8f69e9f0
camisr() at camisr+0xff/frame 0xffffffbf8f69ea20
intr_event_execute_handlers() at intr_event_execute_handlers+0xfd/frame 0xffffffbf8f69ea50
ithread_loop() at ithread_loop+0x9d/frame 0xffffffbf8f69eaa0
fork_exit() at fork_exit+0x11f/frame 0xffffffbf8f69eaf0
fork_trampoline() at fork_trampoline+0xe/frame 0xffffffbf8f69eaf0
--- trap 0, rip = 0, rsp = 0xffffffbf8f69ebb0, rbp = 0 ---

   This is on the client:

kernel: scsi 1:0:0:0: Direct-Access     FREEBSD  CTLDISK          0001 PQ: 0 ANSI: 5
kernel: sd 1:0:0:0: Attached scsi generic sg3 type 0
kernel: sd 1:0:0:0: [sdc] 209715200 512-byte logical blocks: (107 GB/100 GiB)
kernel: sd 1:0:0:0: [sdc] Write Protect is off
kernel: sd 1:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
kernel: sdc: unknown partition table
kernel: sd 1:0:0:0: [sdc] Attached SCSI disk
fcoemon: received fc event message 559
fcoemon: seconds:1378936473 host1 event_datalen:4
fcoemon: event_num:2 event_code:3 event_data:0
kernel: qla2xxx 0000:21:00.0: LOOP DOWN detected (2 5 0 0).
kernel: rport-1:0-0: blocked FC remote port time out: removing target and saving binding
kernel: sd 1:0:0:0: [sdc] Unhandled error code
kernel: sd 1:0:0:0: [sdc] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
kernel: sd 1:0:0:0: [sdc] CDB: Write(10): 2a 00 00 00 04 00 00 04 00 00
kernel: end_request: I/O error, dev sdc, sector 1024

   I can replicate this on demand at this point so please let me
know if there is any information I can provide.


   Any ideas where to go from here?

Thanks,
John







----- Edward Tomasz Napiera�a's Original Message -----

> I'm working on last few minor nits to get this into the tree.  Give me few days,
> I'll prepare a patch against 9-STABLE.
> 


More information about the freebsd-scsi mailing list