Repository navigation
fix: restore main-only v3.9 fixes that never reached dev - #350
Merged
Merged
Conversation
v3.9 ships CWIST_ENDPOINT_PUBLIC_FIXED (1u << 3) in endpoint_opts.h. When #194 replaced the public FIXED cache, cf69362 removed the cache but kept this bit defined (inert) "on both branches" so code that sets it keeps compiling; dev never actually received the definition, so a program built against v3.9 that passes it fails to compile on dev and the v4.0 API baseline was recorded without it. Take v3.9's endpoint_opts.h, which also replaces dev's stale "proposed opt-in, draft PR #85" wording with the current description.
…122858) Port the parts of main's 3122858 that never reached dev (dev already has the io_queue.c and scheduler.c disowns, from dcb561b): - kqueue.c: the BSD io_queue disowns the queue and each submitted job from the allocating thread's full-GC sweep list, as the io_uring/epoll backend does, and fails a submit whose job allocation failed instead of dereferencing NULL. - http.c: during shutdown the reactor loop no longer runs, so a coalesced batch is finished with a blocking send instead of being parked on a callback that will never fire. - tests/test_gc_job_handoff.c, wired into TEST_TARGETS. The recipe runs the gc, nogc and runtime modes, then gc and nogc again under -DNDEBUG (main's two recipes for this target, combined).
main's c5f289e never reached dev. cwist_http_receive_request() passed everything read so far to the header parser, so with a pipelined request already in the buffer the next request's bytes were taken as this request's body. Parse only the header block, as the nonblocking receiver does, and leave body framing to the code below. The check_blocking_pipeline cases in tests/test_http_pipeline.c fail on dev without this change (body size assertion) and pass with it.
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.
Brings back to
devthe main-only work that v3.9 shipped but that never reacheddev.How this was found: I compared v3.9 against current
devfile by file. For every line that exists only in v3.9, I checked whetherdevhad deliberately replaced it.devhas since superseded: the old static task ring, the old async claim spin, the oldgc.hdocs, the HTTP/3 changes. Those are left alone.mainonly, mostly in Jiho Lee's 2026-09-14 batch, and before the histories were joined it was never ported todev.Commits
fix(api): restore the inertCWIST_ENDPOINT_PUBLIC_FIXEDbit (79144d1)endpoint_opts.hdefinesCWIST_ENDPOINT_PUBLIC_FIXED (1u << 3).devnever received the definition. Code built against v3.9 that sets this bit does not compile againstdev.endpoint_opts.h, which also replacesdev's stale "proposed opt-in, draft PR docs: propose safe public FIXED response cache ADR #85" text.make api-baselineoutput is unchanged, because the baseline does not track macros.fix: complete shutdown writes and transfer queue ownership (7dfe8be, author Jiho Lee, port of 3122858)kqueue.c: the BSD io_queue now disowns the queue and each submitted job from the allocating thread's full-GC sweep, as the other backend already does. A submit whose job allocation failed now returns an error instead of dereferencing NULL.http.c: during shutdown, a coalesced batch is sent with a blocking write, instead of being parked on a reactor callback that will never run.tests/test_gc_job_handoff.cis wired intoTEST_TARGETS, running the gc, nogc and runtime modes, plus gc and nogc again under-DNDEBUG.io_queue.candscheduler.chalves are already ondevfrom dcb561b.fix(http): isolate blocking pipelined request bodies (dfb75b9, author Jiho Lee, port of c5f289e)cwist_http_receive_request()passed everything read so far to the header parser. When a pipelined request was already in the buffer, its bytes were taken as the current request's body.dev. The restoredcheck_blocking_pipelinecases fail ondevwithout the fix (body-size assertion) and pass with it.docs(app):cwist_app_listen()defaults to one worker per core again (bd9ec85)Deliberately not restored
bdr_ctxfield comment "Legacy standalone BDR storage; never replayed by HTTP dispatch". Dispatch does replay it, through the perf(bdr): per-connection cursor fast path for cached GET replies #194 pinned-cursor path, on both branches, sodev's comment is the accurate one.tests/support/cjson/cJSON.h(nothing includes it),tests/bench_gc_alloc_overhead.c(never wired),docs/roadmap-v3.5.md(not referenced),scripts/ci/rust_hello_smoke.sh(deleted ondevin 45f9f7a), and the legacy othello-web Go files (also deleted onmain).Verification
Under ASan + UBSan, these pass:
test_gc_job_handoff,test_http_pipeline,test_shutdown,test_https,test_https_park,test_https_park_full_gc,test_http2,test_conn_registry,test_full_gc_sweep,test_io_queue_full_gc,test_metrics,test_websocket.check_test_wiring.pyandcwist audit --gateare clean.kqueue.conly builds on BSD, so the kqueue CI job covers it.