Skip to content

Have an issue while importing jump functions in runtime(iwasm)  #3710

Open
@subhakr

Description

@subhakr

Subject of the issue

i am trying to integrate sysbench benchmark with wasm.
its compiled successfully. but when i am running with WAMR i am getting jump function issues.
My doubt is how i am getting this error, like if i have issue with wasi-wsdk23 then it would show in compiler stage only but its not showed anything in compilation. while running that wasm module then only i am seeing these errors related to jump functions.

Test case

sysbench_with_setjmp_errors.zip

Use this wasm module to run sysbecnh.

Your environment

OS: ubuntu22.04LTS
CPU architectiure: x86_64
RAM and intrenal space: 8GB and 256GB
WAMR version:2.1.1
was-sdk:23 version(binaries)

Steps to reproduce

Just run the below command we can see the issue
/home/admin1/Documents/wasm-micro-runtime/product-mini/platforms/linux/build/iwasm --max-threads=64 src/sysbench_with_setjmp_errors cpu --threads=10 --cpu-max-prime=100000 run

Expected behavior

i am getting improt setjump and longjump issues like below
[14:03:18:942 - 7B717C342740]: warning: failed to link import function (env, __wasm_longjmp)
[14:03:18:942 - 7B717C342740]: warning: failed to link import function (env, saveSetjmp)
[14:03:18:942 - 7B717C342740]: warning: failed to link import function (env, getTempRet0)
[14:03:18:942 - 7B717C342740]: warning: failed to link import function (env, testSetjmp)

Actual behavior

It should not give any error like above it shoud run as below except errors

admin1@admin1-VivoBook-ASUSLaptop-X515EA-P1511CEA:~/sysbench_main$ /home/admin1/Documents/wasm-micro-runtime/product-mini/platforms/linux/build/iwasm --max-threads=64 src/sysbench_with_setjmp_errors  cpu --threads=10 --cpu-max-prime=100000 run
[14:03:18:939 - 7B717C342740]: warning: failed to link import function (env, __wasm_longjmp)
[14:03:18:939 - 7B717C342740]: warning: failed to link import function (env, saveSetjmp)
[14:03:18:939 - 7B717C342740]: warning: failed to link import function (env, getTempRet0)
[14:03:18:939 - 7B717C342740]: warning: failed to link import function (env, testSetjmp)
Attempting to allocate 1064960 bytes of memory...
sysbench 1.1.0-2ca9e3f (using Lua Lua 5.3)

Running the test with following options:
Number of threads: 10
Initializing random number generator from current time


Prime numbers limit: 100000

Initializing worker threads...

[14:03:18:942 - 7B717C342740]: warning: failed to link import function (env, __wasm_longjmp)
[14:03:18:942 - 7B717C342740]: warning: failed to link import function (env, saveSetjmp)
[14:03:18:942 - 7B717C342740]: warning: failed to link import function (env, getTempRet0)
[14:03:18:942 - 7B717C342740]: warning: failed to link import function (env, testSetjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, __wasm_longjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, saveSetjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, getTempRet0)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, testSetjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, __wasm_longjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, saveSetjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, getTempRet0)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, testSetjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, __wasm_longjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, saveSetjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, getTempRet0)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, testSetjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, __wasm_longjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, saveSetjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, getTempRet0)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, testSetjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, __wasm_longjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, saveSetjmp)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, getTempRet0)
[14:03:18:943 - 7B717C342740]: warning: failed to link import function (env, testSetjmp)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, __wasm_longjmp)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, saveSetjmp)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, getTempRet0)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, testSetjmp)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, __wasm_longjmp)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, saveSetjmp)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, getTempRet0)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, testSetjmp)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, __wasm_longjmp)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, saveSetjmp)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, getTempRet0)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, testSetjmp)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, __wasm_longjmp)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, saveSetjmp)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, getTempRet0)
[14:03:18:944 - 7B717C342740]: warning: failed to link import function (env, testSetjmp)
Threads started!

CPU speed:
    events per second: 738436.49

Throughput:
    events/s (eps):                      738436.4869
    time elapsed:                        10.0004s
    total number of events:              7384686

Latency (ms):
         min:                                    0.00
         avg:                                    0.00
         max:                                    7.72
         95th percentile:                        0.00
         sum:                                29017.50

Threads fairness:
    events (avg/stddev):           738468.6000/20021.24
    execution time (avg/stddev):   2.9017/0.02

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions