From nobody Thu Mar 03 08:29:06 2022 X-Original-To: ports-bugs@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 D005119F00FF for ; Thu, 3 Mar 2022 08:29:06 +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 4K8PKG3rSnz4SQf for ; Thu, 3 Mar 2022 08:29:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 65603146BD for ; Thu, 3 Mar 2022 08:29:06 +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 2238T66h053357 for ; Thu, 3 Mar 2022 08:29:06 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2238T6cn053356 for ports-bugs@FreeBSD.org; Thu, 3 Mar 2022 08:29:06 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 262293] sysutils/archivemount gives errors after mounting the 13.0 release tarballs Date: Thu, 03 Mar 2022 08:29:06 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: billblake2018@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646296146; 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: in-reply-to:in-reply-to:references:references; bh=aSQlcTIRNsj0DxIGBuZ9HUpdMqUHtDhpcy6Sr/bcHNA=; b=sM5JmOsFB2H4Rdm4M7uP2KurVaXsCWxo/GNZ7zUVCxq38LchBrtYzqQGE8biAlzMyDJmbY sbzJzruMqhCowrDEtPq4t+Vb+ti7MWz5YYD1FTZb0L4DUZOVNwBLySik3ALrf5ZNISjTAp L2pxVzlGGKlsX5bvKLpR9LNHwx11pzFQURfO8tXoB5rl9nQzJAUmJtueMsd9ITUuoWAVmH SmlthgiyunBxKPEEylHorTyqIYdH37WOstAtKUtF31IBsYUcRHoyCj1sa5hJIaQvTVZWAg OLRTk60pmbKZQ68SeMYTFfg/Yp7AUUNrbx/eoxjN6WBT+ip4XBfMBz+LX9gSvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646296146; a=rsa-sha256; cv=none; b=LdpyL8FZQAmRrtxc8NVkdIT765qPxIJKsvD0h6AvQv3ZiIRyEZy1t1Df/aj03jlNyal03P HFi1SbIJt4dJc1OWxYqN8Jj+J29KMhhlAyMEqKY7jGAVoZAkd25kO7BgKPRf6CMVOcX5ZM ydb/kNBsL7zoA6Wco36oZMcanMm3IWu5VXhVcUZ4sWyFkal4Fr1vhHkEe1Anmb35M5xyQk agI1TtcXoDw5JcZOkf/ZDddiCZ0JhyqYZ2rjvpj6gwscRIXw/HQTqkkbfWoKdUe8UrKjov CEVAzMN5c8VoIEVhKE7xg4Pqfs8qEWTnD74T6aE93tqyJHTrxjndAe3F5uBC7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262293 --- Comment #1 from Bill Blake --- In an attempt to further isolate the bug, I tried using a different package, fuse-zip, with a zipped up /usr/ports. And--got the same bug. No, the pro= blem isn't in fuse itself, it's two separate bugs, one in fuse-zip and one in archivemount. In both cases, the link count for directories (and for archivemount at least, files), is computed incorrectly. For archivemount t= he link count is always returned as zero. For fuse-zip, the "link count" is actually the number of entries in the directory. Either way, the incorrect link count confuses the directory traversal code = of fts.c because it uses that count to optimize away unnecessary stat calls. = And this ultimately led du to generate the error messages that I saw. It also breaks find but, apparently, not diff -r. Be that as it may, this is a ser= ious bug and needs some sort of repair. (Ditto for the bug in fuse-zip, though that's for a different PR.) And here is an awful hack to fix the bug. THIS IS NOT A CORRECT FIX. Firs= t, it always sets the link count to 1 for non-directories. Second, it is prob= ably unnecessarily inefficient. But it suffices to set the link count for directories correctly, which makes du and find work. This patches archivemount.c: @@ -1545,6 +1545,20 @@ stbuf->st_blocks =3D (stbuf->st_size + 511) / 512; stbuf->st_blksize =3D 4096; + if (S_ISDIR(stbuf->st_mode)) { + stbuf->st_nlink =3D 2; + NODE *child, *tmp; + HASH_ITER(hh, node->child, child, tmp) { + const struct stat *chbuf =3D archive_entry_stat(child->entry); + if (S_ISDIR(chbuf->st_mode)) { + ++stbuf->st_nlink; + } + } + } else { + stbuf->st_nlink =3D 1; + } + --=20 You are receiving this mail because: You are the assignee for the bug.=