Commit graph

16 commits

Author SHA1 Message Date
trvon
f8fce1db18
fix(daemon): destroy the SocketServer only after its handlers are gone
YamsDaemon::stop() stopped the SocketServer and destroyed it while the
IOCoordinator threads were still running, and only then stopped and
destroyed the IOCoordinator. SocketServer::stop() waits at most ~2s for
connections to drain, and the handle_connection coroutine frames keep a
raw pointer to the server in their cleanup guard. A connection that
outlived the drain window either resumed on an I/O thread after the
server was freed, or had its frame destroyed together with the
io_context, and both paths decremented the connection counters of the
freed SocketServer (ASAN heap-use-after-free in CleanupGuard). The
ServiceManager-init failure path stopped the server the same way and
left the I/O threads running.

Tear the IPC layer down in one place, teardownSocketServer(): stop the
server (which still releases its acceptors and accept strand while the
io_context runs), stop and join the I/O threads so no handler can
resume, destroy the IOCoordinator so the io_context destroys the pending
handler frames while the server is valid, and only then destroy the
server. All daemon stop and startup-failure paths use it.

The unit test stops the io_context under the connection handlers so
they are deterministically pending when the teardown runs; the daemon
integration test parks the I/O threads past the drain window.

Signed-off-by: trvon <me@trevon.dev>
2026-09-27 20:11:43 -06:00
trvon
9c9e19199e
refactor(test): consolidate daemon harness 2026-08-05 20:53:18 -04:00
trvon
df0c78cf29
feat: test fixes, metric expansion, build improvements for gliner 2026-04-23 08:48:33 -04:00
trvon
985d03abdd
fix: test improvements and correctness improvements using check-quality script 2026-03-18 15:55:43 -04:00
trvon
4fe9ce6120
fix: bug fixes and test improvements for small correctness issues 2026-03-18 15:16:42 -04:00
trvon
be77f1f4d3
feat: additional test improvements, improved logic for ingestion queue to increase throughput and client stability 2026-02-16 18:13:54 -05:00
trvon
33821d93f1
feat: test hardening, added benchmark for multiclient and improve stability to support up to 16 clients before performance degrades, improved parallization and request handling in daemon ingestion pipeline 2026-02-16 15:46:16 -05:00
trvon
c4ae922b7a
feat: mobile bindings expansion, update mcp for graph operations and download tool hardening 2026-02-15 17:50:14 -05:00
trvon
36c587e776
bug fixes and test improvements 2026-01-24 11:49:48 -05:00
trvon
c16939f482
linter 2025-11-28 20:30:41 -05:00
trevon
1de9e31a58
cleaning up tests and exposing windows packaging and builds in ci 2025-11-27 10:54:09 -05:00
trevon
3b58ac1743
test stabilizations for windows. search metadata/tags improvements 2025-11-26 21:45:50 -05:00
trvon
70e88af608
running linter 2025-11-25 13:10:29 -05:00
trevon
244cf02822
windows build stable on dev machine 2025-11-23 23:22:30 -05:00
trvon
166d8c520d
staging v0.7.7 2025-11-01 16:02:12 -04:00
trvon
bbf23bb190
test migrations to catch2, service manager + socket server refactor for better startup performance. search bug fixes 2025-10-29 23:08:09 -04:00