Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iscsi_logout_sync sometimes abruptly closes socket #261

Open
sitsofe opened this issue Jan 6, 2018 · 0 comments
Open

iscsi_logout_sync sometimes abruptly closes socket #261

sitsofe opened this issue Jan 6, 2018 · 0 comments

Comments

@sitsofe
Copy link
Contributor

sitsofe commented Jan 6, 2018

On macOS 10.13 I have a piece of code doing this:

[working connection that successfully does read capacity 16]
                        iscsi_set_reconnect_max_retries(ifd->iscsi, 0);
                        iscsi_set_timeout(ifd->iscsi, 3);
                        ret = iscsi_logout_sync(ifd->iscsi);

Sometimes after executing this code the iSCSI target reports this:

Jan 6 15:47:41  Login complete, TSIH 580 (1)
Jan 6 15:47:41  Connection [iqn.2010-11.libiscsi:fio:s.580.0] unexpectedly closed
Jan 6 15:47:41  Abort connection [iqn.2010-11.libiscsi:fio:s.580.0]

Setting libiscsi logging in the client reports the following:

libiscsi:2 set log level to 10 [s]
libiscsi:2 connecting to portal stut14vsa [s]
libiscsi:3 SO_KEEPALIVE set to 1 [s]
libiscsi:3 TCP_KEEPCNT set to 3 [s]
libiscsi:3 TCP_KEEPINTVL set to 30 [s]
libiscsi:3 TCP_NODELAY set to 1 [s]
libiscsi:2 connection established (10.1.3.82:53480 -> stut14vsa) [s]
libiscsi:6 TargetLoginReply: TargetPortalGroupTag=1 [s]
libiscsi:6 TargetLoginReply: TargetAlias=s [s]
libiscsi:6 TargetLoginReply: HeaderDigest=None [s]
libiscsi:6 TargetLoginReply: DataDigest=None [s]
libiscsi:6 TargetLoginReply: InitialR2T=Yes [s]
libiscsi:6 TargetLoginReply: ImmediateData=Yes [s]
libiscsi:6 TargetLoginReply: MaxBurstLength=262144 [s]
libiscsi:6 TargetLoginReply: FirstBurstLength=131072 [s]
libiscsi:6 TargetLoginReply: DefaultTime2Wait=0 [s]
libiscsi:6 TargetLoginReply: DefaultTime2Retain=0 [s]
libiscsi:6 TargetLoginReply: MaxOutstandingR2T=1 [s]
libiscsi:6 TargetLoginReply: ErrorRecoveryLevel=0 [s]
libiscsi:6 TargetLoginReply: IFMarker=No [s]
libiscsi:6 TargetLoginReply: OFMarker=No [s]
libiscsi:6 TargetLoginReply: MaxConnections=1 [s]
libiscsi:6 TargetLoginReply: MaxRecvDataSegmentLength=262144 [s]
libiscsi:6 TargetLoginReply: DataPDUInOrder=Yes [s]
libiscsi:6 TargetLoginReply: DataSequenceInOrder=Yes [s]
libiscsi:2 login successful [s]
io       63830 libiscsi: iscsi_url->lun=0
file     63830 libiscsi: get file size for stut14vsa/s/0
io       63830 libiscsi: iscsi=0x623000000100 lun=0
file     63830 libiscsi: LUN size=10485760 bytes
libiscsi:1 iscsi_service: POLLHUP, socket error. [s]
libiscsi:2 reconnect initiated [s]
libiscsi:2 connecting to portal stut14vsa [s]
libiscsi:3 SO_KEEPALIVE set to 1 [s]
libiscsi:3 TCP_KEEPCNT set to 3 [s]
libiscsi:3 TCP_KEEPINTVL set to 30 [s]
libiscsi:3 TCP_NODELAY set to 1 [s]
libiscsi:2 connection established (10.1.3.82:53481 -> stut14vsa) [s]
libiscsi:6 TargetLoginReply: TargetPortalGroupTag=1 [s]
libiscsi:6 TargetLoginReply: TargetAlias=s [s]
libiscsi:6 TargetLoginReply: HeaderDigest=None [s]
libiscsi:6 TargetLoginReply: DataDigest=None [s]
libiscsi:6 TargetLoginReply: InitialR2T=Yes [s]
libiscsi:6 TargetLoginReply: ImmediateData=Yes [s]
libiscsi:6 TargetLoginReply: MaxBurstLength=262144 [s]
libiscsi:6 TargetLoginReply: FirstBurstLength=131072 [s]
libiscsi:6 TargetLoginReply: DefaultTime2Wait=0 [s]
libiscsi:6 TargetLoginReply: DefaultTime2Retain=0 [s]
libiscsi:6 TargetLoginReply: MaxOutstandingR2T=1 [s]
libiscsi:6 TargetLoginReply: ErrorRecoveryLevel=0 [s]
libiscsi:6 TargetLoginReply: IFMarker=No [s]
libiscsi:6 TargetLoginReply: OFMarker=No [s]
libiscsi:6 TargetLoginReply: MaxConnections=1 [s]
libiscsi:6 TargetLoginReply: MaxRecvDataSegmentLength=262144 [s]
libiscsi:6 TargetLoginReply: DataPDUInOrder=Yes [s]
libiscsi:6 TargetLoginReply: DataSequenceInOrder=Yes [s]
libiscsi:2 login successful [s]
libiscsi:2 reconnect was successful [s]

and iscsi_logout_sync has returned -1.

pcap file attached.

iscsi.pcap.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant