Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Oct 2021 14:32:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 259152] [iscsi] OCI oracle iscsi block device problems
Message-ID:  <bug-259152-227-ZmqeIhmkhr@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-259152-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-259152-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259152

--- Comment #12 from Ed Maste <emaste@freebsd.org> ---
(In reply to Dave Cottlehuber from comment #11)
Notes from an IRC debugging session with dch@ and andrew@:

The panic looks like failed error handling after a reconnect attempt so nee=
ds
to be fixed but is not the primary issue; this is:

WARNING: icl_conn_receive_pdu: received data segment length 16384 is larger
than negotiated; dropping connection

sys/dev/iscsi/icl_soft.c:

                len =3D icl_pdu_data_segment_length(request);
                if (len > ic->ic_max_recv_data_segment_length) {  <---
                        ICL_WARN("received data segment "
                            "length %zd is larger than negotiated; "
                            "dropping connection", len);
                        error =3D EINVAL;
                        break;
                }

ic_max_recv_data_segment_length ultimately gets set by iscsid handling the =
new
connection. In usr.sbin/iscsid/login.c in login_negotiate_key:

        } else if (strcmp(name, "MaxRecvDataSegmentLength") =3D=3D 0) {
                tmp =3D strtoul(value, NULL, 10);
                if (tmp <=3D 0)
                        log_errx(1, "received invalid "
                            "MaxRecvDataSegmentLength");
                if (tmp > isl->isl_max_send_data_segment_length) {
                        log_debugx("capping max_send_data_segment_length "
                            "from %d to %d", tmp,
                            isl->isl_max_send_data_segment_length);
                        tmp =3D isl->isl_max_send_data_segment_length;
                }
                conn->conn_max_send_data_segment_length =3D tmp;
                /* We received target's limit, that means it accepted our's=
. */
                conn->conn_max_recv_data_segment_length =3D   <---
                    isl->isl_max_recv_data_segment_length;  <---

So it appears conn_max_recv_data_segment_length is only set once we receive
MaxRecvDataSegmentLength from the target

from proxied.pcap,

frame 15 our login command contains MaxRecvDataSegmentLength=3D262144
the response is in frame 17 and does not contain MaxRecvDataSegmentLength, =
so
we never update conn_max_recv_data_segment_length=20

This handling for conn_max_recv_data_segment_length came in with
https://cgit.freebsd.org/src/commit/?id=3Da15fbc904a4d535e0c438bcecac056fca=
4fa3c5e

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-259152-227-ZmqeIhmkhr>