From nobody Tue Nov 26 12:58:19 2024 X-Original-To: freebsd-current@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 4XyN0s3yz1z5fR6k; Tue, 26 Nov 2024 12:58:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyN0s3H1tz4F44; Tue, 26 Nov 2024 12:58:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732625901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3YjY0F0J58P1bQ73abAZVdvR5QyDjcaV0WB09HY53J4=; b=S/u0iHh7xAR8o7K4lXyAElGhpF0KnZzuqL4KSBXi+arsqefa8NXFW5CX6cKCI2sjeWl+bZ cieJAmka+K/zQQVK0EoL9GHTCVli4Zx/dbiA/Swz/f0lrOyL5E770uEkAyML0OANO5xOk6 dPsaXWX8DeCUTybDKBDhbqx+wmAs+ZvXkjPCF5itUCLdEEjfOqGvld2xaseZio4k/VKZ6H kUvRl+kg/3phwoMkp2cFMcq85w2tfUuGGlFkqaaO6rT7NZZKy86r/HqYIMUzcmgfGeO3PL cDJ7iDPYY4LX4g0N4LnUocCia0rjxHoK4wUjElzHUzlbxE2Xwzqnd/duKWbk8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732625901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3YjY0F0J58P1bQ73abAZVdvR5QyDjcaV0WB09HY53J4=; b=pDGiBxARQt/esJs7vgJ5TaYmyH7cUn4eCz2VnW6dV/y1tSaXMobb8xDQTi95ke5rgQXOgn kNC9AJO8oNNzmV/c3Xn7cDh0MaWfUn9PgzqDzy9MUn0kS50i/3H/CDbXJSetsDTD8X6mS+ JmHC7Es3iypUY52UQNw5DpX8u67ZUcYuKhLW2lZAtHqFSd486konTVihG9BkIv6iiEYGNE ZRvkEcNaz9bBQ6Cc1Je6azLia8+uHbtywIHrZCTZqLnSRAM7aqeHAxKZvmI3D5xSm3opFz hDmuXFyeJCtNSSc5pnpJLynQGWNNeQGqdrH/aRDYknhxpjN9+Cqz1O7zbgZ0zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732625901; a=rsa-sha256; cv=none; b=s2qTQJ/kYiKusEWSEuxhHkERL36aPWNXohKTROQYRUq0cwrBgQQ7PBi7IS+fi8YOf/B3l3 FIJM+TUfgOs+PwyICqmd6klXZs9jcMIfxkudOhf8cS2DOGT2+9vxT2xq1y2SCEGA7d/iha aCuMvsjz93VVEx6HVL2bxTRWmp/BacuOOtoA6GvXMwsOeBQvMexDZqpFRRCBXP6vsvB5tk O9wpw+kFKz3Fegj8Kh+nb9whBvIvtWk+RFke4+KQKS7WECt7w4noOiIezd9Gtbd+b5geqx 7VkA5rVbmTKJP7sE2MQKt6vAFJ03I9dwDzQBWAFXTI08r4o2WygQmWt9dofSxg== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R10" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XyN0s21SczhJ1; Tue, 26 Nov 2024 12:58:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.wg.andric.com [10.69.1.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 033FF3CDEC; Tue, 26 Nov 2024 13:58:19 +0100 (CET) Content-Type: text/plain; charset=utf-8 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.9\)) Subject: Re: port binary dumping core on recent head in poudriere [tmpfs corruptions involving blocks of zeros that should not be all zeros] From: Dimitry Andric In-Reply-To: <69A2E921-F5E3-40D2-977D-0964EE27349A@FreeBSD.org> Date: Tue, 26 Nov 2024 13:58:19 +0100 Cc: Mark Millard , "jah@freebsd.org" , dougm@freebsd.org, Alan Somers , Mark Johnston , FreeBSD Current , Guido Falsi , Yasuhiro Kimura , ports@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <4AE5B316-D7EB-4290-8D52-7FBF244EA7A4@FreeBSD.org> References: <7c9c3cf5-bbd1-4642-8d04-33aa07a4db02@madpilot.net> <9df256a8-c6ed-46d9-b955-fc2657c12d36@madpilot.net> <5c502054-7353-4a1e-8350-c403482e9c0d@madpilot.net> <3127C3BA-FC93-4636-ADDB-89518DE9C60D@FreeBSD.org> <86ed2zsp6l.fsf@ltc.des.dev> <5f24a570-26e0-4c0a-817f-591a234fd07b@madpilot.net> <5918C6A1-8FDB-40CA-8C86-EB7B7BE75A2E@yahoo.com> <86ed2zc8r5.fsf@ltc.des.dev> <45098ccf-4dc6-426c-849a-c923805d6723@madpilot.net> <38658C0D-CA33-4010-BBE1-E68D253A3DF7@FreeBSD.org> <1004a753-9a3c-4aa2-bfa8-4a0c471fe3ea@madpilot.net> <0690CFB1-6A6D-4B63-916C-BAB7F6256000@yahoo.com> <3660625A-0EE8-40DA-A248-EC18C734718C@yahoo.com> <865xoa2t6f.fsf@ltc.des.dev> <69A2E921-F5E3-40D2-977D-0964EE27349A@FreeBSD.org> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3731.700.6.1.9) On 26 Nov 2024, at 13:32, Dimitry Andric wrote: >=20 > On 26 Nov 2024, at 11:19, Dag-Erling Sm=C3=B8rgrav = wrote: >>=20 >> Mark Millard writes: >>> =46rom inside a bulk -i where I did a manual make command >>> after it built and installed libsass.so.1.0.0 . The >>> manual make produced a /wrkdirs/ : >>> [...] >>> So the original creation looks okay. But . . . >>> [...] >>> So: The later, staged copy is a bad copy. Both are in the >>> tmpfs. So copying to the staging area makes a corrupted >>> copy inside the same tmpfs. After that, further copies of >>> staging's bad copy can be expected to be messed up. >>=20 >> This and the fact that it happens on 14 and 15 but not on 13 strongly >> suggests an issue wth `copy_file_range(2)`, since `install(1)` in 14 = and >> 15 (but not in 13) now uses `copy_file_range(2)` if at all possible. >>=20 >> My educated guess is that hole detection doesn't work reliably for = files >> that have had holes filled while memory-mapped, so = `copy_file_range(2)` >> thinks there is a hole where there isn't one and skips some of the = data >> when `install(1)` uses it to copy the library from `${WRKSRC}` to >> `${STAGEDIR}`. This may or may not be specific to tmpfs. >>=20 >> You may want to try applying the attached patch to your FreeBSD 14 = and >> 15 jails. It prevents `cp(1)` and `install(1)` from trying to use >> `copy_file_range(2)`. >=20 > Yes, tmpfs is indeed the culprit (or at least involved). I have had = USE_TMPFS=3Dlocalbase in my poudriere.conf for a long time, since = otherwise my build machine would run out of memory very quickly, so I = didn't encounter any issues. >=20 > Now I changed it to USE_TMPFS=3Dyes, rebuilt only textproc/libsass and = textproc/sassc, and then after reinstalling those packages: >=20 > $ /usr/local/bin/sassc > Segmentation fault And after applying Dag-Erling's patch to disable copy_file_range for cp = and install, it works correctly again. -Dimitry