NetBSD Problem Report #50208
From gson@gson.org Fri Sep 4 15:24:24 2015
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 1D206A6551
for <gnats-bugs@gnats.NetBSD.org>; Fri, 4 Sep 2015 15:24:24 +0000 (UTC)
Message-Id: <20150904152414.91608743D8C@guava.gson.org>
Date: Fri, 4 Sep 2015 18:24:14 +0300 (EEST)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@gnats.NetBSD.org
Subject: iscsi-target prints scary messages
X-Send-Pr-Version: 3.95
>Number: 50208
>Category: bin
>Synopsis: iscsi-target prints scary messages
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: mlelstv
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 04 15:25:00 +0000 2015
>Last-Modified: Fri Jun 03 08:50:00 +0000 2016
>Originator: Andreas Gustafsson
>Release: NetBSD-current, source date 2015.09.04.07.38.05
>Organization:
>Environment:
System: NetBSD
Architecture: i386
Machine: i386
>Description:
Now that PR 49616 is fixed, I figured I'd try to create a minimal
automated iSCSI test.
I was able to successfully export an iSCSI target and attach it to an
initiator running on the same machine, and this successfully attached
a new sd device that appears to work. However, iscsi-target logged
some messages on the console that leave me less than confident that
everything is actually working correctly.
This problem is not new; I tried running the same test against
-current sources from early 2011 with the same result.
>How-To-Repeat:
On a machine that is not already using iSCSI and has a non-empty
hostname, execute the following as root in a Bourne shell:
# Start target with default configuration from /etc/iscsi/targets
iscsi-target
# Wait for target to start
sleep 5
# Start initiator per example in iscsictl(8)
modload iscsi
modstat iscsi
iscsid
iscsictl add_send_target -a localhost
iscsictl refresh_targets
iscsictl list_targets
iscsictl login -P 2
# Wait for any new messages to appear in /var/log/messages
sleep 5
grep 'iscsi.*ERROR' /var/log/messages
This will show messages like the following:
Sep 4 15:15:33 foo iscsi-target: pid 1607:/tmp/bracket/build/2015.09.04.07.38.05-i386/src/external/bsd/iscsi/lib/../dist/src/lib/target.c:1223: ***ERROR*** CmdSN
Sep 4 15:15:33 foo iscsi-target: pid 1607:/tmp/bracket/build/2015.09.04.07.38.05-i386/src/external/bsd/iscsi/lib/../dist/src/lib/target.c:1388: ***ERROR*** logout_command_t() failed
Sep 4 15:15:33 foo iscsi-target: pid 1607:/tmp/bracket/build/2015.09.04.07.38.05-i386/src/external/bsd/iscsi/lib/../dist/src/lib/target.c:1502: ***ERROR*** execute_t() failed
Sep 4 15:15:33 foo iscsi-target: pid 1607:/tmp/bracket/build/2015.09.04.07.38.05-i386/src/external/bsd/iscsi/lib/../dist/src/lib/target.c:1108: ***ERROR*** cmd.tsih 0 not found
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: bin-bug-people->mlelstv
Responsible-Changed-By: mlelstv@NetBSD.org
Responsible-Changed-When: Fri, 03 Jun 2016 06:31:07 +0000
Responsible-Changed-Why:
working on iscsi initiator
From: Michael van Elst <mlelstv@serpens.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/50208 (iscsi-target prints scary messages)
Date: Fri, 3 Jun 2016 10:43:43 +0200
The target is code is very simple and doesn't follow the iSCSI specification.
Command requests are expected in order and immediate commands aren't handled
at all or by ignoring the sequence numbers.
The kernel initiator however uses immediate commands for session startup
and shutdown.
A simple "fix" is to ignore sequence numbers for all immediate commands.
--
Michael van Elst
Internet: mlelstv@serpens.de
"A potential Snark may lurk in every tree."
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.