# ARC frozen-buffer panic: upstream submission guide

Prepared 2026-12-02. Nothing has been submitted.

Use [BUG_REPORT.md](BUG_REPORT.md) as the issue body and
[panic-backtrace.txt](panic-backtrace.txt) as the initial text attachment.
The report distinguishes the confirmed panic from unproven explanations.

## 1. What is established

The saved `core.txt.8` identifies a FreeBSD 15.1-RELEASE-p3 amd64
GENERIC-DEBUG kernel, build `#0 88e7371d9dc2-dirty`, built on
2026-09-26. The crash was recorded at 2026-10-02 04:53:23 UTC.
The symbolized panic stack includes:

```text
arc_cksum_verify(buf=0xfffff801f07d3e60)  arc.c:1487
arc_write_done(zio=0xfffffe012bae3480)   arc.c:6989
zio_done                               zio.c:5859
__zio_execute / zio_execute
 taskqueue_run_locked / taskqueue_thread_loop
```

The debugger records `hdr=0xfffff8028e0fbcf0`, the computed checksum,
and `psize=102400`. This supports reporting a frozen-buffer checksum
verification failure in write completion. It does not identify who changed
memory or establish whether file data reached disk incorrectly.

### Corrections to the previous analysis

The previous document asserted a truncate/free race, an impossible ARC state,
a missing compressed-buffer flag, and certain silent corruption. Those
conclusions are not established by the supplied transcript.

* The earlier raw header value `0x0f140110` has `IO_IN_PROGRESS` (bit 8)
  and `COMPRESSED_ARC` (bit 20), but **not** `SHARED_DATA` (bit 21),
  `BUFC_METADATA` (bit 17), or `NOAUTH` (bit 16). These bit positions were
  checked in the local `include/sys/arc.h`. The raw header value itself
  needs a fresh debugger transcript before being used as evidence.
* Header compression and an uncompressed consumer buffer do not by themselves
  prove a bug. Do not propose setting `ARC_BUF_FLAG_COMPRESSED` merely because
  the write uses LZ4.
* `arc_anon`, an in-flight write and a reference count need interpretation at
  the exact lifecycle point in the matching source. Assertions in
  `arc_release()` alone do not prove that an anonymous write header is illegal.
* The earlier account says `b_data` was unavailable in the minidump. It therefore
  cannot demonstrate zeroed data or a pointer-sharing relationship from payload
  inspection. No supplied trace proves a concurrent truncate modified this buffer.
* Keep truncate/fsync, ZIL involvement and memory corruption as hypotheses.
  Do not submit the previously suggested fixes, CVE request or claims of certain
  production/ZIL replay corruption without additional evidence.

## 2. Submission destination and steps

OpenZFS accepts bug reports using its
[bug report template](https://github.com/openzfs/zfs/blob/master/.github/ISSUE_TEMPLATE/bug_report.md).
FreeBSD also tracks issues in its imported ZFS implementation; its
[problem report guide](https://docs.freebsd.org/en/articles/problem-reports/)
discusses routing imported-software bugs and supplying kernel evidence.

1. Search [OpenZFS issues](https://github.com/openzfs/zfs/issues?q=is%3Aissue+%22buffer+modified+while+frozen%22)
   and [FreeBSD Bugzilla](https://bugs.freebsd.org/bugzilla/) for the exact
   panic, `arc_cksum_verify`, and `arc_write_done`. Compare versions and stacks;
   the same panic text alone does not establish a duplicate. Duplicate/fix
   triage has not been completed here.
2. Complete the missing environment/workload details below. A reproducer or
   patch is helpful but is not a prerequisite: explicitly say when unavailable.
3. For the requested upstream report, sign into GitHub, open
   [New OpenZFS issue](https://github.com/openzfs/zfs/issues/new/choose), and
   select **Bug report**. Suggested title:
   `FreeBSD: buffer modified while frozen! panic in arc_write_done (GENERIC-DEBUG)`.
4. Paste `BUG_REPORT.md` into the body, retaining its template sections. Upload
   only the reviewed `panic-backtrace.txt` and any additional reviewed text
   evidence. The template supplies `Type: Defect`; leave assignment to maintainers.
5. Review the rendered report and attachments, then submit it yourself. Record
   the issue URL locally for follow-up. No submission is performed by these steps
   until you click Submit.
6. If FreeBSD integration or the local kernel changes appear relevant, file a
   linked FreeBSD report too (or start there if routing is uncertain). In Bugzilla,
   use **Base System**, component **kern**, architecture **amd64**, the closest
   matching affected version, and the same summary. Include the exact version
   in the description if the selector lacks it. Describe it as a kernel panic;
   choose an appropriate available severity rather than claiming confirmed data
   loss. Cross-link both reports and disclose local patches. Follow the live form
   for mandatory account/contact and other fields.

## 3. Fields and information to supply

The OpenZFS template asks for the five system-information rows and sections for
the observed problem, reproduction and logs/backtraces. Fill unknowns explicitly
rather than guessing. The following extra details make this crash actionable.

| Information | Present status / action |
|---|---|
| Distribution, kernel, architecture | Crash-time identification included |
| OpenZFS version | Earlier notes say 2.4.2; confirm loaded module/source revision |
| Local modifications | Kernel is `dirty`; supply relevant diff and build/config options |
| Expected vs actual | Write completion expected; panic observed |
| Reproduction | Unknown; supply application, commands, workload and recurrence if known |
| Regression history | Last working / first failing build, or explicitly unknown |
| Hardware | Earlier notes say Intel N95; verify CPU, RAM and storage/controller details |
| Pool configuration | Topology, separate log/cache devices, pool health and error counts |
| Dataset settings | Relevant compression, sync, recordsize, logbias, dedup/encryption settings |
| Runtime settings | Nondefault ZFS/ARC tunables and debug options |
| Impact | Panic confirmed; no demonstrated on-disk corruption |
| Evidence | Focused stack attached; core retained privately |

On the affected FreeBSD host, capture these read-only outputs as needed:

```sh
freebsd-version -kru
uname -a
zfs version
sysctl hw.model hw.physmem
zpool status -v
zpool list
zfs get compression,sync,recordsize,logbias,dedup,encryption POOL/DATASET
```

Replace `POOL/DATASET` with the affected dataset. Current outputs describe the
current machine, not necessarily the crashed kernel: label their collection date
and any upgrades since the panic. Redact unrelated paths in `zpool status -v`.
Supply relevant debug configuration and nondefault tunables; avoid dumping every
sysctl or every dataset property into the issue.

In the source tree actually used to build the crashed kernel:

```sh
git rev-parse HEAD
git status --short
git diff -- sys/contrib/openzfs sys/amd64/conf/GENERIC-DEBUG
```

Also review other build/config changes and staged changes (`git diff --cached`)
that may affect the kernel. Do not infer the crashed module version from the
current `zfs` userland version alone.

## 4. Evidence without a core dump

### Initial public evidence

Attach `panic-backtrace.txt` (about a few KB), which contains the panic context
and the panic thread's symbolized backtrace with available locals, extracted
from `core.txt.8`. It omits the original hostname/build user and the unrelated
system/thread inventory. Kernel addresses and source paths remain for diagnosis.
Review it before publishing; focused debugger text can still contain sensitive
values. Add a short, reviewed log excerpt immediately preceding the panic if
available, with timestamps and hardware/storage errors retained.

Do not attach the raw `core.txt.8` by default: it contains much more system and
thread information than the initial report needs. Do not upload `vmcore.8.zst`,
`vmcore.8`, a recursive copy of this directory, kernel memory ranges, or file
payloads. Compression does not remove private information.

### Targeted follow-up using the retained dump

Keep the exact kernel, zfs.ko, debug symbols and source changes associated with
this dump. Earlier notes identify `/boot/kernel.zfsdiag.old/` as the retained
build; verify that it really matches the dump, including ZFS module symbols.
The saved transcript originally loaded `/boot/kernel.zfsdiag/`.

If maintainers request more detail, start kgdb with the verified matching kernel
and local decompressed dump, then capture a small session:

```text
set pagination off
set logging file arc-evidence.txt
set logging overwrite on
set logging on
bt
frame 5
info args
info locals
p *buf
p *hdr
p *hdr->b_l1hdr.b_state
p hdr->b_l1hdr.b_refcnt
p *hdr->b_l1hdr.b_freeze_cksum
frame 6
p *zio
set logging off
```

Frames 5 and 6 refer to this saved panic stack; use `bt` and adjust if the active
thread/frame differs. Symbols, field availability and debugger logging syntax
may vary. Preserve errors such as `<optimized out>` or unavailable minidump
pages rather than inventing values. Review/redact the output before attachment.
These commands are instructions, not a session already executed for this edit.

Ask maintainers which callback/dbuf fields or thread stacks they need next.
An all-thread backtrace can help find concurrent operations but exposes process
names/arguments and can be large; extract relevant stacks into a reviewed text
file. Do not use memory byte dumps of `b_data` as public evidence.

### Private evidence inventory (do not attach wholesale)

| Artifact | Local location / purpose |
|---|---|
| Original compressed minidump | `vmcore.8.zst` symlink to `/home/wongk/zfs-crash/crash/vmcore.8.zst` |
| Saved debugger transcript | `core.txt.8` symlink to `/home/wongk/zfs-crash/crash/core.txt.8` |
| Earlier decompressed working copy | `/tmp/zfs8/vmcore.8` (availability not checked) |
| Matching binaries/symbols | Earlier recorded `/boot/kernel.zfsdiag.old/`; verify match before reuse |
| Local source tree | `/home/wongk/zfs-crash/zfsdiag/src/` |

If text evidence is insufficient, offer to run specific debugger commands locally.
Discuss any private artifact transfer separately with maintainers; the core does
not need to be part of the initial public submission.

## 5. Before submitting

- [ ] Search existing reports and compare any candidate fixes.
- [ ] Confirm exact crashed OpenZFS revision and disclose local build changes.
- [ ] Add known workload, recurrence, pool configuration and relevant settings;
      mark remaining unknowns explicitly.
- [ ] Review report and text attachments for private information.
- [ ] Attach only selected text files, never the dump or entire directory.
- [ ] Retain matching dump, binaries, symbols and source locally for follow-up.

A minimal reproducer, tested patch, upgrade test and definitive root cause remain
unavailable. They are useful follow-up work, not claims made by this report.
