Article View: muc.lists.freebsd.bugs
Article #397[Bug 300652] md5sum occasionally generates malformed checksum manifest records
From: bugzilla-noreply
Date: Tue, 10 Nov 2026 12:42
Date: Tue, 10 Nov 2026 12:42
98 lines
5088 bytes
5088 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300652
Bug ID: 300652
Summary: md5sum occasionally generates malformed checksum
manifest records
Product: Base System
Version: 15.1-RELEASE
Hardware: amd64
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs@FreeBSD.org
Reporter: bkline@rksystems.com
DESCRIPTION
===========
While generating MD5 checksum manifests for large directory trees, FreeBSD's
`/sbin/md5sum` occasionally produces malformed output records.
The manifests were generated using:
find . -type f -exec md5sum {} + > ~/etc/da0.md5
Three separate manifests were generated in this manner, covering a total of
33,348,276 files.
Inspection revealed 15 malformed records across the three manifests. These
malformed lines have the following pattern:
<CHECKSUM> <POSSIBLY-TRUNCATED PATH><CHECKSUM> <PATH><NEWLINE>
In other words, records for two different files are concatenated on the same
line, dropping at least the separating newline, and usually truncating a
portion of the path for the first of the two files.
The following command identified the malformed records:
egrep -c ' \./.* \./' da[025]-freebsd.md5
da0-freebsd.md5:6
da2-freebsd.md5:1
da5-freebsd.md5:8
As expected, each of these malformed records resulted in a "FAILED open or
read" error.
Here's a sample malformed record:
e2819802df52922ab64f514b10798db7
./old-backups/ws-20170311/home/bklf16ea05c772f4e5c8a36f02980a3daa7
./old-backups/ws-20170311/home/bkline/Downloads/android-studio/lib/ant/README
I can attach the complete set of malformed records, if desired, though they all
follow this same pattern.
ENVIRONMENT
===========
Hardware: Lenovo ThinkServer TS140 (amd64), 32GB RAM, 2TB Crucial BX500 SSD
OS: FreeBSD 15.1-RELEASE-p6 releng/15.1-n283643-95719d8a895b
Storage: ZFS compression=zstd
Version: md5sum (FreeBSD) 15.1
REPRO
=====
Unfortunately, I am unable to provide a short set of instructions for
reproducing the problem, as the percentage of records that were malformed in
these manifests was only 0.000045% (15 failures in 33,348,261 records).
WORKAROUND
==========
Using the GNU implementation (md5sum (GNU coreutils) 9.9, installed as gmd5sum)
I was able to generate well-formed manifest records for all the files and
successfully verify the checksums of the copied files. I will note that this
program was markedly faster (though I don't have useful timings for comparison,
because the FreeBSD implementation's process died several times with a "Broken
pipe" error message during the "md5sum -c" phase; I can report that as a
separate bug if you want, though repro steps would be at least as challenging
as for this bug).
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<bug-300652-227@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail From: bugzilla-noreply@freebsd.org Newsgroups: muc.lists.freebsd.bugs Subject: [Bug 300652] md5sum occasionally generates malformed checksum manifest records Date: Tue, 10 Nov 2026 12:42:22 +0000 Organization: Newsgate at muc.de e.V. Approved: news-admin@muc.de Distribution: world Message-ID: <bug-300652-227@https.bugs.freebsd.org/bugzilla/> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="88639"; mail-complaints-to="news-admin@muc.de" X-Original-To: bugs@mlmmj.nyi.freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794314542; 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=BdIJg6yBKIIRoI4LENgNOHD3VhWGGf61nyWeBOA8nzQ=; b=JVIWD+mDiO2CjZ6ctOLVU7DBBBhtjosYlWRHn/7JWC9Uu/zkznz96vD16gdiLqfT2REnhF 2zed8P0ppq3lsS31K3honRdP9eR38qFUkAA9/4cuDwdSItVBMq0Kk1x8srLUgTr/amP2XF P+nw1JblOVvfTMqvL2k+53Mz1TtUOT9J+m+HeEuwq2bJG18KDbKQm0yU4PqLNWjNhFpMol xi/ddg8L8tNlHmx2opFqV42m/PoGAKBVoz2OZGduGqN594t4+ZQlLTvk2MuhHboY/6tfcH /1T4CfCkVRfv4wj8CgRvyL3Rd2BpHoPzbvKzlGCRsQ4KARkikusd03GynBOnWw== X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes