Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: test-wamr-ide is not stable #3904

Open
lum1n0us opened this issue Nov 12, 2024 · 5 comments · Fixed by #3913
Open

CI: test-wamr-ide is not stable #3904

lum1n0us opened this issue Nov 12, 2024 · 5 comments · Fixed by #3913

Comments

@lum1n0us
Copy link
Collaborator

Last pass https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/11694609446/job/32568704604
First failure https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/11717281799/job/32636759641

Most like:

[3389:1107/054219.675503:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

  Unit Tests
    ✔ DebugConfigurationProvider init commands
    ✔ DebugConfigurationProvider resolve configuration
  Inegration Tests
[3389:1107/054221.18[69](https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/11717281799/job/32636759641#step:12:70)01:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[3389:1107/054222.303605:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    1) Rust formatters
  2 passing (8s)
  1 failing
  1) Inegration Tests
       Rust formatters:
     AssertionError: Could not connect to debug adapter
  	at Context.<anonymous> (out/test/suite/extension.test.js:140:31)
  	at Generator.throw (<anonymous>)
  	at rejected (out/test/suite/extension.test.js:10:65)

Error: 1 tests failed.
	at /home/runner/work/wasm-micro-runtime/wasm-micro-runtime/test-tools/wamr-ide/VSCode-Extension/out/test/suite/index.js:28:27
	at done (/home/runner/work/wasm-micro-runtime/wasm-micro-runtime/test-tools/wamr-ide/VSCode-Extension/node_modules/mocha/lib/mocha.js:1028:7)
Extension host test runner error Error: 1 tests failed.
	at /home/runner/work/wasm-micro-runtime/wasm-micro-runtime/test-tools/wamr-ide/VSCode-Extension/out/test/suite/index.js:28:27
	at done (/home/runner/work/wasm-micro-runtime/wasm-micro-runtime/test-tools/wamr-ide/VSCode-Extension/node_modules/mocha/lib/mocha.js:1028:7)
Asking native host service to exit with code 1.
``
@lum1n0us
Copy link
Collaborator Author

lum1n0us commented Nov 12, 2024

in test-tools/wamr-ide/VSCode-Extension/src/test/suite/extension.test.ts

test('Rust formatters', async function () {
    // ...
    try {
        await vscode.debug.startDebugging(undefined, config);
    } catch (e) {
        assert.fail('Could not connect to debug adapter');
    }
    // ...
}

@TianlongLiang
Copy link
Contributor

test('Rust formatters', async function () {
    // ...
    try {
        await vscode.debug.startDebugging(undefined, config);
    } catch (e) {
        assert.fail('Could not connect to debug adapter');
    }
    // ...
}

this error is due to the recent version of the rust toolchain, which will emit ref types opcodes in wasm file, need to enable this feature in the iwasm build.

I also find that the vector format checks fails recently:

      - (5) vec![{...}, {...}, {...}, {...}, {...}, ...]
      + (5) vec![1, 2, 3, 4, 12]

And previously deque failed the assertion too:

      -alloc::collections::vec_deque::VecDeque<int, alloc::alloc::Global> @ 0xfff3c
      + (5) VecDeque[1, 2, 3, 4, 5]

I disable those two checks for now. However, I think the ideal fix is to modify the rust.py to parse the current format correctly.

@TianlongLiang
Copy link
Contributor

I also take a look at what it's like in lldb(without import the rust.py formatted):

(lldb) frame variable vector
(alloc::vec::Vec<int, alloc::alloc::Global>) vector = {
  buf = {
    inner = {
      ptr = {
        pointer = (pointer = "\U00000001")
        _marker = {}
      }
      cap = (__0 = 8)
      alloc = {}
    }
    _marker = {}
  }
  len = 5
}

When I try to dereference it, it's all 0 instead of 1, 2, 3, 4, 5:

(lldb) frame variable vector.buf.inner.ptr.pointer
(core::ptr::non_null::NonNull<unsigned char>) vector.buf.inner.ptr.pointer = (pointer = "\U00000001")
(lldb) memory read --size 4 --format d --count 5 0x00000001
0x00000001: 0
0x00000005: 0
0x00000009: 0
0x0000000d: 0
0x00000011: 0

@lum1n0us
Copy link
Collaborator Author

#3913

@lum1n0us lum1n0us linked a pull request Nov 20, 2024 that will close this issue
@lum1n0us lum1n0us reopened this Nov 22, 2024
@lum1n0us
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants