From nobody Sun Jul 23 15:43:48 2023 X-Original-To: fs@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 4R86yr1Tdcz4p07p for ; Sun, 23 Jul 2023 15:43:48 +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 4R86yr0CQTz3JwD for ; Sun, 23 Jul 2023 15:43:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690127028; 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=enfTXX1TdhFx045Q49kBYp3L5aSYx8GTFauJCgunntU=; b=TobcIlwbGqIUnBbc7/mfRzrDkiga4Y+/m1Cqy740Tq10HIxcgiNebCwBnbPTA882kQogtG XGdeK7qZB+rgceT88VkCwHyiN9CinHq83icQT8GNyOtL/I8+bBWxdjB8q5t544dAJa7qoJ n11gKE4q3IzFQKWtBuxU3teM9z+cuhZDUJfqkD4VdXD0blhWAcEgMfMe6KDsH4wa+Vhmrp xktB6wbM5zXSHri/loVZAeY7j2ToXXtc27lKSQVvs5rIJ/PEi3DIduOTAgQ/PmjaTitogu homtHKl5KEMjB4I0nOShhvxNUn6PfvLKWsCYRis3MoRsAme+esItP+2ZOO7N8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690127028; a=rsa-sha256; cv=none; b=aWox8M35SbwcpDL1hJbcVu0o7FfIeeogKstu905a8zNtowbBzR/C6PdsKhaMV6SoG8XXRC Qxwla0iTJlQ3fOX8F2v6QjcGwgqLz3bNS0my8QBUFuiu/TNwIpSFPXIFhpokMSfBQDxTXN dP9z2rTn04te44ijGmdBXxNnmC95spO7HnoKzqErPMRrQj7gwg8I72MDG5itT9O0uRvKXP WSwAKd0CJO4ySLHBslK5LAOKM/9YikYuHWCG+fUWChttOKI90SIcIrTaG4O6Nbrex20YfS gcjv/ZeDGq+mHKdavZ6xm4W4GWOu22zxSP3QKjfNRmULeeDYa4ZmCQjk5Y3Z6w== 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 4R86yq6NyJzhxw for ; Sun, 23 Jul 2023 15:43:47 +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 36NFhlmf077441 for ; Sun, 23 Jul 2023 15:43:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 36NFhlmj077440 for fs@FreeBSD.org; Sun, 23 Jul 2023 15:43:47 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: fs@FreeBSD.org Subject: [Bug 272678] VFS: Incorrect data in read from concurrent write Date: Sun, 23 Jul 2023 15:43:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mjg@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272678 Mateusz Guzik changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mjg@FreeBSD.org --- Comment #4 from Mateusz Guzik --- Thanks for the report. Analysis looks mostly right. Until the issue is resolved, it can be worked around with: sysctl debug.vn_io_pgcache_read_enable=3D0 (which you can add to sysctl.con= f) To the bug, while it is correct that the size is updated first and causing trouble, another issue is that pages are only sbusied (as opposed to xbusie= d), thus even if file size remains unchanged, the read may get a transient state which violates the idea of reads and writes maintaining atomicity. truncate should also xbusy, which will sort it out. --=20 You are receiving this mail because: You are the assignee for the bug.=