Skip to content

unhandled WASI function #682

@acouvreur

Description

@acouvreur

See sablierapp/sablier#426 (comment) for reference.

Using the https://github.com/proxy-wasm/proxy-wasm-go-sdk, the created wasm file cannot be run using:

nginx/1.27.2 (wasmx prerelease-0.5.0 [vm: v8])

See the error logs:

Notice: roxy-1  | 2025/02/15 05:18:14 [notice] 1#1: using the "epoll" event method
Notice: roxy-1  | 2025/02/15 05:18:14 [notice] 1#1: nginx/1.27.2 (wasmx prerelease-0.5.0 [vm: v8])
Notice: roxy-1  | 2025/02/15 05:18:14 [notice] 1#1: built by clang 15.0.7
Notice: roxy-1  | 2025/02/15 05:18:14 [notice] 1#1: OS: Linux 6.8.0-1021-azure
Notice: roxy-1  | 2025/02/15 05:18:14 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
Notice: roxy-1  | 2025/02/15 05:18:14 [notice] 1#1: start worker processes
Notice: roxy-1  | 2025/02/15 05:18:14 [notice] 1#1: start worker process 10
Error: proxy-1  | 2025/02/15 05:18:15 [error] 10#10: [wasm] NYI - unhandled WASI function "sched_yield"
Error: proxy-1  | 2025/02/15 05:18:15 [error] 10#10: [wasm] NYI - unhandled WASI function "poll_oneoff"
Error: proxy-1  | 2025/02/15 05:18:15 [error] 10#10: [wasm] NYI - unhandled WASI function "fd_fdstat_set_flags"

(https://github.com/sablierapp/sablier/actions/runs/13342062988/job/37267987257?pr=521#step:8:485)

This is the built nginx docker image:

FROM ubuntu:25.04

RUN apt update && apt install -y libatomic1

ADD https://github.com/Kong/ngx_wasm_module/releases/download/prerelease-0.5.0/wasmx-prerelease-0.5.0-v8-x86_64-ubuntu22.04.tar.gz wasmx.tar.gz

RUN mkdir /etc/nginx
RUN tar -xvf wasmx.tar.gz
RUN mv /wasmx-prerelease-0.5.0-v8-x86_64-ubuntu22.04/* /etc/nginx/

WORKDIR /etc/nginx

CMD [ "./nginx", "-g", "daemon off;" ]

Am I using somehting wrong ?


According to @martijneken here, the missing hostcalls have been added to the CppHosts proxy-wasm/proxy-wasm-cpp-host#427.

I'm not even sure if you are using the proxy-wasm-cpp-host ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions