From owner-freebsd-stable@freebsd.org Mon Oct 2 10:03:41 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29686E3B43C for ; Mon, 2 Oct 2017 10:03:41 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-vk0-x229.google.com (mail-vk0-x229.google.com [IPv6:2607:f8b0:400c:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D2C142579 for ; Mon, 2 Oct 2017 10:03:40 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-vk0-x229.google.com with SMTP id g69so2577457vke.5 for ; Mon, 02 Oct 2017 03:03:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=sLXjjGpQ81muoM3QGd3Z1sBeaGhgq1m59UT19ih3HIQ=; b=VW6vptTSNVlZrAOe6CD871VNiDRdXRAYFmGNIrVwTC1BDP0srNwApmvuDNRzc5rTxJ lt+VyhH3152W+ioKaAnLig8BwA2uANHoRSxLQhGq7DO3LM/zFPgqcZ7sKZY/8D3+lxYM aArkNc5cnHfCrZHroc/vA5SNsQZyb9WiToVOH8hLL8LGy1ClFNsHUjeD2AUqMxnDDl4N aBiyPZr+IWoa3Lzv3uE/31SHST6X1g4wnuoMdECjGhC+5ff/7+kRSkNCm0T5USVwiqku n/ITqn4SLlIKERxJY+bXH8mJlLgfqENHNWG6YoBMLZAh3CId5OaDtbDy5RZqxAi4eQVd +Q6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=sLXjjGpQ81muoM3QGd3Z1sBeaGhgq1m59UT19ih3HIQ=; b=iTUu3+oCxioJfOjl4stXQ/3VqdffU3OkU9ZQ4dKSkyUweHd1Z5hAZH6EqLfDNKEtDY pQckoAM3Oy+RkZrCJpeVd5uhgXE1FmS7ZMzVI88/tt47oraqfkMRhxREpFGdDGNNb79p AsvQaPKJDv83T8dE7VxPITygGx6gYroEpJL3asdWs5Mi5L0ervqqQ6TBXG+mudgTjD/r 9MYSG0PO8NmdobzRwZ55aSTVv5xB2hv++xaGzGKMgAxCF69U+ZUKzpeIUhxvoOz9FBTg Wv2FyQvrMK1v8ebGKvgC4v6j3Hu0RAvMF/b0VnAXdTULnMn+/TKn4eanOY5QyKh7hv6L IDFw== X-Gm-Message-State: AHPjjUiQJdr5zLud/79Y8QffX8vxrFD91JAdc36q5HAFwwk6RJ7vGDFJ c182TAw9xdHwZQHn9k0BaYc101bhao8OJeQ5N7s= X-Google-Smtp-Source: AOwi7QC/KD5xAdPWY6nX61Oo68iS0azDNRBpfSDC7nd1aHXOwcchj4WCqXumKdQCYVqm7vY24ND9dUcqynXnfx1iko4= X-Received: by 10.31.181.200 with SMTP id e191mr7716415vkf.55.1506938619927; Mon, 02 Oct 2017 03:03:39 -0700 (PDT) MIME-Version: 1.0 Sender: etnapierala@gmail.com Received: by 10.176.75.195 with HTTP; Mon, 2 Oct 2017 03:03:39 -0700 (PDT) In-Reply-To: <739fe048ccbe15c096ec79fc320eee56@norman-vivat.ru> References: <04e8820c2c6cc7a95d6ffdf257f00f7d@norman-vivat.ru> <20170922071554.GA3846@brick> <739fe048ccbe15c096ec79fc320eee56@norman-vivat.ru> From: Edward Napierala Date: Mon, 2 Oct 2017 11:03:39 +0100 X-Google-Sender-Auth: H_rTIYlb4471gk0CKWJCZN6EbWA Message-ID: Subject: Re: ctld: only 579 iSCSI targets can be created To: "Eugene M. Zheganin" Cc: FreeBSD Stable Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Oct 2017 10:03:41 -0000 Thanks for the packet trace. What happens there is that the Windows initiator logs in, requests Discovery ("SendTargets=3DAll"), receives the l= ist of targets, as expected, and then... sends "SendTargets=3DAll" again, instead of logging off. This results in ctld(8) dropping the session. The initiator then starts the Discovery session again, but this time it onl= y logs in and then out, without actually requesting the target list. Perhaps you could work around this by using "discovery-filter", as documented in ctl.conf(5)? 2017-09-22 11:49 GMT+01:00 Eugene M. Zheganin : > Hi, > > Edward Tomasz Napiera=C5=82a wrote 2017-09-22 12:15: > >> >> There are two weird things here. First is that the error is coming from >> ctld(8) - the userspace daemon, not the kernel. The second is that thos= e >> invalid opcodes are actually both valid - they are the Text Request, >> and the Logout Request with Immediate flag set, exectly what you'd expec= t >> for a discovery session. >> >> Do you have a way to do a packet dump? >> > > Sure. Here it is: > > http://enaza.ru/stub-data/iscsi-protocol-error.pcap > > Target IP is 10.0.2.4, initiator IP is 10.0.3.127. During the session > captured in this file I got in messages: > > Sep 22 15:38:11 san1 ctld[61373]: 10.0.3.127 (iqn.1991-05.com.microsoft:w= orker296): > protocol error: received invalid opcode 0x4 > Sep 22 15:38:11 san1 ctld[61374]: 10.0.3.127 (iqn.1991-05.com.microsoft:w= orker296): > protocol error: received invalid opcode 0x46 > > This error happens when the initiator is trying to connect the disk from = a > target discovered. > > Target is running FreeBSD 11.0-STABLE #1 r310734M where M is for > CTL_MAX_PORTS 1024 (old verion, yup, but I have a suspicion that I still > failed to prove that more recent version have some iSCSI vs ZFS conflict, > but that's another story). Initiator is running Windows 7 Professional x6= 4, > inside a ESX virtual machine. This happens only when some unclear thresho= ld > is crossed, previous ~2 hundreds of initiators run Windows 7 Professional > too. > > If you need any additional data/diagnostics please let me know. > > Eugene. > >