Article View: muc.lists.freebsd.bugs
Article #888[Bug 301442] [zfs] 15.1 corrupts pools with a legacy dedup table: please merge OpenZFS e7f2c9fb87ca to stable/15 and issue an er...
From: bugzilla-noreply
Date: Thu, 03 Dec 2026 04:13
Date: Thu, 03 Dec 2026 04:13
72 lines
4662 bytes
4662 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301442
Bug ID: 301442
Summary: [zfs] 15.1 corrupts pools with a legacy dedup table:
please merge OpenZFS e7f2c9fb87ca to stable/15 and
issue an errata notice
Product: Base System
Version: 15.1-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: bj.rn@baerlin.eu
ZFS in FreeBSD 15.0 and 15.1 double frees the gang headers of dedup blocks on
pools with a legacy (traditional) dedup table. After two deletes of blocks that
share such a header, the pool panics on the next load of the affected metaslab:
panic: Solaris(panic): zfs: rt={spa=... vdev_guid=... ms_id=...
ms_allocatable}: adding segment (offset=... size=200) overlapping with existing
one
The bug is OpenZFS #18819. It came with the DDT prune work in OpenZFS 2.3.0 and
is fixed by commit e7f2c9fb87ca, "ddt: select traditional phys by block
identity, not BP DVA count" (2026-07-27). The fix is in main since the vendor
import of openzfs@84aa7e7e0 on 2026-08-24 (22649d4dba73). It is not in any
OpenZFS release (zfs-2.4-release ends at 2.4.4) and not in stable/15 or
releng/15.1: `ddt_entry_lookup_is_valid()` there still compares against
`ddp_trad[BP_GET_NDVAS(bp)]`. 14.x (OpenZFS 2.2.7) is not affected
Mechanism, in short: a copies=1 dedup write that gangs gets a block pointer
with two DVAs, because gang headers get one extra copy, while the DDT stores it
in the SINGLE slot. On free, `ddt_lookup()` checks the DOUBLE slot, finds
nothing, and `zio_ddt_free()` takes the "pruned" fallback: it frees the block
pointer directly, without decrementing the refcount and without the gang
stages, so only the header extents are freed. Every further delete of another
reference frees the same headers again
## Who is affected
Any pool with a legacy DDT that is imported by a 15.x kernel and has dedup
blocks that ganged, which is likely on fragmented or full pools and on ashift=9
pools. `zpool upgrade` is not needed to trigger it. Existing pools created and
used with dedup on 14.x are hit by the OS upgrade alone
Setting dedup=off does not protect a pool. It only stops new dedup writes,
every delete of an existing dedup gang block still goes through the faulty path
--
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-301442-227@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!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-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!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 301442] [zfs] 15.1 corrupts pools with a legacy dedup table: please merge OpenZFS e7f2c9fb87ca to stable/15 and issue an errata notice Date: Thu, 03 Dec 2026 04:13:34 +0000 Organization: Newsgate at muc.de e.V. Approved: news-admin@muc.de Distribution: world Message-ID: <bug-301442-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="45492"; 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=1796271214; 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=CSIoj4KFcyhM/9xUOMTdfwu4B+NRMY3Jt13gGuWMrvc=; b=UkZHqgPsd3XQcXp0AyQP5XAoxAV4Cnh3JLz2wRIFPK4JkX1KHdTywJeVbh/QL4HhKDNlZS SWMAnVEzKOBd9hYkevJ2tjPhmBtU8IKtIKxrwidRv+JmnvQN5YrJusvOFdhBmmlgCMqB/P Zy2OfBCTaxMzjbkGB5XMbDHimArBISScnWq+X/2dlKERp0Ex1t5uBO6LeeS2dgU1BNjcp+ mKqwGIo2SBZurbzABEMA5spT+vFyv7df4h+2JfXglugMugdb5Fwn7Vos9SwAvVmhgDA9Oh sPVrWmNR+DxMDaQ/ZjZvm1nRU4cXE4GDpMAzi0pv5t23B/WbWb5fDQQEob70Og== 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