• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Kong / ngx_wasm_module / 9944578975
95%

Build:
DEFAULT BRANCH: main
Ran 15 Jul 2024 06:38PM UTC
Jobs 10
Files 49
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jul 2024 06:21PM UTC coverage: 91.277% (+0.003%) from 91.274%
9944578975

push

github

thibaultcha
fix(*) resolve a potential memleak in Lua bridge resolver

An occasional memory leak of Proxy-Wasm dispatch with Lua bridge
resolver, spotted by CI:

https://github.com/Kong/ngx_wasm_module/actions/runs/9884094484/job/27299927250

    ==19824== 224 bytes in 1 blocks are definitely lost in loss record 13 of 33
    ==19824==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==19824==    by 0x1E56AA: ngx_alloc (ngx_alloc.c:22)
    ==19824==    by 0x1CF926: ngx_resolver_alloc (ngx_resolver.c:4400)
    ==19824==    by 0x1CF926: ngx_resolver_calloc.isra.0 (ngx_resolver.c:4413)
    ==19824==    by 0x1D1EFD: ngx_resolve_start (ngx_resolver.c:661)
    ==19824==    by 0x392C80: ngx_wasm_socket_tcp_connect (ngx_wasm_socket_tcp.c:360)
    ==19824==    by 0x3BC984: ngx_http_proxy_wasm_dispatch_resume_handler (ngx_http_proxy_wasm_dispatch.c:745)
    ==19824==    by 0x3BD4C3: ngx_http_proxy_wasm_dispatch_handler (ngx_http_proxy_wasm_dispatch.c:477)
    ==19824==    by 0x1DFBE9: ngx_event_process_posted (ngx_event_posted.c:35)
    ==19824==    by 0x1DF0E6: ngx_process_events_and_timers (ngx_event.c:273)
    ==19824==    by 0x1EE697: ngx_single_process_cycle (ngx_process_cycle.c:323)
    ==19824==    by 0x1A9078: main (nginx.c:384)

This was caused by having 2 parallel dispatch calls using
`pwm_lua_resolver` DNS resolution. When the first call responds and
produces a downstream response, it causes pending calls to be cancelled.

However when a cancelled call had not yet finished the Lua-bridge DNS
resolution, its associated `rslv_ctx` was never freed.

This adds a "cancel" feature to Lua bridge threads, which is invoked by
TCP sockets when they are closed while having a pending Lua resolver
thread.

42 of 44 new or added lines in 4 files covered. (95.45%)

1 existing line in 1 file now uncovered.

8737 of 9572 relevant lines covered (91.28%)

81033.24 hits per line

Jobs
ID Job ID Ran Files Coverage
1 unit-openresty_1.25.3.1-wasmtime-no_ipc-ssl-debug-no_hup-dynamic - 9944578975.1 15 Jul 2024 06:44PM UTC 0
90.44
GitHub Action Run
2 unit-openresty_1.25.3.1-wasmtime-no_ipc-ssl-debug-no_hup-static - 9944578975.2 15 Jul 2024 06:44PM UTC 0
90.42
GitHub Action Run
3 unit-ngx_1.27.0-wasmtime-ipc-no_ssl-debug-no_hup-static - 9944578975.3 15 Jul 2024 06:44PM UTC 0
89.44
GitHub Action Run
4 unit-ngx_1.27.0-wasmer-no_ipc-ssl-debug-no_hup-static - 9944578975.4 15 Jul 2024 06:42PM UTC 0
89.86
GitHub Action Run
5 unit-ngx_1.27.0-wasmer-no_ipc-no_ssl-no_debug-no_hup-static - 9944578975.5 15 Jul 2024 06:38PM UTC 0
86.85
GitHub Action Run
6 unit-ngx_1.27.0-v8-no_ipc-ssl-debug-no_hup-static - 9944578975.6 15 Jul 2024 06:39PM UTC 0
90.18
GitHub Action Run
7 unit-ngx_1.27.0-wasmtime-no_ipc-ssl-debug-hup-static - 9944578975.7 15 Jul 2024 06:48PM UTC 0
88.66
GitHub Action Run
8 unit-ngx_1.27.0-wasmer-no_ipc-ssl-no_debug-no_hup-static - 9944578975.8 15 Jul 2024 06:38PM UTC 0
87.21
GitHub Action Run
9 unit-ngx_1.27.0-wasmtime-no_ipc-ssl-debug-hup-dynamic - 9944578975.9 15 Jul 2024 06:48PM UTC 0
88.68
GitHub Action Run
10 unit-ngx_1.21.6-wasmer-no_ipc-ssl-debug-no_hup-static - 9944578975.10 15 Jul 2024 06:42PM UTC 0
89.82
GitHub Action Run
Source Files on build 9944578975
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #9944578975
  • 507e3b47 on github
  • Prev Build on main (#9884094484)
  • Next Build on main (#10045009475)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc