Repository navigation
1.37.1
FreeUnit 1.37.1, 30 Oct 2026
This release fixes HTTP/1.1 parsing, response compression, WebSocket ordering, shared-memory queues and language-module failures. It adds optional PCRE2 JIT and USDT probes, waits for state storage before answering control API changes, improves reproducible builds, and updates Wasmtime to 48.0.7. Router and controller processes can use the inherited hard file-descriptor limit without raising application limits.
New
./configure --regex-jitadds optional PCRE2 JIT for configuration regexes, not PHP OPcache JIT. It requires the PCRE2 backend and is off by default. Unsupported JIT compilation falls back to the interpreter; JIT stack exhaustion retries once with the remaining callout budget. See PCRE2 JIT details and limitations../configure --usdtadds optional static probes under thefreeunitprovider for requests, port messages, application queues and process starts. It is off by default and the build needssys/sdt.h. See the USDT probe reference and tracing scripts.- Lost access-log records are counted in
GET /status; the next written record reports#freeunit: lost N record(s)instead of losing records silently.
Changes
- Wasmtime, wasmtime-wasi and wasmtime-wasi-http move to 48.0.7, including the contrib C API pin, with Cranelift 0.135.7. unitctl updates rustls-webpki to 0.103.16 and webpki-roots to 1.0.10 for the RustSec advisories listed in CHANGES. The pinned C API source lock still has documented audit exceptions; this is not a claim that every vendored dependency is advisory-free.
- A configuration
PUTis answered only after the state-store child writes and flushes it. Certificate and njs-moduleDELETEoperations likewise wait for storage; failed deletes return 500 and keep the entry listed. A configuration-store failure returns 500 while the new configuration continues running; a restart loads the previously stored configuration. - Router and controller processes raise their soft
RLIMIT_NOFILEtoward the inherited hard limit, with a target cap of 1048576; an already higher soft limit is preserved. Application processes retain the limit with which unitd started. Raising a kernel ceiling alone does not change an existing process's hard limit. - With
SOURCE_DATE_EPOCHset, the reproducible-build changes remove build paths, host names, kernel release and timestamps from the affected binaries, libraries and packages. --otelno longer requires or links OpenSSL merely to build telemetry. Inbound trace context is retained when headers arrive across multiple reads; this change does not add TLS to the OTLP exporter.- Small application responses use fewer IPC messages. Static-file, header-processing, PHP and memory-pool changes reduce repeated work; their benefit depends on the workload and platform.
- Client-caused TLS handshake failures are logged at
inforather thanalert. Text access-log escaping does less work without changing its output; a failing access-logifexpression no longer writes a record. tools/unitcandtools/setup-unitrun with POSIX/bin/sh. unitc now reports HTTP and response-formatting failures through its exit status, and temporary configuration files use restrictive permissions.- Docker images are configured with
--hardening=default. PHP images disablesession.upload_progress.enabledthrough an ini fragment, and the release workflow checks the built PHP images before publishing their final and floating tags. This is targeted hardening, not a guarantee that the images have no outstanding vulnerabilities.
Fixes
- HTTP/1.1 pipelining after file-backed or chunked bodies, chunk boundaries split across reads, synthesized Content-Length handling, DEL-byte header validation, and retained chunked-body buffers.
- Corrupt or endless compressed application responses, compressed HEAD metadata, zero-length and short responses, stream trailers and large static-file handling. zstd now flushes each response part so streaming output does not wait for a full block.
- Application queue notifications and wakeups, shared-memory buffer ordering and cleanup, and a request-slot counter wrap that could eventually stop an application serving requests. WebSocket frames retain their order while waiting for shared memory, and a full application queue applies backpressure instead of immediately closing the connection.
- Router startup and shutdown races, IPC messages left queued without a writable-event wakeup, descriptor inheritance across exec, and truncated ancillary-message descriptor leaks on affected older glibc systems.
- Shared-memory segments rounded up to 16 KiB pages on macOS, 32-bit
off_tlayout mismatches, integer-width errors in compression settings, and unchecked allocation-size sums. Configuration validation now rejects out-of-range sizes, timeouts and compression levels instead of truncating them. - Duplicate request headers, including Cookie joining with
;, across libunit and language modules. PHP script working directories, script-open errors and request content-type state are corrected; Python, ASGI, Perl, Ruby, Java, Go, Node.js and Wasm fixes are detailed in CHANGES. - Stored state-version files with trailing whitespace, cgroup v2 mount discovery, router crashes while completing stale request buffers, and shared-counter data races.
Removed
- The end-of-life Node.js 20 Docker image (
node-20) is no longer built. - The core
wasmmodule's Wasmtime C API build no longer includes the unused component-model API. This does not remove the separatewasm-wasi-componentmodule.
Upgrade Notes
- Rebuild Go and Node.js applications against the new libunit to receive the applicable queue and IPC fixes; replacing unitd alone does not update a separately linked application.
- A program other than FreeUnit that links the packaged
libwasmtime.soand calls the removed component-model C API will no longer load. The separatewasm-wasi-componentmodule is unaffected. --zstdnow requires zstd 1.4.0 or later. Configure also requires working__threadsupport rather than silently falling back to pthread keys.- Review stored configurations with negative or out-of-range size, timeout or compression options. Compatibility handling differs by option and platform: some old values load with a warning, while some invalid 32-bit values prevent the stored configuration from loading. Consult CHANGES before upgrading such a configuration.
- The shared-queue acknowledgment fix has a documented limit: with an application request timeout of 0, some worker-death or reply-port failure cases can still leave a request waiting. See #665 and CHANGES for the exact cases.
- Docker hardening restores compiler flags for language modules, but unitd itself still undefines
_FORTIFY_SOURCE. The PHP image settings and checks do not replace reviewing the remaining gaps in pkg/community/PHP.CVE.md.
Full details in CHANGES. The following PR list is retained from GitHub's generated notes; the contributor acknowledgments also cover direct commits between the release tags.
What's Changed
- build(deps): Bump the minor-and-patch group across 7 directories with 21 updates by @dependabot[bot] in #568
- ci: keep the otel crates out of the Dependabot minor-and-patch group by @andypost in #570
- build(deps): Bump the otel group across 2 directories with 5 updates by @dependabot[bot] in #571
- changelog: open the 1.37.1 section by @andypost in #574
- otel: stop requiring and linking OpenSSL by @andypost in #575
- wasm: refuse a handler export that is not a function, and trap a request import before the first request by @andypost in #562
- controller: ignore a line end in the state version file by @andypost in #587
- http: consume chunk data that ends at the end of a read by @andypost in #590
- controller: parse the version file with nxt_str_strip() by @andypost in #591
- port: do not re-arm an active read event after each drain by @andypost in #592
- tests: wait for the listener in the version file test by @andypost in #593
- otel: disable the OTLP exporter retries that opentelemetry-otlp 0.33 enabled by @andypost in #577
- http: count large header buffers in a size_t by @andypost in #584
- port: accept a shm segment larger than PORT_MMAP_SIZE by @andypost in #598
- ci: build and run the C tests on macOS by @andypost in #602
- ci: stop false failures of the test-hook gate by @andypost in #585
- test: count the shm mappings on macOS in the unit msg test by @andypost in #603
- otel: keep the inbound traceparent when the header arrives in parts by @andypost in #600
- unit: inline the backoff sleep into nxt_unit_run_shared() by @andypost in #610
- http: inline the coded-response check into nxt_http_comp_check_acceptable() by @andypost in #612
- http: inline the lead-byte length into nxt_h1p_ws_utf8_begin() by @andypost in #608
- port: inline the enqueue check into nxt_port_socket_write2() by @andypost in #609
- http: inline the identity check into nxt_http_comp_select_compressor() by @andypost in #606
- http: inline the value check into nxt_http_set_headers_value() by @andypost in #607
- php: inline the two path trims into nxt_php_set_target() by @andypost in #605
- build(deps): bump wit-bindgen-rt, wasi, base64 and rand by @andypost in #599
- tests: check the working directory of a PHP root target by @andypost in #601
- app: refuse a "shm" limit over 4294967295 by @andypost in #589
- tests: build the test programs on 32-bit targets by @andypost in #579
- tests: fix the Alpine riscv64, loongarch64 and ppc64le test failures by @andypost in #580
- tests: move the wasm guest memory on every grow and check the base re-read by @andypost in #563
- http: read the identity token once in nxt_http_comp_select_compressor() by @andypost in #614
- php: set the working directory on every request of a script target by @andypost in #604
- php: remove the chdir() hook, the per-request chdir makes it unnecessary by @andypost in #616
- chore: post-release housekeeping after 1.37.0 by @andypost in #588
- conf: bound the mapped integers and the timeouts by @andypost in #620
- ci: build OpenSSL 3.5 LTS in place of 3.6 by @andypost in #613
- ci: test gcc 16, clang 23 and the RHEL 8 floor in containers by @andypost in #621
- static: keep the Last-Modified and ETag strings per thread by @andypost in #629
- http: do the set_headers and Accept-Encoding work once, not per request by @andypost in #630
- php: intern the fixed $_SERVER names and presize the array by @andypost in #631
- http: fix the 32-bit gcc build of the proxy body length check by @andypost in #582
- app: refuse a negative "shm" limit by @andypost in #618
- conf: require "pass" or "application" in a listener by @andypost in #634
- ci: bound apt and pytest steps by time by @andypost in #627
- ci(distros): run build/tests in the weekly Fedora and Alpine jobs by @andypost in #628
- otel: stop allocating the constant attributes and the traceparent by @andypost in #615
- main: answer a refused WHOAMI so that the worker exits by @andypost in #635
- otel: read an atomic flag in nxt_otel_rs_is_init() by @andypost in #623
- ci: pin ubuntu-26.04 and cut wasted runs by @andypost in #611
- ci: assert the compiler and OpenSSL versions in hardening-strict-fedora by @andypost in #636
- libunit: keep websocket frames in order across a wait for a segment by @andypost in #573
- http: map the compressor options with the width of their fields by @andypost in #581
- mp, buf: refuse a size whose header sum does not fit in size_t by @andypost in #583
- test: take the suite off a fixed *:8080 by @andypost in #406
- conf: state the SIZE_MAX result of nxt_conf_json_length() in nxt_conf.h by @andypost in #649
- ci: add the ast-grep baseline and require-tests gates by @andypost in #449
- ci: pin the expected OpenSSL major for the fedora:45 container by @andypost in #642
- ci: run fewer jobs on pull requests by @andypost in #643
- ci(deb): bound the apt steps of the debian:trixie jobs by @andypost in #637
- tests: make a stuck websocket test fail instead of hang by @andypost in #641
- ci: check the layout of the shared-memory structs by @andypost in #450
- libunit: shrink the buffers read while waiting for SHM_ACK by @andypost in #645
- lib: write the cgroup CPU limit record to unit.log, and test the cgroup walk by @andypost in #576
- tls: log handshake errors caused by the client at info by @andypost in #639
- libunit: free the waiting read buffers of a context by @andypost in #661
- ci: re-point the old-style ghcr latest tags on release by @andypost in #648
- build: set _FILE_OFFSET_BITS=64 for each source file on Linux by @andypost in #660
- test: name the descriptor kinds a leak assert found by @andypost in #622
- changes: add the docs/changes.xml record of the 32-bit off_t fix by @andypost in #675
- wasmtime: build the C API without the component model by @andypost in #558
- changes: give the 1.37.1 changes.xml records the CHANGES text by @andypost in #678
- tls: log a TLS 1.3 resumption binder failure at info by @andypost in #677
- tls: log a missing supported_groups extension at info by @andypost in #681
- websocket: wait for room in a full application queue by @andypost in #676
- tests: cover the alert-range default in nxt_openssl_log_error_level() by @andypost in #646
- conf: refuse a compression "level" out of the range of an int by @andypost in #674
- tests: pin the TLS alert info range boundaries by @andypost in #682
- test: take the descriptor count and kinds from one listing by @andypost in #673
- router: compress the body part sent with the response headers by @andypost in #670
- ci: run the hook gate in the ASan C-tests leg by @andypost in #685
- libunit: send the response of a request through the port queue again by @andypost in #638
- port: arm the write event when an inline send queues the rest by @andypost in #683
- build: set _FILE_OFFSET_BITS=64 on Solaris, HP-UX and QNX too by @andypost in #664
- router: publish the engine port before the engine thread starts by @andypost in #671
- access log: close the request when its record fails by @andypost in #690
- changes: give two 1.37.1 changes.xml records the CHANGES text by @andypost in #691
- feat: add USDT probes behind --usdt by @andypost in #451
- http: log a websocket frame refused for want of a shared buffer by @andypost in #656
- lib: keep scanning mountinfo past unrelated cgroup2 mounts by @andypost in #659
- changes: add the 1.37.1 records of the compression and engine port fixes by @andypost in #695
- ci: cover both NXT_MMAP_TINY_CHUNK geometry arms in the layout check by @andypost in #694
- build(deps): Bump anthropics/claude-code-action from 1.0.241 to 1.0.244 by @dependabot[bot] in #651
- build(deps): Bump taiki-e/install-action from 2.87.24 to 2.87.26 by @dependabot[bot] in #652
- build(deps): Bump the minor-and-patch group across 4 directories with 3 updates by @dependabot[bot] in #653
- ci: sanitize the C core with both compilers, and pin the runtime leg's compiler by @andypost in #700
- http: name the shared memory failure a refused websocket frame meets by @andypost in #696
- php: check the script with access() instead of opening it first by @andypost in #706
- test: cut the sleeps in two python test files and fix the shard table by @andypost in #657
- php: preserve errno across the access() failure log by @andypost in #707
- controller: answer a configuration PUT after the store wrote it by @andypost in #698
- docker: configure the images with --hardening=default by @andypost in #775
- tools: compare the declarations of the public functions by @andypost in #732
- core: ignore a spurious signalfd read wakeup by @andypost in #776
- Remove two stray conflict markers from master by @andypost in #783
- build: say what to do when the __thread check fails by @andypost in #782
- tools: compare the declarations of the callback typedefs by @andypost in #784
- http: compress each new response part, not the whole output chain by @andypost in #785
- access log: do not log a request whose "if" could not be rendered by @andypost in #787
- test(route): cover the error and negated paths of the "match" "if" option by @andypost in #786
- var: test eight bytes at a time when escaping a log value by @andypost in #780
- tests: read the use_unless_zero round results with acquire loads by @andypost in #794
- var: simplify the eight-byte escape test and copy a clean line as it is by @andypost in #797
- access log: complete the write and count the loss (1.37.1) by @andypost in #791
- process: drop a non-last reference without rt->processes_mutex by @andypost in #799
- router: decide the shared-port doorbell in one write_mutex section by @andypost in #800
- core: drive the signalfd handler in the test by @andypost in #793
- zstd: flush each part of a compressed response (#788) by @andypost in #803
- core: drain signalfd in a non-blocking read loop by @andypost in #795
- fix(libunit): check NULL before oob reset in nxt_unit_read_buf_get by @andypost in #798
- test: cover the zstd many-chunks static path by @andypost in #806
- core: create and receive descriptors close-on-exec by @andypost in #809
- core: raise the soft RLIMIT_NOFILE in the router and controller by @andypost in #810
- test: drop the control-socket wait from the nofile test by @andypost in #817
- build(deps): Bump anthropics/claude-code-action from 1.0.248 to 1.0.255 by @dependabot[bot] in #812
- build(deps): Bump Swatinem/rust-cache from 2.9.2 to 2.9.3 by @dependabot[bot] in #811
- fix(deps): update wasmtime to 48.0.7 and the unitctl webpki crates by @andypost in #825
- build(deps): Bump the minor-and-patch group across 5 directories with 4 updates by @dependabot[bot] in #814
- build(deps): Bump taiki-e/install-action from 2.87.26 to 2.87.30 by @dependabot[bot] in #813
- docker: retire EOL node-20 image (unpatched CVE-2026-111497) by @andypost in #821
- fix(http): response compression Content-Length and stream end handling by @andypost in #818
- HTTP: fix chunked body pool leaks, file-body pipelining, chunked_transform hash, and 0x7F header validation by @andypost in #819
- fix(lang): language module and libunit bugs found in audit by @andypost in #820
- libunit, python, node: skip the duplicate scan, join Cookie with "; " by @andypost in #823
- test: cover the language module fixes from the audit by @andypost in #831
- HTTP: free chunked request body slices and batch their writes by @andypost in #830
- router: point the field indices at joined duplicate lines by @andypost in #824
- build(deps): Bump the otel group across 2 directories with 5 updates by @dependabot[bot] in #739
- main: gate NEW_PORT and REMOVE_PID like the router does by @andypost in #816
- perf: skip the case fold of equal bytes in case-insensitive compares by @andypost in #827
- docs(debian): fix install steps, add Ubuntu 24.04, bump PHP to 8.5.12 by @freeunitx in #808
- CI: support selective Docker variant rebuilds, provenance, and immutable tags by @andypost in #835
- changes: add the 1.37.1 records that the merged changes missed by @andypost in #772
- release: prepare 1.37.1 by @andypost in #836
Contributors
Thank you to the people credited as authors or committers in 1.37.0...1.37.1:
- @andypost (Andy Postnikov) for development, integration and release work throughout the cycle.
- @ndj888 for the Wasmtime and unitctl security dependency updates (commit).
- @phpclub (Alexandr Smirnov) for the Wasmtime audit-exception corrections, generated-changelog checks, PHP image hardening and release-image checks (commit, commit).
- @freeunitx for the Debian and Ubuntu installation documentation and PHP version update (#808).
Automation contributions are credited to @dependabot[bot] and @freeunit-agent[bot]. Some direct commits use Claude, OpenCode or Space Bunny Free as their author identity; these are agent/tool identities rather than additional verified human GitHub accounts.
AI-Assisted Contributions and Review
The tagged commit history also records these model credits in authorship and Co-Authored-By / Reviewed-by trailers (names and versions as recorded, with repeated harness/version spellings grouped):
- Claude Opus 4.6, 5 and 5.5; Claude Sonnet 5.5; Claude Fable 5.1; Claude Haiku 4.5 and 5.5.
- Codex / OpenAI Codex, including credits naming GPT-5, GPT-6 and GPT-6.1-Sol medium.
- DeepSeek / DeepSeek V4.1 Flash, including DSH credits; Grok Bot; Gemini 3.1 Pro and 3.8 Flash.
- CatJam, LongCat 2.5 Preview Free, Muse Spark 1.3, Space Bunny Free and
opencode/step-5-preview-free.
Recorded harnesses include Claude Code, Codex, OpenCode, DeepSeek Harness/DSH, Grok Bot/Temporal, Antigravity/agy, pi and Hermes Agent. Exact attribution and available harness versions remain in the commit history.
Full Changelog: 1.37.0...1.37.1