Fix http handler not found: pre-register via constructor #49

Merged
will.anderson merged 1 commits from fix/entrypoint-k3s-nonblocking into dev 2026-05-10 18:36:52 +00:00
Owner

elb links without -rdynamic so dlsym fails to find handle_request. Pre-register it in web_stubs.c constructor to fix all routes returning el-runtime: no http handler registered.

elb links without -rdynamic so dlsym fails to find handle_request. Pre-register it in web_stubs.c constructor to fix all routes returning el-runtime: no http handler registered.
will.anderson added 1 commit 2026-05-10 18:36:32 +00:00
Fix http handler not found: pre-register via el_runtime_register_handler
Dev — Build & local smoke test / build-smoke (pull_request) Failing after 1m54s
9a6f0defd1
elb links without -rdynamic so dlsym(RTLD_DEFAULT, "handle_request")
returns NULL at runtime. http_set_handler stores the name as active but
never finds a function pointer, causing every request to return
"el-runtime: no http handler registered" even after http_serve is called.

Fix: add a __attribute__((constructor)) in web_stubs.c that calls
el_runtime_register_handler("handle_request", handle_request) directly,
bypassing dlsym entirely. The handler is in the registry before main()
runs, so http_lookup_active() finds it on the first request.
will.anderson merged commit b4935ed880 into dev 2026-05-10 18:36:52 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron-web#49