From nobody Mon Jan 5 13:29:41 2026 X-Original-To: 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 4dlFX52qyfz6MV3r for ; Mon, 05 Jan 2026 13:29:41 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlFX5259Tz3WLL for ; Mon, 05 Jan 2026 13:29:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767619781; 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; bh=tNPKNyd6gIPOxZ2RTe0WAX02ASl5sWvy8hxtfVfhCbE=; b=C0wzo0BvtOknvwWPLq/6iOzAoHQTxN5ky2kVlkfBHUmx1oZ4bleTtP/+1mSjxmVPeh+AMn MMz4TwUib5C0O6BpmFfcLLWaC4WUVCzlHJfhMCFrfbdDEq29v/kg2CXcBI74NE2QdX/Yy0 2BPcjraPoaYMEwFJdDBi1VCZqhK1SYxhoF5nShcTZMGz89o9EguWxny5DsuTcfaMBwT6Yo waXSGHGfrQRTX3S2Bv1BPu3L5z3Nz/xGNBtopFnqvSuwaj5YB86WdCEJnzGgrGLPKQIOU/ Okr84b0CTEP/Uue/feRHgbFH6FrdsQkvRa0mVpCwNav222DbYJoipDFWa67jtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767619781; 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; bh=tNPKNyd6gIPOxZ2RTe0WAX02ASl5sWvy8hxtfVfhCbE=; b=HEHTSGxIz/LZrrq3YdFxrGPs3HgIfA2VEPFrPis/3sILAyf66QWJSv6Kg7pqk3lXAj/0ve /QVDZL7XGqMnj0NX40nUooSJVR2sOdbhuZ+GaQpoNAPz591kN6Surksr3jmdATO8+WwrGT vMGixVfe/HMxXBTixDHYe6FpxpFf8Bra0nv93ty7u2eyAkaKF542RzGuG7B9PjLhCXjECt 0MwW61sRhZ4Z+EEbSoJrF3rgPsT0a/u3gXX8WBRczIqJ8tC2oRtRjZcXh/Nq4VSWgjHBSx FlpIhKl6F8wwR17AwgFsUSf1YTVO2uHRM8xcOxTJt5l1M9u+nVyUZvGhsg6vqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767619781; a=rsa-sha256; cv=none; b=D63+t+l1+Jg+ZZoDv6rL09u5ywLTpRobpI1nkMResc9ilqHR3O53eiqTwCV8G5CIMlWGY8 WFkmqNFJqB2eVnn2o/vJZK9vJ4+0/JzpzKyZvQ1qLh6CLmx4Ekftb7xm5YD3nPDUdkMArk 38/ysxI3Rl64s2IoOuIf3V8W9hUUpi963+V1h1jcVwPdur/9Nqizdocr8mhEJkFZ3kDPmb Aguq6fcvP4CCqPM/IIiuiT6UPmvpSU0IWMI9qobZeIQXFcRXTFYViB3ONtPltvi8st+YY0 +YQH8DlloTCIA3VHjed7WAp64OTgytYZdz0MDneq+lb1IZUSQsw4FTgDwt9DXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4dlFX51fPdz6Yq for ; Mon, 05 Jan 2026 13:29:41 +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 605DTfRO089265 for ; Mon, 5 Jan 2026 13:29:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 605DTfaw089264 for bugs@FreeBSD.org; Mon, 5 Jan 2026 13:29:41 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: bugs@FreeBSD.org Subject: [Bug 292198] /usr/bin/diff silently ignores hardware errors Date: Mon, 05 Jan 2026 13:29:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ml@netfence.it X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D292198 Bug ID: 292198 Summary: /usr/bin/diff silently ignores hardware errors Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: ml@netfence.it Created attachment 266843 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D266843&action= =3Dedit Git patch (works against current and 14.3) I just burned a couple of Blu Ray data disks. Since I don't trust optical media that much, I thought I should check. So... > mount /mnt/bluray > diff -rq /mnt/bluray originaldata/ No output, so everything good, isn't it? Hadn't I by chance seen some ahci MEDIUM ERROR (uncorrectable error) in the logs I would have stored these disks away and could only hope I wouldn't ev= er need them! Let's check again... > diff -rqs /mnt/bluray originaldata/ No output??? > mkdir newdata/ > cp -R /mnt/bluray/* newdata/ > cp: /mnt/bluray/file1: Input/output error > cp: /mnt/bluray/file2: Input/output error > cp: /mnt/bluray/file4: Input/output error > ... So I had to conclude that diff silently ignores files when an underlying hardware error happens and cannot be trusted!!! For comparison: > gdiff -rq /mnt/bluray originaldata/ gdiff: /mnt/bluray/file1: Input/output error Now I wonder how many of my optical disk were not readable when I put them away. IMO this is so bad it should deserve an EN. The patch I'm attaching is not perfect (at this point in the code, we don't know which of the two files failed), but at least gives an hint something is wrong. Perhaps someone can come up with a better solution, but if that takes times, I think this is better than a silent failure. --=20 You are receiving this mail because: You are the assignee for the bug.=