From nobody@FreeBSD.org  Thu Apr 26 14:47:43 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 51F7A1065673
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 26 Apr 2012 14:47:43 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 23EFF8FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 26 Apr 2012 14:47:43 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QElgcX013252
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 26 Apr 2012 14:47:42 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q3QElgOl013251;
	Thu, 26 Apr 2012 14:47:42 GMT
	(envelope-from nobody)
Message-Id: <201204261447.q3QElgOl013251@red.freebsd.org>
Date: Thu, 26 Apr 2012 14:47:42 GMT
From: Jean-Christophe Guillain <jc.guillain@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Segmentation fault with iscontrol
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         167331
>Category:       bin
>Synopsis:       Segmentation fault with iscontrol(8)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 26 14:50:07 UTC 2012
>Closed-Date:    
>Last-Modified:  Wed May  9 18:20:26 UTC 2012
>Originator:     Jean-Christophe Guillain
>Release:        FreeBSD 8.2-RELEASE
>Organization:
>Environment:
FreeBSD endor.fr.sequans.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
When trying to do a discovery session with iscontrol the outup is either incomplete in standard mode, or a segmentation fault occurs in verbose mode.


root@endor:~# iscontrol -v -d -t 192.168.100.50             
                    port = 3260
                    tags = 0
                 maxluns = 0
                     iqn = iqn.2005-01.il.ac.huji.cs:
          maxConnections = 1
maxRecvDataSegmentLength = 65536
maxXmitDataSegmentLength = 65536
          maxBurstLength = 131072
        firstBurstLength = 65536
        defaultTime2Wait = 0
      defaultTime2Retain = 0
       maxOutstandingR2T = 1
      errorRecoveryLevel = 0
    targetPortalGroupTag = 0
            headerDigest = None,CRC32C
              dataDigest = None,CRC32C
              initialR2T = 1
           immediateData = 1
          dataPDUInOrder = 1
     dataSequenceInOrder = 1
             sessionType = Normal
           targetAddress = (null)
             targetAlias = (null)
              targetName = (null)
           initiatorName = (null)
          initiatorAlias = (null)
              authMethod = None
              chapSecret = (null)
               chapIName = (null)
             tgtChapName = (null)
           tgtChapSecret = (null)
      tgttgtChallengeLen = 0
I-: cmd=0x3 len=309
	SessionType=Discovery
	InitiatorName=iqn.2005-01.il.ac.huji.cs::endor.fr.sequans.com
	MaxBurstLength=131072
	HeaderDigest=None,CRC32C
	DataDigest=None,CRC32C
	MaxRecvDataSegmentLength=65536
	ErrorRecoveryLevel=0
	DefaultTime2Wait=0
	DefaultTime2Retain=0
	DataPDUInOrder=Yes
	DataSequenceInOrder=Yes
	MaxOutstandingR2T=1
T-: cmd=0x23 len=248
	DataDigest=None
	DataPDUInOrder=Yes
	DataSequenceInOrder=Yes
	DefaultTime2Retain=0
	DefaultTime2Wait=2
	ErrorRecoveryLevel=0
	HeaderDigest=None
	MaxBurstLength=131072
	MaxOutstandingR2T=1
	InitialR2T=No
	MaxRecvDataSegmentLength=65536
	TargetPortalGroupTag=1
I-: cmd=0x3 len=0
T-: cmd=0x23 len=0
I-: cmd=0x4 len=16
	SendTargets=All
T-: cmd=0x24 len=8192
	TargetName=iqn.2001-05.com.equallogic:0-8a0906-882250007-310fb16ce8d4c482-xen0retd1
	TargetAddress=192.168.100.50:3260,1
	TargetName=iqn.2001-05.com.equallogic:0-8a0906-c44250007-ff0fb16ce8f4c482-xen0retd2
	TargetAddress=192.168.100.50:3260,1

[... some others TargetName/TargetAddress ...]
[... lots of blank lines ...]

Segmentation fault: 11 (core dumped)
root@endor:~#


>How-To-Repeat:
Just do a discovery session on a target IP with a lot of targets available :
iscontrol -v -d -t 192.168.100.50
>Fix:


>Release-Note:
>Audit-Trail:

From: Jean-Christophe Guillain <jc.guillain@gmail.com>
To: bug-followup@FreeBSD.org, jc.guillain@gmail.com
Cc:  
Subject: Re: bin/167331: Segmentation fault with iscontrol
Date: Thu, 26 Apr 2012 17:01:52 +0200

 --14dae93403cd9f3aa204be96447b
 Content-Type: text/plain; charset=UTF-8
 
 Tell me if you need the core dumped (3.4 Mo)
 
 --14dae93403cd9f3aa204be96447b
 Content-Type: text/html; charset=UTF-8
 
 Tell me if you need the core dumped (3.4 Mo)<br>
 
 --14dae93403cd9f3aa204be96447b--

From: Jean-Christophe Guillain <jc.guillain@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/167331: Segmentation fault with iscontrol(8)
Date: Wed, 9 May 2012 20:15:09 +0200

 --f46d0444ede1cf240504bf9e7b7f
 Content-Type: text/plain; charset=UTF-8
 
 I upgraded a test server, and I can confirm that this bug is also present
 in :
 - Freebsd 8.3-RELEASE
 - Freebsd 9.0-RELEASE
 
 Jean-Christophe
 
 --f46d0444ede1cf240504bf9e7b7f
 Content-Type: text/html; charset=UTF-8
 
 I upgraded a test server, and I can confirm that this bug is also present in :<br>- Freebsd 8.3-RELEASE<br>- Freebsd 9.0-RELEASE<br><br>Jean-Christophe<br><br><br>
 
 --f46d0444ede1cf240504bf9e7b7f--
>Unformatted:
