Segmentation fault when instance traps after sending local response
- Dominant language
- C
- Stars
- 142
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
I believe there is a bug in the code where when you send a local response which overrides the action, and trap after it nginx will then segfault when trying to cleanup the request and the 503 response is not sent.
Probably issue here, I believe trapping should have higher priority then action
https://github.com/Kong/ngx_wasm_module/blob/main/src/common/proxy_wasm/ngx_proxy_wasm.c#L864-L890
Contributor guide
Research direction
Start in src/common/proxy_wasm/ngx_proxy_wasm.c at lines 864-890 and trace cleanup after a local response overrides the action, followed by a trap. Reproduce the request flow described in the issue and verify that cleanup no longer segfaults and that the 503 response is sent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, nginx, wasm
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100