Re: SCSI pass through command cause iscsi Conn error

2009-10-21 Thread Mike Christie

niko scsi wrote:
> I found initiator sent data twice ,check scsi_pass_through_err.cap
> file
> at frame 4 and frame 5 ,thank you very much !
> I wanna to look inside the code but don't know where to start .
> 

Is the command you are trying to execute a bidirectional command. If so 
then the datasn is just off. It looks like we send a mode select, then 
the target sends a r2t (so the exp data sn is incremented to 1), then we 
send a data out, then the target sends a data in but the datasn is 0 
when it should be 1 (for bidi commands you have to take into account the 
  r2ts and data ins).

If you are not doing a bidi command, then I am not sure I have seen a 
data-in in this type of sequence. I think we normally see a data in with 
ok status in a read command. For your command it seems like we should 
have got a scsi cmd response pdu.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: SCSI pass through command cause iscsi Conn error

2009-10-15 Thread niko scsi

Check file
ipt_open_iscsi_2.0_871.log
ipt_open_iscsi_2.0_871.cap

open iscsi version 2.0-871

thank you very much .
On Oct 16, 2:08 am, Mike Christie  wrote:
> On 10/15/2009 01:36 AM, niko scsi wrote:
>
> > I checked the debug message and the code in iscsi_tcp_segment_done
> > but i can not understand the infomation in tcp debug info shown below.
>
> Could you also send the libiscsi_tcp and libiscsi debug output?
>
> And could you send more log. Send the part up to the point you get the
> datasn error.
>
>
>
> > twice ?
>
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_send_data_prep
> > (cb76be00, offset=0, datalen=12)
> > Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 48 xmit
> > Sep 27 09:37:01 localhost kernel: tcp: copied 0 48 size 48 xmit
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
> > cb76bf4c
> > Sep 27 09:37:01 localhost kernel: tcp: total copied 48 total size 48
> > Sep 27 09:37:01 localhost kernel: tcp: Header done. Next segment size
> > 12 total_size 12
> > Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 12
> > xmit             - This place
> > Sep 27 09:37:01 localhost kernel: tcp: copied 0 12 size 12
> > xmit            - can not
> > understand
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
> > cb76bf4c
> > Sep 27 09:37:01 localhost kernel: tcp: total copied 12 total size
> > 12       -
> > Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 0 xmit
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
> > cb76bf4c
> > Sep 27 09:37:01 localhost kernel: tcp: total copied 12 total size
> > 12       --
> > Sep 27 09:37:01 localhost kernel: tcp: xmit 60 bytes
> > Sep 27 09:37:01 localhost kernel: tcp: no R2Ts yet
> > Sep 27 09:37:01 localhost kernel: tcp: in 60 bytes
> > Sep 27 09:37:01 localhost kernel: tcp: skb dfab65c0 ptr=da5a5a54
> > avail=60
>
> > On Sep 30, 2:48 am, Mike Christie  wrote:
> >> On 09/26/2009 09:20 PM, niko scsi wrote:
>
> >>> I followed the 
> >>> howtohttp://tldp.org/HOWTO/SCSI-Generic-HOWTO/scsi_snd_cmd.html
> >>> to pass through scsi cmd with data (self defined,target can handle
> >>> it)  to iscsi disk.
> >>>    however,the request was handled six times ,I checked the log ,the
> >>> reason is shown below. The connection failed and recovered six
> >>> times ,and I tested many times ,each time ,the same :six times!
> >>> I'm newbie to scsi program. Any idea that can cause this problem ?
> >>> error occurred in function iscsi_data_rsp
> >>> tcp debug infomations show below :
> >>> ...
> >>> Sep 27 09:37:01 localhost kernel: tcp: skb dfab65c0 ptr=da5a5a54
> >>> avail=60
> >>> Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 48 recv
> >>> Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_recv copying
> >>> 48
> >>> Sep 27 09:37:01 localhost kernel: tcp: copied 0 48 size 48 recv
> >>> Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
> >>> cb76be10
> >>> Sep 27 09:37:01 localhost kernel: tcp: total copied 48 total size 48
> >>> Sep 27 09:37:01 localhost kernel: tcp: segment done
> >>> Sep 27 09:37:01 localhost kernel: tcp: opcode 0x25 ahslen 0 datalen 12
> >>> Sep 27 09:37:01 localhost kernel: tcp: iscsi_data_rsp: ctask-
>  exp_datasn(1) != rhdr->datasn(0)
> >> You might not be doing anything wrong. It might a target or initiator bug.
>
> >> What target are you using? In your setup, did you modify the iscsi
> >> target in some way?
>
> >> And what kernel are using?- Hide quoted text -
>
> >> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: SCSI pass through command cause iscsi Conn error

2009-10-15 Thread Mike Christie

On 10/15/2009 01:36 AM, niko scsi wrote:
> I checked the debug message and the code in iscsi_tcp_segment_done
> but i can not understand the infomation in tcp debug info shown below.
>

Could you also send the libiscsi_tcp and libiscsi debug output?

And could you send more log. Send the part up to the point you get the 
datasn error.

> twice ?
>
> Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_send_data_prep
> (cb76be00, offset=0, datalen=12)
> Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 48 xmit
> Sep 27 09:37:01 localhost kernel: tcp: copied 0 48 size 48 xmit
> Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
> cb76bf4c
> Sep 27 09:37:01 localhost kernel: tcp: total copied 48 total size 48
> Sep 27 09:37:01 localhost kernel: tcp: Header done. Next segment size
> 12 total_size 12
> Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 12
> xmit - This place
> Sep 27 09:37:01 localhost kernel: tcp: copied 0 12 size 12
> xmit- can not
> understand
> Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
> cb76bf4c
> Sep 27 09:37:01 localhost kernel: tcp: total copied 12 total size
> 12   -
> Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 0 xmit
> Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
> cb76bf4c
> Sep 27 09:37:01 localhost kernel: tcp: total copied 12 total size
> 12   --
> Sep 27 09:37:01 localhost kernel: tcp: xmit 60 bytes
> Sep 27 09:37:01 localhost kernel: tcp: no R2Ts yet
> Sep 27 09:37:01 localhost kernel: tcp: in 60 bytes
> Sep 27 09:37:01 localhost kernel: tcp: skb dfab65c0 ptr=da5a5a54
> avail=60
>
> On Sep 30, 2:48 am, Mike Christie  wrote:
>> On 09/26/2009 09:20 PM, niko scsi wrote:
>>
>>
>>
>>
>>
>>> I followed the 
>>> howtohttp://tldp.org/HOWTO/SCSI-Generic-HOWTO/scsi_snd_cmd.html
>>> to pass through scsi cmd with data (self defined,target can handle
>>> it)  to iscsi disk.
>>>however,the request was handled six times ,I checked the log ,the
>>> reason is shown below. The connection failed and recovered six
>>> times ,and I tested many times ,each time ,the same :six times!
>>> I'm newbie to scsi program. Any idea that can cause this problem ?
>>> error occurred in function iscsi_data_rsp
>>> tcp debug infomations show below :
>>> ...
>>> Sep 27 09:37:01 localhost kernel: tcp: skb dfab65c0 ptr=da5a5a54
>>> avail=60
>>> Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 48 recv
>>> Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_recv copying
>>> 48
>>> Sep 27 09:37:01 localhost kernel: tcp: copied 0 48 size 48 recv
>>> Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
>>> cb76be10
>>> Sep 27 09:37:01 localhost kernel: tcp: total copied 48 total size 48
>>> Sep 27 09:37:01 localhost kernel: tcp: segment done
>>> Sep 27 09:37:01 localhost kernel: tcp: opcode 0x25 ahslen 0 datalen 12
>>> Sep 27 09:37:01 localhost kernel: tcp: iscsi_data_rsp: ctask-
 exp_datasn(1) != rhdr->datasn(0)
>> You might not be doing anything wrong. It might a target or initiator bug.
>>
>> What target are you using? In your setup, did you modify the iscsi
>> target in some way?
>>
>> And what kernel are using?- Hide quoted text -
>>
>> - Show quoted text -
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: SCSI pass through command cause iscsi Conn error

2009-10-15 Thread niko scsi

I found initiator sent data twice ,check scsi_pass_through_err.cap
file
at frame 4 and frame 5 ,thank you very much !
I wanna to look inside the code but don't know where to start .

On Sep 30, 2:48 am, Mike Christie  wrote:
> On 09/26/2009 09:20 PM, niko scsi wrote:
>
>
>
>
>
> > I followed the 
> > howtohttp://tldp.org/HOWTO/SCSI-Generic-HOWTO/scsi_snd_cmd.html
> > to pass through scsi cmd with data (self defined,target can handle
> > it)  to iscsi disk.
> >   however,the request was handled six times ,I checked the log ,the
> > reason is shown below. The connection failed and recovered six
> > times ,and I tested many times ,each time ,the same :six times!
> > I'm newbie to scsi program. Any idea that can cause this problem ?
>
> > error occurred in function iscsi_data_rsp
>
> > tcp debug infomations show below :
>
> > ...
> > Sep 27 09:37:01 localhost kernel: tcp: skb dfab65c0 ptr=da5a5a54
> > avail=60
> > Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 48 recv
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_recv copying
> > 48
> > Sep 27 09:37:01 localhost kernel: tcp: copied 0 48 size 48 recv
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
> > cb76be10
> > Sep 27 09:37:01 localhost kernel: tcp: total copied 48 total size 48
> > Sep 27 09:37:01 localhost kernel: tcp: segment done
> > Sep 27 09:37:01 localhost kernel: tcp: opcode 0x25 ahslen 0 datalen 12
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_data_rsp: ctask-
> >> exp_datasn(1) != rhdr->datasn(0)
>
> You might not be doing anything wrong. It might a target or initiator bug.
>
> What target are you using? In your setup, did you modify the iscsi
> target in some way?
>
> And what kernel are using?- Hide quoted text -
>
> - Show quoted text -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: SCSI pass through command cause iscsi Conn error

2009-10-15 Thread niko scsi

Sorry to bother you guys again.
Is there possible a situation of  " phase collapse " ?

target has two ways to return ending status to the initiator.
The normal method is via the SCSI Response PDU; the other is via the
last Data-In PDU (if any).
And in the debug log ,It is exactly the second way .We received opcode
= 0x25 Data-In PDU


Sep 27 09:37:01 localhost kernel: tcp: opcode 0x25 ahslen 0 datalen
12
Sep 27 09:37:01 localhost kernel: tcp: iscsi_data_rsp: ctask-
>exp_datasn(1) != rhdr->datasn(0)


On Sep 30, 2:48 am, Mike Christie  wrote:
> On 09/26/2009 09:20 PM, niko scsi wrote:
>
>
>
>
>
> > I followed the 
> > howtohttp://tldp.org/HOWTO/SCSI-Generic-HOWTO/scsi_snd_cmd.html
> > to pass through scsi cmd with data (self defined,target can handle
> > it)  to iscsi disk.
> >   however,the request was handled six times ,I checked the log ,the
> > reason is shown below. The connection failed and recovered six
> > times ,and I tested many times ,each time ,the same :six times!
> > I'm newbie to scsi program. Any idea that can cause this problem ?
>
> > error occurred in function iscsi_data_rsp
>
> > tcp debug infomations show below :
>
> > ...
> > Sep 27 09:37:01 localhost kernel: tcp: skb dfab65c0 ptr=da5a5a54
> > avail=60
> > Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 48 recv
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_recv copying
> > 48
> > Sep 27 09:37:01 localhost kernel: tcp: copied 0 48 size 48 recv
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
> > cb76be10
> > Sep 27 09:37:01 localhost kernel: tcp: total copied 48 total size 48
> > Sep 27 09:37:01 localhost kernel: tcp: segment done
> > Sep 27 09:37:01 localhost kernel: tcp: opcode 0x25 ahslen 0 datalen 12
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_data_rsp: ctask-
> >> exp_datasn(1) != rhdr->datasn(0)
>
> You might not be doing anything wrong. It might a target or initiator bug.
>
> What target are you using? In your setup, did you modify the iscsi
> target in some way?
>
> And what kernel are using?- Hide quoted text -
>
> - Show quoted text -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: SCSI pass through command cause iscsi Conn error

2009-10-15 Thread niko scsi

I checked the debug message and the code in iscsi_tcp_segment_done
but i can not understand the infomation in tcp debug info shown below.

