]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Refactor srv_pipe to use queue-based architecture with ID dispatch
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 13 Jan 2026 10:20:58 +0000 (10:20 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 13 Jan 2026 10:20:58 +0000 (10:20 +0000)
commit02ba29e93bd9f11f2dd316c69a108f22658dde0b
tree67b019d9d299e3e63a3da39e940a63a9263350c1
parent66db7f40b2f90e30213adf636d93fba2fc479b14
[Fix] Refactor srv_pipe to use queue-based architecture with ID dispatch

Replace per-request ev_io watchers with a single watcher using khash
for ID-based reply matching. This fixes potential deadlocks when multiple
commands are queued rapidly (e.g., during hyperscan compilation).

Changes:
- Add rspamd_srv_pipe_ctx with single watcher, send queue, and ID hash
- Make srv_pipe non-blocking on both ends with proper EAGAIN handling
- Add EAGAIN handling to main process write path
- Remove cache_dir from hs_loaded commands (available from config)
src/hs_helper.c
src/libserver/rspamd_control.c
src/libserver/rspamd_control.h
src/libserver/worker_util.c
src/lua/lua_worker.c