Description of problem: LUN 0 of MSA1000 Storage Array was configured on MDS9216 as an iscsi virtual target. When iscsi-ls -l is executed on the linux-host for iscsi initiator 3.6.2, I get a segmentation fault as mentioned below: Output of iscsi-ls -l [root@linux-2 src]# iscsi-ls -l ****************************************************************** ************* SFNet iSCSI Driver Version ... 3.6.2 (27-Sep-2004 ) ****************************************************************** ************* Segmentation fault Version-Release number of selected component (if applicable): kernel-2.4.20-8 How reproducible: Every time Steps to Reproduce: 1. On MDS created the iscsi virtual target as follows: MDS# sh iscsi virtual-target iqn.2004-04.com.cisco.cnitin-msafull target: iqn.2004-04.com.cisco.cnitin-msafull Port WWN 50:08:05:f3:00:03:05:31 Configured node No. of advertised interface: 1 GigabitEthernet 2/1 No. of initiators permitted: 1 initiator 10.1.1.24/32 is permitted all initiator permit is disabled trespass support is disabled revert to primary support is disabled 2. From Host, configured the DiscoveryAddress 3. Started the driver 4. Executed iscsi-ls -l 5. Immediately got segmentation fault. Actual results: 1. Immediately got segmentation fault. 2. More log at this moment are mentioned in logmessages.txt attached. Expected results: iscsi-ls -l should have given output by displaying all 14 LUNs of MSA1000 Storage Array Additional info: None
Please provide an strace of the 'iscsi-ls' run. There is no log attached to this bug yet, so if you still have that, please attach it as well.
Created attachment 113816 [details] /var/log/messages when the devices got created for MSA
Created attachment 113817 [details] strace for iscsi-ls -l
Could you run the command 'scsi_info /dev/sdb' on that setup? scsi_info is in the kernel-pcmcia-cs package.
Using kernel-pcmcia-cs-3.1.31-13: [root@linux-2 tools]# scsi_info /dev/sdb SCSI_ID="0,14,1" MODEL="Direct-A " FW_REV="SCSI"
Ok, how about scsi_unique_id from the devlabel package. 'scsi_unique_id /dev/sdb'
The reason I'd like to see this (request in comment #6) is I think the code that's segfaulting is pulled from the scsi_unique_id source. It'll help me narrow down what's going on.
[root@linux-2 root]# scsi_unique_id /dev/sdb model: COMPAQ MSA1000 VOLUME page83 type3: 600805f300030530a43e426d12be0034 page83 type0: 00000000 page83 type3: 3630303830354633303030333035333041343345343236443132424530303334 page83 type0: 3030303030303030 page80: 5035363335304239494e38303937 Executing the same command on another LUN/device identified: [root@linux-2 root]# scsi_unique_id /dev/sdm model: COMPAQ MSA1000 VOLUME page83 type3: 600805f300030530a3fef325d4be003f page83 type0: 00000000 page83 type3: 3630303830354633303030333035333041334645463332354434424530303346 page83 type0: 3030303030303030 page80: 5035363335304239494e38303937
I believe this is caused by the memory errors documented in bug #158343
Allocation fixes committed to the upstream 3.6 tree.
Brief Description: Configuration of MSA 1000 Arrays crashes iscsi-ls -l execution This test was conducted in the latest initiator version 3.6.3. When configured only one LUN from MSA1000 and executed iscsi-ls -l, it did not crash. Dmesg shows: scsi2 : iSCSI 3.6.3.0 variant (27-Jun-2005) iSCSI: bus 0 target 23 = iqn.2004-04.com.cisco.cnitin-msa2-lun-1 iSCSI: bus 0 target 23 portal 0 = address 10.1.1.80 port 3260 group 12416 iSCSI: bus 0 target 23 trying to establish session da620000 to portal 0, address 10.1.1.80 port 3260 group 12416 iSCSI: bus 0 target 23 established session da620000 #1, portal 0, address 10.1.1.80 port 3260 group 12416 scsi singledevice 2 0 23 1 Vendor: COMPAQ Model: MSA1000 VOLUME Rev: 4.32 Type: Direct-Access ANSI SCSI revision: 04 Attached scsi disk sdb at scsi2, channel 0, id 23, lun 1 iSCSI: session da620000 recv_cmd cfbc6000, cdb 0x0, status 0x2, response 0x0, senselen 18, key 06, ASC/ASCQ 29/00, itt 26 task c7cb4158 to (2 0 23 1), iqn.2004-04.com.cisco.cnitin-msa2-lun-1 iSCSI: Sense 70000600 0000000a 00000000 29000000 0000 SCSI device sdb: 71130720 512-byte hdwr sectors (36419 MB) sdb: unknown partition table Display of iscsi-ls -l was as follows: [root@linux-2 tools]# iscsi-ls -l ******************************************************************************* SFNet iSCSI Driver Version ... 3.6.3 (27-Jun-2005 ) ******************************************************************************* TARGET NAME : iqn.2004-04.com.cisco.cnitin-msa2-lun-1 TARGET ALIAS : HOST NO : 2 BUS NO : 0 TARGET ID : 23 TARGET ADDRESS : 10.1.1.80:3260 SESSION STATUS : ESTABLISHED AT Tue Jul 26 23:03:39 2005 NO. OF PORTALS : 1 PORTAL ADDRESS 1 : 10.1.1.80:3260,12416 SESSION ID : ISID 00023d000001 TSIH 3080 DEVICE DETAILS : -------------- LUN ID : 1 Vendor: COMPAQ Model: MSA1000 VOLUME Rev: 4.32 Type: Direct-Access ANSI SCSI revision: 04 page83 type3: 600805f300030530a43e426d12be0034 page80: 5035363335304239494e38303937 page83 type0: 00000000 Device: /dev/sdb ******************************************************************************* Added another LUN and reloaded the driver - still works fine. ******************************************************************************* [root@linux-2 linux-iscsi-3.6.3]# iscsi-ls -l ******************************************************************************* SFNet iSCSI Driver Version ... 3.6.3 (27-Jun-2005 ) ******************************************************************************* TARGET NAME : iqn.2004-04.com.cisco.cnitin-msa2-lun-1 TARGET ALIAS : HOST NO : 2 BUS NO : 0 TARGET ID : 23 TARGET ADDRESS : 10.1.1.80:3260 SESSION STATUS : ESTABLISHED AT Tue Jul 26 23:03:39 2005 NO. OF PORTALS : 1 PORTAL ADDRESS 1 : 10.1.1.80:3260,12416 SESSION ID : ISID 00023d000001 TSIH 3080 DEVICE DETAILS : -------------- LUN ID : 1 Vendor: COMPAQ Model: MSA1000 VOLUME Rev: 4.32 Type: Direct-Access ANSI SCSI revision: 04 page83 type3: 600805f300030530a43e426d12be0034 page80: 5035363335304239494e38303937 page83 type0: 00000000 Device: /dev/sdb ******************************************************************************* TARGET NAME : iqn.2004-04.com.cisco.cnitin-msa2-lun-2 TARGET ALIAS : HOST NO : 2 BUS NO : 0 TARGET ID : 24 TARGET ADDRESS : 10.1.1.80:3260 SESSION STATUS : ESTABLISHED AT Tue Jul 26 23:05:02 2005 NO. OF PORTALS : 1 PORTAL ADDRESS 1 : 10.1.1.80:3260,12416 SESSION ID : ISID 00023d000001 TSIH 3080 DEVICE DETAILS : -------------- LUN ID : 2 Vendor: COMPAQ Model: MSA1000 VOLUME Rev: 4.32 Type: Direct-Access ANSI SCSI revision: 04 page83 type3: 600805f300030530a2be5370865c0035 page80: 5035363335304239494e38303937 page83 type0: 00000000 Device: /dev/sdc ******************************************************************************* Added one JBOD, again worked fine: [root@linux-2 linux-iscsi-3.6.3]# iscsi-ls -l ******************************************************************************* SFNet iSCSI Driver Version ... 3.6.3 (27-Jun-2005 ) ******************************************************************************* TARGET NAME : iqn.2004-04.com.cisco.cnitin-linux26-jbod-567c TARGET ALIAS : HOST NO : 2 BUS NO : 0 TARGET ID : 18 TARGET ADDRESS : 10.1.1.80:3260 SESSION STATUS : ESTABLISHED AT Tue Jul 26 23:06:45 2005 NO. OF PORTALS : 1 PORTAL ADDRESS 1 : 10.1.1.80:3260,12416 SESSION ID : ISID 00023d000001 TSIH 3080 DEVICE DETAILS : -------------- ******************************************************************************* TARGET NAME : iqn.2004-04.com.cisco.cnitin-linux26-jbod-572d TARGET ALIAS : HOST NO : 2 BUS NO : 0 TARGET ID : 19 TARGET ADDRESS : 10.1.1.80:3260 SESSION STATUS : ESTABLISHED AT Tue Jul 26 23:06:10 2005 NO. OF PORTALS : 1 PORTAL ADDRESS 1 : 10.1.1.80:3260,12416 SESSION ID : ISID 00023d000001 TSIH 3080 DEVICE DETAILS : -------------- LUN ID : 0 Vendor: SEAGATE Model: ST318452FC Rev: 0004 Type: Direct-Access ANSI SCSI revision: 04 page83 type3: 20000004cf8c572d page80: 3345563036523245303030303732343144393657 Device: /dev/sdd ******************************************************************************* TARGET NAME : iqn.2004-04.com.cisco.cnitin-msa2-lun-1 TARGET ALIAS : HOST NO : 2 BUS NO : 0 TARGET ID : 23 TARGET ADDRESS : 10.1.1.80:3260 SESSION STATUS : ESTABLISHED AT Tue Jul 26 23:03:39 2005 NO. OF PORTALS : 1 PORTAL ADDRESS 1 : 10.1.1.80:3260,12416 SESSION ID : ISID 00023d000001 TSIH 3080 DEVICE DETAILS : -------------- LUN ID : 1 Vendor: COMPAQ Model: MSA1000 VOLUME Rev: 4.32 Type: Direct-Access ANSI SCSI revision: 04 page83 type3: 600805f300030530a43e426d12be0034 page80: 5035363335304239494e38303937 page83 type0: 00000000 Device: /dev/sdb ******************************************************************************* TARGET NAME : iqn.2004-04.com.cisco.cnitin-msa2-lun-2 TARGET ALIAS : HOST NO : 2 BUS NO : 0 TARGET ID : 24 TARGET ADDRESS : 10.1.1.80:3260 SESSION STATUS : ESTABLISHED AT Tue Jul 26 23:05:02 2005 NO. OF PORTALS : 1 PORTAL ADDRESS 1 : 10.1.1.80:3260,12416 SESSION ID : ISID 00023d000001 TSIH 3080 DEVICE DETAILS : -------------- LUN ID : 2 Vendor: COMPAQ Model: MSA1000 VOLUME Rev: 4.32 Type: Direct-Access ANSI SCSI revision: 04 page83 type3: 600805f300030530a2be5370865c0035 page80: 5035363335304239494e38303937 page83 type0: 00000000 Device: /dev/sdc Added another JBOD (4th target) and immediately I started getting Segmentation Fault: [root@linux-2 linux-iscsi-3.6.3]# iscsi-ls -l ******************************************************************************* SFNet iSCSI Driver Version ... 3.6.3 (27-Jun-2005 ) ******************************************************************************* Segmentation fault
Do you have access to the debuginfo rpm? Can you grab that and use it to run the iscsi-ls through gdb to see where the segfault is happening? I have not been able to reproduce this with my setups, so it will be difficult to fix without a gdb backtrace.
Dang it - there's nothing in the debuginfo rpm - let me see if i can figure out why. Which architecture are you running on? i386? Have you tried compiling the upstream 3.6.3 tarball and seeing if you get the same segfault there? If so, you could compile that with -g and use gdb on that.
Created attachment 117785 [details] The attachment fixes the bug.
*** Bug 175346 has been marked as a duplicate of this bug. ***
This issue is on Red Hat Engineering's list of planned work items for the upcoming Red Hat Enterprise Linux 3.8 release. Engineering resources have been assigned and barring unforeseen circumstances, Red Hat intends to include this item in the 3.8 release.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2006-0398.html