twice ?

Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_send_data_prep
(cb76be00, offset=0, datalen=12)
Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 48 xmit
Sep 27 09:37:01 localhost kernel: tcp: copied 0 48 size 48 xmit
Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
cb76bf4c
Sep 27 09:37:01 localhost kernel: tcp: total copied 48 total size 48
Sep 27 09:37:01 localhost kernel: tcp: Header done. Next segment size
12 total_size 12
Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 12
xmit - This place
Sep 27 09:37:01 localhost kernel: tcp: copied 0 12 size 12
xmit- can not
understand
Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
cb76bf4c
Sep 27 09:37:01 localhost kernel: tcp: total copied 12 total size
12   -
Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 0 xmit
Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
cb76bf4c
Sep 27 09:37:01 localhost kernel: tcp: total copied 12 total size
12   --
Sep 27 09:37:01 localhost kernel: tcp: xmit 60 bytes
Sep 27 09:37:01 localhost kernel: tcp: no R2Ts yet
Sep 27 09:37:01 localhost kernel: tcp: in 60 bytes
Sep 27 09:37:01 localhost kernel: tcp: skb dfab65c0 ptr=da5a5a54
avail=60

On Sep 30, 2:48 am, Mike Christie  wrote:
> On 09/26/2009 09:20 PM, niko scsi wrote:
>
>
>
>
>
> > I followed the 
> > howtohttp://tldp.org/HOWTO/SCSI-Generic-HOWTO/scsi_snd_cmd.html
> > to pass through scsi cmd with data (self defined,target can handle
> > it)  to iscsi disk.
> >   however,the request was handled six times ,I checked the log ,the
> > reason is shown below. The connection failed and recovered six
> > times ,and I tested many times ,each time ,the same :six times!
> > I'm newbie to scsi program. Any idea that can cause this problem ?
>
> > error occurred in function iscsi_data_rsp
>
> > tcp debug infomations show below :
>
> > ...
> > Sep 27 09:37:01 localhost kernel: tcp: skb dfab65c0 ptr=da5a5a54
> > avail=60
> > Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 48 recv
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_recv copying
> > 48
> > Sep 27 09:37:01 localhost kernel: tcp: copied 0 48 size 48 recv
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
> > cb76be10
> > Sep 27 09:37:01 localhost kernel: tcp: total copied 48 total size 48
> > Sep 27 09:37:01 localhost kernel: tcp: segment done
> > Sep 27 09:37:01 localhost kernel: tcp: opcode 0x25 ahslen 0 datalen 12
> > Sep 27 09:37:01 localhost kernel: tcp: iscsi_data_rsp: ctask-
> >> exp_datasn(1) != rhdr->datasn(0)
>
> You might not be doing anything wrong. It might a target or initiator bug.
>
> What target are you using? In your setup, did you modify the iscsi
> target in some way?
>
> And what kernel are using?- Hide quoted text -
>
> - Show quoted text -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: SCSI pass through command cause iscsi Conn error

2009-09-29 Thread Mike Christie

On 09/26/2009 09:20 PM, niko scsi wrote:
> I followed the howto 
> http://tldp.org/HOWTO/SCSI-Generic-HOWTO/scsi_snd_cmd.html
> to pass through scsi cmd with data (self defined,target can handle
> it)  to iscsi disk.
>   however,the request was handled six times ,I checked the log ,the
> reason is shown below. The connection failed and recovered six
> times ,and I tested many times ,each time ,the same :six times!
> I'm newbie to scsi program. Any idea that can cause this problem ?
>
> error occurred in function iscsi_data_rsp
>
> tcp debug infomations show below :
>
> ...
> Sep 27 09:37:01 localhost kernel: tcp: skb dfab65c0 ptr=da5a5a54
> avail=60
> Sep 27 09:37:01 localhost kernel: tcp: copied 0 0 size 48 recv
> Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_recv copying
> 48
> Sep 27 09:37:01 localhost kernel: tcp: copied 0 48 size 48 recv
> Sep 27 09:37:01 localhost kernel: tcp: iscsi_tcp_segment_unmap
> cb76be10
> Sep 27 09:37:01 localhost kernel: tcp: total copied 48 total size 48
> Sep 27 09:37:01 localhost kernel: tcp: segment done
> Sep 27 09:37:01 localhost kernel: tcp: opcode 0x25 ahslen 0 datalen 12
> Sep 27 09:37:01 localhost kernel: tcp: iscsi_data_rsp: ctask-
>> exp_datasn(1) != rhdr->datasn(0)

You might not be doing anything wrong. It might a target or initiator bug.

What target are you using? In your setup, did you modify the iscsi 
target in some way?

And what kernel are using?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---