From nobody Wed Sep 6 00:49:07 2023 X-Original-To: freebsd-scsi@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RgP0M33N8z4sYjT for ; Wed, 6 Sep 2023 00:49:39 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from webmail5.jnielsen.net (webmail5.jnielsen.net [IPv6:2607:f170:34:11::b0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.freebsdsolutions.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RgP0K2qzWz3SPK for ; Wed, 6 Sep 2023 00:49:37 +0000 (UTC) (envelope-from lists@jnielsen.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of lists@jnielsen.net designates 2607:f170:34:11::b0 as permitted sender) smtp.mailfrom=lists@jnielsen.net; dmarc=none Received: from smtpclient.apple ([50.207.241.62]) (authenticated bits=0) by webmail5.jnielsen.net (8.17.2/8.17.1) with ESMTPSA id 3860nMuS019948 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 5 Sep 2023 18:49:26 -0600 (MDT) (envelope-from lists@jnielsen.net) X-Authentication-Warning: webmail5.jnielsen.net: Host [50.207.241.62] claimed to be smtpclient.apple From: John Nielsen Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: SCSI subsystem List-Archive: https://lists.freebsd.org/archives/freebsd-scsi List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: Troubleshooting help for net/isboot-kmod Date: Tue, 5 Sep 2023 18:49:07 -0600 References: <15622762-D8A3-4E98-B932-A7BC7649C57B@jnielsen.net> To: freebsd-scsi@freebsd.org In-Reply-To: <15622762-D8A3-4E98-B932-A7BC7649C57B@jnielsen.net> Message-Id: <9A50B0C5-B7D3-40BA-AACC-D7504632E895@jnielsen.net> X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: / X-Spamd-Result: default: False [-0.88 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.997]; NEURAL_SPAM_MEDIUM(0.91)[0.913]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[jnielsen.net]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-scsi@freebsd.org]; ASN(0.00)[asn:6364, ipnet:2607:f170:30::/44, country:US]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; BLOCKLISTDE_FAIL(0.00)[50.207.241.62:server fail,2607:f170:34:11::b0:server fail]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HAS_XAW(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-scsi@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4RgP0K2qzWz3SPK > On Sep 5, 2023, at 3:32 PM, John Nielsen wrote: >=20 > Since the original author has presumably moved on to better things, = I=E2=80=99m the maintainer of the net/isboot-kmod port for enabling = booting from iSCSI via an iSCSI Boot Firmware Table. I would not call = myself a kernel developer but I get by in C. >=20 > Note that the port uses its own iSCSI implementation and none of the = in-tree iSCSI code (e.g. under sys/dev/iscsi). >=20 > I=E2=80=99m trying to solve a problem where a system will boot up and = negotiate an iSCSI session correctly, log in to the target, but then = never continue or attach a peripheral after attempting a cam rescan. = (See also https://github.com/jnielsendotnet/isboot/issues/11). I can = reproduce this issue about 30% of the time on my test system as long as = I have isboot's debug messages turned off. With them turned on it is = 100% repeatable (which poses a challenge in directly copying kernel = messages from a successful boot with debug enabled). >=20 > When the problem occurs, isboot completes its cam_attach function, = (handling an XPT_PATH_INQ action along the way), enters its cam_rescan = function, but never exits. See the code here: = https://github.com/jnielsendotnet/isboot/blob/master/src/iscsi.c#L2300 >=20 > I can see from the debug output (below) that it again does = XPT_PATH_INQ (4 times), then gets an XPT_ASYNC followed by an XPT_ABORT = action. Both of those are handled by the fall-through default of setting = ccb_h.status to CAM_REQ_INVALID (see = https://github.com/jnielsendotnet/isboot/blob/master/src/iscsi.c#L2192 ) >=20 > So what could be going on? I don=E2=80=99t have trace output from a = successful boot to compare with, sadly. I feel like perhaps the code = should do something with at least one of the XPT_ASYNC or XPT_ABORT = actions but I don=E2=80=99t know what exactly (or why the need only = arises some of the time). >=20 > -JN >=20 > =3D=3D=3D=3D=3D failed boot debug output =3D=3D=3D=3D=3D > cam attach > isboot action 4 > isboot action 4 done > cam attach end > cam rescan > isboot action 4 > isboot action 4 done > isboot action 4 > isboot action 4 done > isboot action 4 > isboot action 4 done > isboot action 4 > isboot action 4 done > isboot action 15 > isboot action 15 done > isboot action 16 > isboot action 16 done I just saw that these are hex (%x) and not decimal (%d) so the actions = are really 0x15 XPT_GET_TRAN_SETTINGS and 0x16 XPT_SET_TRAN_SETTINGS, = which do appear to be implemented. Still no closer to finding out why it = doesn=E2=80=99t always work though. > Trying to mount root from ufs:/dev/gpt/[REDACTED] [rw,noatime]... > Root mount waiting for: CAM (Repeats indefinitely) >=20 From nobody Sun Sep 10 21:00:40 2023 X-Original-To: scsi@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RkMgs0sB9z4skml for ; Sun, 10 Sep 2023 21:00:41 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RkMgr5Rrgz4Klr for ; Sun, 10 Sep 2023 21:00:40 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694379640; a=rsa-sha256; cv=none; b=FjudZGaaBUnYOXafOo2NCkjSllgjNfoQBhe3lYaK0xeMN5RuBw6y9AawbY+Rg8uCpA+B0U 275vxYZMygOJtS1nWdMCOcLLVoAFNREfl/7PF8fORSIou7y3byOmSqUchm9Scnn/34T/1g HE1etjZb+zBThImcchjLl9P6sySaSM/TRrtIfsRSGaLItLryeVN7vTQybcgVo4X6aKhASl TUpFJstcJccjkm3MSa9fggtcVSWVfy9hPivZxTaqKfC3G3wkSZksOPVNlP+PLa8lyJ6Xf4 w+/qnIVlkseYofY81U0pJEhAnh/rjmBi2Ahd81zuzN21AT8oT8Sy8u9/raglPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694379640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+DtwpOxmUp0Cs7iLR+mNiVdA2h3br3+dIG9U7V/ckHI=; b=eewr8sNKxmlWK3syhsRuZcLeSJ8MQIQ4fe58HDFB3akoL7Czpu3yXeKYI7PFKdpPRM8yIk I4aT7tTozV4urZqIs8EguFo84fncn3C254MrqAWry6qTc+1arnVny5FpAdN7UWgY8epGcT o4wxgDf8sYsV4D1HiHi54C8PouWF0eI6KlrySbvTRnbShxyS949Eio98qFKqrVKd16h0nf oFZ/QetsgEDlJNflFiJyYlPfeA5qJnz/3VJIHsRUXBxPcCjUQGe5M19/to8TcdMZ3bOIcg 2mmOeVmvuwG70ayrIy3x6KnrLN/b3ChqOuGhOPGZq/JzENvag8TC8beeRBOXZw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RkMgr4Yn4z79n for ; Sun, 10 Sep 2023 21:00:40 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 38AL0en0083854 for ; Sun, 10 Sep 2023 21:00:40 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 38AL0eWD083853 for scsi@FreeBSD.org; Sun, 10 Sep 2023 21:00:40 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <202309102100.38AL0eWD083853@kenobi.freebsd.org> X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@FreeBSD.org using -f From: bugzilla-noreply@FreeBSD.org To: scsi@FreeBSD.org Subject: Problem reports for scsi@FreeBSD.org that need special attention Date: Sun, 10 Sep 2023 21:00:40 +0000 List-Id: SCSI subsystem List-Archive: https://lists.freebsd.org/archives/freebsd-scsi List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="16943796403.5fe77Ffb.80657" Content-Transfer-Encoding: 7bit --16943796403.5fe77Ffb.80657 Date: Sun, 10 Sep 2023 21:00:40 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- Open | 221952 | cam iosched: Fix trim statistics 1 problems total for which you should take action. --16943796403.5fe77Ffb.80657 Date: Sun, 10 Sep 2023 21:00:40 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"
The following is a listing of current problems submitted by FreeBSD users,
which need special attention. These represent problem reports covering
all versions including experimental development code and obsolete releases.

Status      |    Bug Id | Description
------------+-----------+---------------------------------------------------
Open        |    221952 | cam iosched: Fix trim statistics

1 problems total for which you should take action.
--16943796403.5fe77Ffb.80657--