v3.4.3#482
Merged
Merged
Conversation
…11266337 🤖 Auto-Build: Update Ring Loadables
…12416252 🤖 Auto-Build: Update Ring Loadables
…e file generation are both fixed
…14211389 🤖 Auto-Build: Update Ring Loadables
…15000604 🤖 Auto-Build: Update Ring Loadables
…84476496 🤖 Auto-Build: Update Ring Loadables
…33411066 🤖 Auto-Build: Update Ring Loadables
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
There was a problem hiding this comment.
Sorry @jkool702, your pull request is larger than the review limit of 150000 diff characters
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


forkrun v3.4.3
Overview
This release focuses on three areas: (1) replacing the experimental
MFD_HUGETLBpath with proper Transparent Huge Page (THP) support and user-facing guidance, (2) distinguishing clean downstream-pipe-close exits from internal faults so that| head-style consumers no longer trigger spurious checkpoint generation, and (3) fixing two data-integrity bugs in the scanner/indexer paths that could silently corrupt or truncate output on delimiter-free or unterminated-final-line streams.All changes have passed the full 4,212-test regression suite.
Breaking / Removed
FORKRUN_USE_HUGETLBremoved. TheMFD_HUGETLBmemfd flag and its associated environment variable have been removed. Hugetlbfs-backed huge pages conflict with the shmem semantics forkrun's memfd-backed files depend on (ftruncate,fallocate(PUNCH_HOLE)fine-grained resizing, arbitrary-offset sparse growth). The supported path to hugepage-backed throughput gains is now THP via/sys/kernel/mm/transparent_hugepage/shmem_enabled. The variable is no longer propagated into the cleanroom environment.New Features
Transparent Huge Page (THP) support for ring-state mapping
g_state/state, aMAP_SHAREDanonymous mapping backed by kernel shmem) is nowmadvise(MADV_HUGEPAGE)-hinted at init time, allowing it to be promoted to Shmem Transparent Huge Pages whenshmem_enabledisadviseoralways.check_thp_shmem_config()reads/sys/kernel/mm/transparent_hugepage/shmem_enabledatring_inittime. If the policy isnever, a one-time notice is printed to stderr explaining the performance implications and recommendingadviseoralways.PERFORMANCE TIP: TRANSPARENT HUGE PAGESblock has been added tofrun --help, documenting:MADV_HUGEPAGEhint on the ring-state mapping.-s/-b/-Cmodes that requiresshmem_enabled=always(since memfd-backed I/O data is accessed viaread/write/copy_file_range/sendfile, nevermmap, and is therefore not covered byadvisemode).Abort-reason tracking (
ring_abort_reason)ring_abort_reason [VAR]— queries why the global emergency abort was triggered.0(unset),1(downstream SIGPIPE / consumer closed pipe — clean exit), or2(internal fault — checkpoint needed).pull_fire_alarm()refactored intopull_fire_alarm_reason(uint8_t reason), which atomically records the reason (via the CAS-protected first-caller-wins pattern) before blasting EOF eventfds. A backward-compatiblepull_fire_alarm()wrapper (reason = 2) is retained for all internal-fault call sites.abort_reasonfield added toGlobalState(cache-line-aligneduint8_t), written once by the firstpull_fire_alarm_reasoncaller and read by the Bash wrapper.ABORTcase in the poll reactor now callsring_abort_reasonto distinguish:NORMAL_EXIT_FLAG=true, exits0, no checkpoint generated. This is the correct behavior forfrun ... | head -c 100and similar downstream-closed-pipe scenarios.NORMAL_EXIT_FLAG=false, exits1, generates a checkpoint for--resume.pull_fire_alarm()calls inring_order_main(stdout-broken paths) and thering_claim_mainSIGPIPE sentry now usepull_fire_alarm_reason(1), since those represent downstream consumer disconnects, not internal faults.Bug Fixes
NUMA indexer: delimiter-free chunk no longer slices open lines
File:
ring_indexer_numa_mainPreviously, when a chunk's entire search window contained no delimiter (i.e., a single logical line spans the whole chunk), the indexer defaulted
actual_endto the chunk's ownraw_offset. The consumer would then treat[prev_boundary, this_chunk_start)as a complete, delimiter-bounded batch, silently slicing a still-open line into fragments.Now:
raw_length == 0(genuine EOF sentinel):actual_end = raw_offsetis emitted as before, so trailing unterminated data is correctly flushed as the final record.raw_length > 0(real chunk, no delimiter found): the previous chunk's resolved boundary is propagated forward, causing the consumer's existingactual_start >= actual_endskip path to defer this chunk (and any further no-delimiter chunks) until a real delimiter or true EOF is found.This fix uses the new
WAIT_FOR_META_READYmacro to safely resolve the previous chunk's boundary.UMA scanner: delimiter-free streams no longer truncate at one buffer ("4 MB cutoff" bug)
File:
core_scanner_loopPreviously, when the UMA (flat) scanner encountered a buffer with no delimiters, it did not advance
ppast the scanned region. This causedcurrent_p_offsetto stall, making the scanner re-read the samechunk_szwindow indefinitely and publish only the final buffer's worth of data at EOF — silently truncating all prior content.Now
pis always advanced toendafter a delimiter-free scan, socurrent_p_offsettracks correctly across refills.lines_foundis only incremented at true EOF (sopending_linesstays 0 andforce_refillkeeps firing until the ingest thread signals completion).UMA scanner: trailing unterminated data now flushed at EOF
File:
core_scanner_loopAdded a force-flush at UMA EOF (
status == 1 && p >= end) whenbatch_start < final_off, emitting any remaining unflushed data as a single final batch. This matches the NUMA path's existingchunk_eof_flushedguard and ensures streams without a trailing delimiter are not silently dropped.Internal / Refactoring
WAIT_FOR_META_READYmacroThe spin-then-poll wait pattern for
ChunkMeta::actual_end(previously hand-inlined incore_scanner_loop) has been extracted into a reusable macro:cpu_relax(), then registers on the target node'smeta_waiterscount and blocks viapoll()on the meta-ready eventfd.out_varon the post-registration double-check path (fixing a latent bug where the earlier hand-written copy could leaveout_varholding a stale zero).on_abort_stmtfor emergency-abort handling (e.g.,goto unified_scanner_eoforreturn EXECUTION_FAILURE).core_scanner_loop(replacing ~25 lines of inline code) andring_indexer_numa_main(new no-delimiter handling).Minor
MFD_HUGETLB#define(no longer used).MADV_HUGEPAGE#defineguard.struct IntervalNode.Files Changed
forkrun_ring.cWAIT_FOR_META_READYmacro, NUMA indexer delimiter-free fix, UMA scanner delimiter-free + EOF-flush fixes,ring_abort_reasonloadablefrun.bashFORKRUN_USE_HUGETLBpropagation, added THP help section, updated ABORT handler to queryring_abort_reasonTesting
All changes validated against the full 4,212-test regression suite with zero failures.