⬢ DragonFlyBSD Kernel Audit
DF-3093 / trace-excerpts.txt
← back to finding ↓ download raw
DF-3093 kernel-side trace excerpts (diagnostic kernels, excerpted verbatim
from the verification session; full campaign logs in the run*.log files)

===========================================================================
[1] Live poll of debug.df3093_inflight DURING a 6-writer race
    (kernel #2, minimal test; proves clusteralloc critical sections
    genuinely co-resident on multiple CPUs)
===========================================================================
 747 0        <- poll samples reading depth 0
  46 1        <- depth 1
 118 2        <- depth 2: two CPUs inside clusteralloc simultaneously
  68 3        <- depth 3: three CPUs inside clusteralloc simultaneously
overlaps: 25

===========================================================================
[2] kernel #1 (STOCK code + counters only, no timing changes):
    run4.sh campaign — fragmented 512 MiB FAT32, 6 pinned barrier
    writers x 2 rounds x 16 MiB.  Counters after the campaign:
===========================================================================
DFDBG before: 0 0
DFDBG after:  66 0        <- 66 overlap events, ZERO double-allocations
DFDBG: clusteralloc overlap depth=2 count=4096
DFDBG: clusteralloc overlap depth=3 count=4096
DFDBG: clusteralloc overlap depth=3 count=3840
DFDBG: clusteralloc overlap depth=3 count=3584
DFDBG: clusteralloc overlap depth=3 count=3328
...
fat_scan: max in-degree = 1 (cluster 3)
fat_scan: clean (no cross-links)

[2b] Same kernel, run6.sh (132-cluster word-straddling runs, tail fully
     filled so every allocation goes through the fallback scan):
DFDBG before: 66 0
DFDBG after:  142 0     (cycle 1: +76 new overlap events)
DFDBG before: 142 0
DFDBG after:  203 0     (cycle 2: +61 more)
fat_scan: clean (no cross-links)  [both cycles]

===========================================================================
[3] kernel #4 (DELAY(100) before fallback commit + DELAY(200) after the
    newst read + E/X tsc trace): extend phases of concurrent writes ran
    strictly sequentially (entries never interleave across CPUs)
===========================================================================
DFSCHE: E cpu=2 tsc=2903918893 count=4096
DFSCHE: E cpu=2 tsc=2921124019 count=1032
DFSCHE: E cpu=2 tsc=2930647575 count=776
DFSCHE: E cpu=2 tsc=2936872563 count=520
DFSCHE: E cpu=2 tsc=2951161599 count=264
DFSCHE: E cpu=2 tsc=2961645877 count=8
DFSCHE: E cpu=0 tsc=3140117825 count=4096     <- cpu switch only AFTER
DFSCHE: E cpu=0 tsc=3152795767 count=3840        cpu=2 finished its whole
DFSCHE: E cpu=0 tsc=3173751825 count=3584        extend sequence
DFSCHE: E cpu=0 tsc=3187682905 count=3328
...
DFSCHE: E cpu=4 tsc=3354714071 count=4096     <- again strictly after
...
overlaps=0 double=0
(Anomaly: on the delay kernels the pre-extend path appeared serialized;
 this serialization was NOT observed on the timing-unmodified kernel #1,
 which recorded 66/137 overlaps.  Treated as a diagnostic-kernel artifact,
 not stock behavior.)

===========================================================================
[4] Concurrency sanity probes (userland, stock-behaving kernels)
===========================================================================
6 CPU-pinned spinners: 319M/171M/299M/329M/285M/209M spins/sec each
  -> genuine 6-way CPU parallelism for pinned processes.
Barrier release spread (per-cache-line go words, pinned children):
  typical 0-250 us, occasional stragglers up to 5.7 ms.

===========================================================================
[5] Bottom line counters across ALL campaigns (stock-behaved kernel #1
    + delay kernels #2-#4), ~500 barrier-synchronized allocation bursts:
===========================================================================
debug.df3093_overlaps: > 200 events (depth up to 3)
debug.df3093_double:   0        <- the claimed double-allocation NEVER fired
fat_scan in-degree:    1 (clean) in every unmounted image
foreign bytes:         0 in every round
"Freeing unused sector" kernel messages: 0