From owner-freebsd-stable@freebsd.org Sat Mar 14 01:57:06 2020 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF1572724B5 for ; Sat, 14 Mar 2020 01:57:06 +0000 (UTC) (envelope-from areilly@bigpond.net.au) Received: from nsstlmta31p.bpe.bigpond.com (nsstlmta31p.bpe.bigpond.com [203.38.21.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "", Issuer "Openwave Messaging Inc." (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48fQfk6DBZz459L for ; Sat, 14 Mar 2020 01:57:02 +0000 (UTC) (envelope-from areilly@bigpond.net.au) Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep31p-svc.bpe.nexus.telstra.com.au with ESMTP id <20200314015654.UIPD5042.nsstlfep31p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Sat, 14 Mar 2020 12:56:54 +1100 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedugedruddvkedggedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhkfgtggfuffgjvfhfofesrgdtmherhhdtjeenucfhrhhomheptehnughrvgifucftvghilhhlhicuoegrrhgvihhllhihsegsihhgphhonhgurdhnvghtrdgruheqnecukfhppedutddurddukedtrddutdekrdegtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegluddtrddtrddtrdeingdpihhnvghtpedutddurddukedtrddutdekrdegtddpmhgrihhlfhhrohhmpeeorghrvghilhhlhiessghighhpohhnugdrnhgvthdrrghuqedprhgtphhtthhopeeotghhrhhishesthhhvghorhihudegrdhnvghtqedprhgtphhtthhopeeofhhrvggvsghsugdqshhtrggslhgvsehfrhgvvggsshgurdhorhhgqedprhgtphhtthhopeeomhgrthhtrdhgrghrsggvrhesghhmrghilhdrtghomheqpdhrtghpthhtohepoehrsgesghhiugdrtghordhukheqpdhrtghpthhtohepoehthhgvrhhonhdrthgrrhhighhosehgmhgrihhlrdgtohhmqe X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean X-RG-VS-CLASS: clean X-Authentication-Info: Submitted using ID areilly@bigpond.net.au Received: from [10.0.0.6] (101.180.108.40) by smtp.telstra.com (5.8.418) (authenticated as areilly@bigpond.net.au) id 5E5C75140400C0EE; Sat, 14 Mar 2020 12:56:54 +1100 From: Andrew Reilly Message-Id: Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: Long-shot: repeatable macOS samba share unmounting during Lightroom import Date: Sat, 14 Mar 2020 12:56:45 +1100 In-Reply-To: Cc: freebsd-stable@freebsd.org, Theron , rb@gid.co.uk, chris@theory14.net To: Matt Garber References: <28504691-D08B-483B-B4C5-CA47F2C523ED@bigpond.net.au> X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48fQfk6DBZz459L X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=bigpond.net.au; spf=pass (mx1.freebsd.org: domain of areilly@bigpond.net.au designates 203.38.21.31 as permitted sender) smtp.mailfrom=areilly@bigpond.net.au X-Spamd-Result: default: False [-2.40 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[bigpond.net.au]; R_SPF_ALLOW(-0.20)[+ip4:203.38.21.0/24]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; DMARC_POLICY_ALLOW(-0.50)[bigpond.net.au,none]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_IN_DNSWL_LOW(-0.10)[31.21.38.203.list.dnswl.org : 127.0.5.1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[bigpond.net.au]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:1221, ipnet:203.36.0.0/14, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[40.108.180.101.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE_FREEMAIL(0.00)[]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(0.00)[ipnet: 203.36.0.0/14(-3.84), asn: 1221(-2.41), country: AU(0.01)]; RCVD_TLS_LAST(0.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Mar 2020 01:57:06 -0000 HI again, You might remember my Samba-related cry for help, last November. I'm = writing again to report that the problem has been resolved on my = systems, as near as I can tell. Perhaps my experience will help others. The "fix" has come as a result of some changes to my filesystem = structure that I made as a result of a recent drive replacement (the = 1.8T of photos from my last trip ran me out of storage). The upshot of = that is that I don't know whether my previous troubles were = misconfiguration on my part, or some sort of subtle bug in any of the = players at the table: Samba on FreeBSD on ZFS or macOS Catalina's smbfs. = After some experimentation I was able to conclude that Lightroom itself = was unlikely to be the root problem: failure was easily repeatable with = a find in a macOS terminal session. Quick summary of the problem: macOS Catalina would silently and = seemingly-spontaneously disconnect from my Samba filesystems, exported = from my FreeBSD-12-STABLE server when doing any activity that listed or = stat-ed all of the files in a directory of some thousands. To make = matters worse, before the macOS 10.15.3 release, this disconnection = would leave the smbfs driver, or some other macOS kernel state broken, = and it would not be possible to re-mount or properly eject the failed = mount without a reboot. Since I was rebooting a lot, Apple were getting = a lot of crash dumps from me, and their 10.15.3 release seems to have = fixed whatever was stuck in the kernel - reboots were no longer required = - but the disconnection problem persisted. I have a couple of users on the file server, with the usual home = directories in /home/ and these were exported using Samba's = [homes] configuration stanza, in the usual fashion. I also had a shared = directory, at /home/us, which was exported by a separate Samba stanza = with an explicit path =3D /home/us, because "us" isn't a user. When the drives filled up and I installed a new set, since I was going = to restore from backups I took the opportunity to create a new zfs file = system for "us" (/tank/us), and tweaked the smb4.conf accordingly. That seems to have returned the file systems/server/macOS combination to = robust good health. I have not experienced a spontaneous-unmount since = that change, and nothing else about the configuration has changed. My guess: SMB2 enhanced security rules, which Samba enforces, insist = that each host can only log-in/mount a given share once: any secondary = mount attempt should cause the server to drop all mounts. (Sorry, I = can't remember which reference site pointed that out to me.) Perhaps = Samba is interpreting the rule on the basis of underlying host-side = filesystem structure? That would put the old /home/us and /home/uname = shares on the same filesystem, and trigger the security rule? Well, I = always had both "mounted", but perhaps there was a particular pattern of = heavy or slow access that triggered something? Anyway, having all of = the filesystems exported by Samba coming from unique zfs filesystems on = the FreeBSD side has made everything happy. Yay? FWIW I'm running the latest Samba-4.10.13 from ports on FreeBSD = 12.1-STABLE r358963 GENERIC amd64 on a AMD Ryzen 7 1700 Eight-Core = Processor with hardware threads turned on. By the way, the current Samba stable release is 4.12.0 (one week old) = and 4.11.0 was released last September. Is there some particular = incompatibility with FreeBSD that is keeping these out of Ports? I got = quite close to trying to build the newer version myself, but then the = problem went away... Cheers, Andrew Reilly M: 0409-824-272 areilly@bigpond.net.au > On 24 Nov 2019, at 13:46 , Matt Garber wrote: >=20 > On Sat, Nov 23, 2019 at 9:34 PM Andrew Reilly > wrote: >=20 > The other protagonist in this tale, also connected to the gigabit > LAN, is an iMac running current-Catalina on APFS flash, mounting > three filesystems over SMB, from Samba 4.10.10. After appropriate > Samba tweaking this seems to be at least as reliable as it ever was > with netatalk or NFS, and apparently better supported by Apple. >=20 > Considering all of the other bugs and instability introduced (or = reintroduced) in Catalina: did you have this same Lightroom import = workflow configured in Mojave (or whichever other previous macOS version = you were using), and if so, were you encountering the same issue? >=20 >=20 > Thanks, > =E2=80=94 > Matt Garber >=20