dasHV: libhv bump and loop-thread fixes for the dasHV tsan races - #4157
Merged
Merged
Conversation
aleksisch
force-pushed
the
aleksisch/hv-bump
branch
3 times, most recently
from
September 28, 2026 09:17
98c9f24 to
9bfcebb
Compare
…/gmtime_r The logger_create tsan suppression goes with the race it covered. The tarball now extracts with fresh timestamps: kept archive dates are older than the previous pin's objects, so libhv's sub-build left 14 of 64 objects stale and linked a mixed libhv.a.
is_connected and is_writer_connected read an atomic the loop thread keeps from the open/close callbacks instead of libhv's io flags, and a client close runs on its loop, where libhv's own close callback writes the same state. The tsan suppressions for hv::WebSocketClient::close and the writer's hio_is_opened peek go; hio_is_opened stays for the send path, the same libhv write-without-lock as hio_write4.
…with the send The tick thread wrote ctx->response while libhv's loop thread still read it for the access log after the handler returned HTTP_STATUS_UNFINISHED. The handler now fills a copy taken on the loop thread, and the posted send assigns it back first, so the HttpHandler::onMessageComplete tsan suppression goes.
Two sweeps running tests/ at once (the serialize and daslang_static lanes of extended checks) opened the same tests/stbimage/_test_output* file, and one parsed it while the other truncated it.
aleksisch
force-pushed
the
aleksisch/hv-bump
branch
from
September 28, 2026 14:19
f6d534a to
0ff98b9
Compare
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.
Bumps libhv and fixes the dasHV-side tsan races, so four of the libhv tsan suppressions go.
303f50c, whose logger and date header uselocaltime_r/gmtime_r. The tarball now extracts with fresh timestamps: kept archive dates are older than the previous pin's objects, so an incremental build left part oflibhv.astale and linked a mixed library (heap corruption intests/dasHV).is_connected/is_writer_connectedread an atomic the loop thread keeps from the open/close callbacks, and a clientcloseruns on its loop.HTTP_STATUS_UNFINISHED) handler fills its own response copy; the posted send assigns it back.Suppressions removed:
logger_create,hv::WebSocketClient::close, the writer'shio_is_openedpeek,HttpHandler::onMessageComplete.hloop_stop,hio_write4andhio_is_opened(send path) are libhv's own races, fixed upstream in ithewei/libhv#888; they go with the next pin bump.Known gap: a client that pipelines a second request behind a deferred response still races on the request object libhv reuses.
Verified locally:
tests/dasHV143/143 (Release), tsan clean ontests/dasHV,tests/live_host,tests/stddlg/test_tray.das,tests/watchdog/test_watchdog.das.