Skip to content

fix: add timeout to WASM plugin verification to prevent indefinite blocking#147

Open
mmatur wants to merge 2 commits intotraefik:masterfrom
mmatur:fix/wasm-timeout
Open

fix: add timeout to WASM plugin verification to prevent indefinite blocking#147
mmatur wants to merge 2 commits intotraefik:masterfrom
mmatur:fix/wasm-timeout

Conversation

@mmatur
Copy link
Copy Markdown
Member

@mmatur mmatur commented Apr 10, 2026

Summary

  • Add a runWithTimeout helper that wraps any function with a hard timeout via goroutine + select, since wazero does not respect
    context.Context deadlines during module instantiation
  • Wrap checkWasmMiddleware with a 10s timeout (aligned with the existing Yaegi verification timeout), preventing piceus from hanging
    indefinitely when a WASM plugin makes blocking network calls during initialization
  • Pass context.Context into checkWasmMiddleware for future-proofing, even though wazero currently ignores it

Fixes #146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove jannschu/maintenance-response from blacklist

1 participant