]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] task: route all task sessions through single constructor
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 18 Apr 2026 10:40:29 +0000 (11:40 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 18 Apr 2026 10:40:29 +0000 (11:40 +0100)
commit05b9c2c39d7a2bb5431f20342f09b160baf0eec1
tree52ea6a83c22a111278954550040a362e96df9791
parent2cb560f86778369903aa6463081b9c860d7a9ce1
[Feature] task: route all task sessions through single constructor

Only worker.c and 1 of 8 controller.c task sessions had the item-name
resolver wired, so timeout logs for scans from other entry points
(check, learn, scan-lua, worker_util startup, proxy, lua.task_from_mime)
lost symbol context entirely: the summary said only "rspamd lua http=1"
with no hint of which rule stalled.

Introduce rspamd_task_create_session() that wraps session_create and
set_item_name_resolver, and switch all 11 task-scoped session creation
sites to use it. The two controller sites with cbdata user_data (stats,
metrics) stay on rspamd_session_create — they do not execute symcache.

While here, collapse rspamd_session_describe_pending into a single
line that folds symbol/label info into each group key, e.g.
"total=5; rspamd dns[RBL_FOO]=3, rspamd lua http[X]=1". Previously the
symbol detail was a separate line that was silently omitted whenever
the resolver was not wired — exactly the breakage this fixes.
src/controller.c
src/libserver/async_session.c
src/libserver/async_session.h
src/libserver/task.c
src/libserver/task.h
src/libserver/worker_util.c
src/lua/lua_util.c
src/rspamd_proxy.c
src/worker.c