Article View: muc.lists.freebsd.bugs
Article #405[Bug 300651] md5sum occasionally generates malformed checksum manifest records
From: bugzilla-noreply
Date: Tue, 10 Nov 2026 22:56
Date: Tue, 10 Nov 2026 22:56
73 lines
4989 bytes
4989 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300651
Bob Kline <bkline@rksystems.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #277170|text/x-python-script |text/plain
mime type| |
--- Comment #4 from Bob Kline <bkline@rksystems.com> ---
Created attachment 277170
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=277170&action=edit
Script to generate repro test files
My own use case involved a bit over 17TB of data, which I thought might be a
daunting barrier for anyone trying to reproduce the reported behavior. However,
it occurred to me that it might not be necessary to use large files for the
repro case, and in fact, having the program generate and write the checksums
faster (because the files were smaller) might even increase the likelihood of
failure. After all, the problem is in the output, not in the generation of the
checksums.
So I created a Python script to generate lots of small files, used it to create
10,000,000 files, and fired up md5sum. However, that didn't result in any
corrupted manifest records. Thinking about the differences between my use case
and the repro test case (other than the file sizes), I realized that all of the
paths for the files (a) were short, and (b) had the same length (18
characters). So I tweaked the script, lengthening the directory names (29
characters each), increased the depth (reducing the number of files in each
leaf directory from 1,000 to 10) and varying the length of the files names
randomly (minimum length 8 and maximum length 100). I ran the job again with
the new set of files, and this time there were 21 corrupted records in the
manifest.
I don't know whether it's related, but I also noticed that there were a bunch
of "Invalid argument" errors. I'll attach those error messages separately. I
have no idea what that message might be referring to. The paths included with
the messages certainly look like valid paths to me, and are roughly an order of
magnitude shorter that PATH_MAX, so 🤷♂️.
The repro instructions are at the top of the Python script, but I'll include
them here as well.
- ./make-md5-repro-files.py /some/path
- cd /some/path
- find . -type f -exec md5sum {} + > /tmp/200651-repro.md5
- egrep -c ' \./.* \./' /tmp/200651-repro.md5
Be sure /some/path is on a file system with at least enough free space to
hold ~30G of files. The directory must be empty.
The output of the last command will be the count of malformed manifest records
created by md5sum.
--
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-300651-227-vVdxtKKSbY@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<bug-300651-227@https.bugs.freebsd.org/bugzilla/>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!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 300651] md5sum occasionally generates malformed checksum manifest records Date: Tue, 10 Nov 2026 22:56:41 +0000 Organization: Newsgate at muc.de e.V. Approved: news-admin@muc.de Distribution: world Message-ID: <bug-300651-227-vVdxtKKSbY@https.bugs.freebsd.org/bugzilla/> References: <bug-300651-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="21004"; 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=1794351401; 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=QFFsRta0Veszu+SnhmeABxSMu2v0oLKpnti9Oblbaug=; b=UpptNhUW7CatqoFjbwVejleMQ99eD/wn34/v6WYKAjLsI/coXk9ZcqbD29Z4exb48gOyCY j92hVcp3nG/EjeO1+PM91ostjTv7yHs41YuObuyybty+P//ljtQAA4ibXAF82Tlzg3URZF 2TzVFhXa7GvvLjve21y4fO4GEFAJ0i6syS//qCxdroA2P1RjKW3HVTtQ3HfnslFjdyWs0k zl+FKJ7ao5v+uQ4+AmWYnqDRxlsL/I4iJGH28/STsLPrrlFor0OKvo9YRNPfIeSzlFecnK 8+IYQZA96r6VzG4leZFJs+1P65FjmhmM1KEYZ5fiwPIEMmteFLy8JMNZXp7Bow== X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f In-Reply-To: <bug-300651-227@https.bugs.freebsd.org/bugzilla/> Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes