GithubHelp home page GithubHelp logo

Comments (6)

losfair avatar losfair commented on May 27, 2024 2

Ran the test with V8. Looks like V8 is currently the most correct engine on AArch64:

Test Summary Report
-------------------
t/03-proxy_wasm/130-proxy_dispatch_http_call.t        (Wstat: 0 Tests: 121 Failed: 5)
  Failed tests:  1-4, 121
  Parse errors: Bad plan.  You planned 120 tests but ran 121.
Files=39, Tests=1633, 101 wallclock secs ( 0.23 usr  0.09 sys +  9.72 cusr  5.06 csys = 15.10 CPU)
Result: FAIL

(this failure seems to be caused by my devbox not having IPv6 - which is expected)

from ngx_wasm_module.

thibaultcha avatar thibaultcha commented on May 27, 2024

Let's investigate then. I suggest running the tests with verbose mode (https://metacpan.org/pod/Test::Nginx::Socket#TEST_NGINX_VERBOSE), and investigating potential core dumps.

from ngx_wasm_module.

thibaultcha avatar thibaultcha commented on May 27, 2024

Also I am unsure of the current state of support for M1 & arm64 in wasmtime/wasmer.

from ngx_wasm_module.

losfair avatar losfair commented on May 27, 2024

This failure on wasmtime:

#   Failed test 't/02-http/001-wasm_call_directive.t TEST 11: wasm_call directive - catch runtime error sanity - status code ok'
#   at /home/zhy/Code/ngx_wasm_module/work/downloads/cpanm/lib/perl5/Test/Nginx/Socket.pm line 940.
#          got: ''
#     expected: '500'

seems to be caused by a missing trap on unsigned integer division. AArch64 native udiv instruction does not trap, so cranelift needs to handle that.

(module
    (func (export "div0")
        i32.const 0
        i32.const 0
        i32.div_u
        drop)
)

from ngx_wasm_module.

losfair avatar losfair commented on May 27, 2024

connect_timeout isn't working EDIT: not caused by timeout handling - looks like the worker crashed during entry into the http response callback.

#   Failed test 'ERROR: client socket timed out - t/03-proxy_wasm/131-proxy_http_dispatch_timeouts.t TEST 1: proxy_wasm - dispatch_http_call() connection timeout
# '
#   at /home/zhy/Code/ngx_wasm_module/work/downloads/cpanm/lib/perl5/Test/Nginx/Socket.pm line 2210.
!!! resp: [] at /home/zhy/Code/ngx_wasm_module/work/downloads/cpanm/lib/perl5/Test/Nginx/Socket.pm line 743.
parse response

#   Failed test 't/03-proxy_wasm/131-proxy_http_dispatch_timeouts.t TEST 1: proxy_wasm - dispatch_http_call() connection timeout - status code ok'
#   at /home/zhy/Code/ngx_wasm_module/work/downloads/cpanm/lib/perl5/Test/Nginx/Socket.pm line 940.
#          got: ''
#     expected: '500'

#   Failed test 't/03-proxy_wasm/131-proxy_http_dispatch_timeouts.t TEST 1: proxy_wasm - dispatch_http_call() connection timeout - response_body_like - response is expected ()'
#   at /home/zhy/Code/ngx_wasm_module/work/downloads/cpanm/lib/perl5/Test/Nginx/Socket.pm line 1710.
#                   ''
#     doesn't match '(?^s:500 Internal Server Error)'
Testing stap...

#   Failed test 't/03-proxy_wasm/131-proxy_http_dispatch_timeouts.t TEST 1: proxy_wasm - dispatch_http_call() connection timeout - pattern "(?^:\[error\] .*? \[wasm\] dispatch failed \(tcp socket - timed out connecting to \".*?"\))" should match a line in error.log (req 0)'
#   at /home/zhy/Code/ngx_wasm_module/work/downloads/cpanm/lib/perl5/Test/Nginx/Socket.pm line 1288.

from ngx_wasm_module.

hishamhm avatar hishamhm commented on May 27, 2024

As a heads-up: I haven't tested V8 support (coming soon via #85) on anything non-x86, but I have made V8_PLATFORM into an environment variable to pick the build target that will be honored by make setup. It uses V8's platform nomenclature, so that means x64 for x86_64 (the default), or arm64 for arm64.

I haven't tested it though, so there might be additional hurdles (see https://v8.dev/docs/compile-arm64 and https://blog.sqreen.com/how-we-built-v8-natively-on-arm/) — if you find any extra tweaks needed to support WasmX with V8 on arm64, those would be welcome additions to util/runtimes/v8.sh!

from ngx_wasm_module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.