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

wasi/test-wasi failure to create link #39484

Closed
richardlau opened this issue Jul 22, 2021 · 1 comment
Closed

wasi/test-wasi failure to create link #39484

richardlau opened this issue Jul 22, 2021 · 1 comment
Labels
ibm i Issues and PRs related to the IBM i platform. test Issues and PRs related to the tests. wasi Issues and PRs related to the WebAssembly System Interface.

Comments

@richardlau
Copy link
Member

  • Test: wasi/test-wasi
  • Platform: IBM i
  • Console Output:
07:56:29     Assertion failed: 0 == link(OLD, NEW) (c/link.c: main: 13)
07:56:29     wasm://wasm/0001eae2:1
07:56:29     
07:56:29     
07:56:29     RuntimeError: unreachable
07:56:29         at <anonymous>:wasm-function[14]:0x4f4
07:56:29         at <anonymous>:wasm-function[31]:0x2e45
07:56:29         at <anonymous>:wasm-function[12]:0x3f4
07:56:29         at <anonymous>:wasm-function[11]:0x2b9
07:56:29         at WASI.start (node:wasi:127:7)
07:56:29         at /home/IOJS/build/workspace/node-test-commit-ibmi/nodes/ibmi73-ppc64/test/wasi/test-wasi.js:32:10
07:56:29     
07:56:29     node:assert:123
07:56:29       throw new AssertionError(obj);
07:56:29       ^
07:56:29     
07:56:29     AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
07:56:29     
07:56:29     1 !== 0
07:56:29     
07:56:29         at runWASI (/home/IOJS/build/workspace/node-test-commit-ibmi/nodes/ibmi73-ppc64/test/wasi/test-wasi.js:59:12)
07:56:29         at Object.<anonymous> (/home/IOJS/build/workspace/node-test-commit-ibmi/nodes/ibmi73-ppc64/test/wasi/test-wasi.js:81:3)
07:56:29         at Module._compile (node:internal/modules/cjs/loader:1101:14)
07:56:29         at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
07:56:29         at Module.load (node:internal/modules/cjs/loader:981:32)
07:56:29         at Function.Module._load (node:internal/modules/cjs/loader:822:12)
07:56:29         at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
07:56:29         at node:internal/main/run_main_module:17:47 {
07:56:29       generatedMessage: true,
07:56:29       code: 'ERR_ASSERTION',
07:56:29       actual: 1,
07:56:29       expected: 0,
07:56:29       operator: 'strictEqual'
07:56:29     }
07:56:29 not ok 3084 wasi/test-wasi
07:56:29   ---
07:56:29   duration_ms: 14.105
07:56:29   severity: fail
07:56:29   exitcode: 1
07:56:29   stack: |-
07:56:29     executing cant_dotdot
07:56:29     (node:2241933) ExperimentalWarning: WASI is an experimental feature. This feature could change at any time
07:56:29     (Use `node --trace-warnings ...` to show where the warning was created)
07:56:29     fd_prestat_get(3, 69720)
07:56:29     fd_prestat_dir_name(3, 131088, 9)
07:56:29     fd_prestat_get(4, 69720)
07:56:29     fd_prestat_dir_name(4, 131152, 5)
07:56:29     fd_prestat_get(5, 69720)
07:56:29     environ_sizes_get(69724, 69720)
07:56:29     environ_get(135760, 131168)
07:56:29     fd_fdstat_get(3, 69672)
07:56:29     path_open(3, 1, 1033, 14, 0, 264240830, 268435455, 0, 69668)
07:56:29     
07:56:29     executing exitcode
07:56:29     (node:2241941) ExperimentalWarning: WASI is an experimental feature. This feature could change at any time
07:56:29     (Use `node --trace-warnings ...` to show where the warning was created)
07:56:29     fd_prestat_get(3, 67080)
07:56:29     fd_prestat_dir_name(3, 131088, 9)
07:56:29     fd_prestat_get(4, 67080)
07:56:29     fd_prestat_dir_name(4, 131152, 5)
07:56:29     fd_prestat_get(5, 67080)
07:56:29     environ_sizes_get(67084, 67080)
07:56:29     environ_get(135760, 131168)
07:56:29     proc_exit(120)
07:56:29     
07:56:29     executing fd_prestat_get_refresh
07:56:29     (node:2241945) ExperimentalWarning: WASI is an experimental feature. This feature could change at any time
07:56:29     (Use `node --trace-warnings ...` to show where the warning was created)
07:56:29     fd_prestat_get(3, 67080)
07:56:29     fd_prestat_dir_name(3, 131088, 9)
07:56:29     fd_prestat_get(4, 67080)
07:56:29     fd_prestat_dir_name(4, 131152, 5)
07:56:29     fd_prestat_get(5, 67080)
07:56:29     environ_sizes_get(67084, 67080)
07:56:29     environ_get(135760, 131168)
07:56:29     fd_fdstat_get(1, 67048)
07:56:29     fd_fdstat_get(1, 67048)
07:56:29     
07:56:29     executing freopen
07:56:29     (node:2241948) ExperimentalWarning: WASI is an experimental feature. This feature could change at any time
07:56:29     (Use `node --trace-warnings ...` to show where the warning was created)
07:56:29     fd_prestat_get(3, 70920)
07:56:29     fd_prestat_dir_name(3, 131088, 9)
07:56:29     fd_prestat_get(4, 70920)
07:56:29     fd_prestat_dir_name(4, 131152, 5)
07:56:29     fd_prestat_get(5, 70920)
07:56:29     environ_sizes_get(70924, 70920)
07:56:29     environ_get(135760, 131168)
07:56:29     fd_fdstat_get(3, 70856)
07:56:29     path_open(3, 1, 1033, 9, 0, 264240830, 268435455, 0, 70852)
07:56:29     fd_fdstat_get(3, 70840)
07:56:29     path_open(3, 1, 1089, 10, 0, 264240830, 268435455, 0, 70836)
07:56:29     fd_renumber(6, 5)
07:56:29     fd_read(5, 70856, 1, 70852)
07:56:29     fd_fdstat_get(1, 70856)
07:56:29     fd_write(1, 70864, 2, 70860)
07:56:29     fd_read(5, 70856, 1, 70852)
07:56:29     
07:56:29     executing ftruncate
07:56:29     (node:2241954) ExperimentalWarning: WASI is an experimental feature. This feature could change at any time
07:56:29     (Use `node --trace-warnings ...` to show where the warning was created)
07:56:29     fd_prestat_get(3, 69928)
07:56:29     fd_prestat_dir_name(3, 131088, 9)
07:56:29     fd_prestat_get(4, 69928)
07:56:29     fd_prestat_dir_name(4, 131152, 5)
07:56:29     fd_prestat_get(5, 69928)
07:56:29     environ_sizes_get(69932, 69928)
07:56:29     environ_get(135760, 131168)
07:56:29     path_create_directory(4, 1029, 7)
07:56:29     fd_fdstat_get(4, 69624)
07:56:29     path_open(4, 1, 1090, 18, 1, 268419069, 268435455, 0, 69620)
07:56:29     fd_filestat_get(5, 69568)
07:56:29     fd_tell(5, 69656)
07:56:29     fd_filestat_set_size(5, 500)
07:56:29     fd_filestat_get(5, 69568)
07:56:29     fd_tell(5, 69656)
07:56:29     fd_filestat_set_size(5, 300)
07:56:29     fd_filestat_get(5, 69568)
07:56:29     fd_tell(5, 69656)
07:56:29     fd_close(5)
07:56:29     
07:56:29     executing getentropy
07:56:29     (node:2241965) ExperimentalWarning: WASI is an experimental feature. This feature could change at any time
07:56:29     (Use `node --trace-warnings ...` to show where the warning was created)
07:56:29     fd_prestat_get(3, 69656)
07:56:29     fd_prestat_dir_name(3, 131088, 9)
07:56:29     fd_prestat_get(4, 69656)
07:56:29     fd_prestat_dir_name(4, 131152, 5)
07:56:29     fd_prestat_get(5, 69656)
07:56:29     environ_sizes_get(69660, 69656)
07:56:29     environ_get(135760, 131168)
07:56:29     random_get(69392, 256)
07:56:29     
07:56:29     executing gettimeofday
07:56:29     (node:2241975) ExperimentalWarning: WASI is an experimental feature. This feature could change at any time
07:56:29     (Use `node --trace-warnings ...` to show where the warning was created)
07:56:29     fd_prestat_get(3, 69688)
07:56:29     fd_prestat_dir_name(3, 131088, 9)
07:56:29     fd_prestat_get(4, 69688)
07:56:29     fd_prestat_dir_name(4, 131152, 5)
07:56:29     fd_prestat_get(5, 69688)
07:56:29     environ_sizes_get(69692, 69688)
07:56:29     environ_get(135760, 131168)
07:56:29     clock_time_get(0, 1000, 69592)
07:56:29     clock_time_get(0, 1000, 69592)
07:56:29     
07:56:29     executing link
07:56:29     (node:2241987) ExperimentalWarning: WASI is an experimental feature. This feature could change at any time
07:56:29     (Use `node --trace-warnings ...` to show where the warning was created)
07:56:29     fd_prestat_get(3, 69816)
07:56:29     fd_prestat_dir_name(3, 131088, 9)
07:56:29     fd_prestat_get(4, 69816)
07:56:29     fd_prestat_dir_name(4, 131152, 5)
07:56:29     fd_prestat_get(5, 69816)
07:56:29     environ_sizes_get(69820, 69816)
07:56:29     environ_get(135760, 131168)
07:56:29     path_filestat_get(3, 1033, 9)
07:56:29     path_link(3, 0, 1033, 9, 4, 1086, 10)
07:56:29     fd_write(2, 69264, 2, 69260)
07:56:29     Assertion failed: 0 == link(OLD, NEW) (c/link.c: main: 13)
07:56:29     wasm://wasm/0001eae2:1
07:56:29     
07:56:29     
07:56:29     RuntimeError: unreachable
07:56:29         at <anonymous>:wasm-function[14]:0x4f4
07:56:29         at <anonymous>:wasm-function[31]:0x2e45
07:56:29         at <anonymous>:wasm-function[12]:0x3f4
07:56:29         at <anonymous>:wasm-function[11]:0x2b9
07:56:29         at WASI.start (node:wasi:127:7)
07:56:29         at /home/IOJS/build/workspace/node-test-commit-ibmi/nodes/ibmi73-ppc64/test/wasi/test-wasi.js:32:10
07:56:29     
07:56:29     node:assert:123
07:56:29       throw new AssertionError(obj);
07:56:29       ^
07:56:29     
07:56:29     AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
07:56:29     
07:56:29     1 !== 0
07:56:29     
07:56:29         at runWASI (/home/IOJS/build/workspace/node-test-commit-ibmi/nodes/ibmi73-ppc64/test/wasi/test-wasi.js:59:12)
07:56:29         at Object.<anonymous> (/home/IOJS/build/workspace/node-test-commit-ibmi/nodes/ibmi73-ppc64/test/wasi/test-wasi.js:81:3)
07:56:29         at Module._compile (node:internal/modules/cjs/loader:1101:14)
07:56:29         at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
07:56:29         at Module.load (node:internal/modules/cjs/loader:981:32)
07:56:29         at Function.Module._load (node:internal/modules/cjs/loader:822:12)
07:56:29         at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
07:56:29         at node:internal/main/run_main_module:17:47 {
07:56:29       generatedMessage: true,
07:56:29       code: 'ERR_ASSERTION',
07:56:29       actual: 1,
07:56:29       expected: 0,
07:56:29       operator: 'strictEqual'
07:56:29     }
07:56:29   ...
@richardlau richardlau added test Issues and PRs related to the tests. wasi Issues and PRs related to the WebAssembly System Interface. ibm i Issues and PRs related to the IBM i platform. labels Jul 22, 2021
@richardlau
Copy link
Member Author

Seeing this consistently on the updated IBM i machines after nodejs/build#2638 and it looks like it's because we're running with the directory set as NODE_TEST_DIR on a different device to the test fixtures directory. I can reproduce this running on a local Linux system:

$ NODE_TEST_DIR=/tmp/rlau tools/test.py wasi

PR incoming.

targos pushed a commit that referenced this issue Jul 26, 2021
The WASI link test attempts to create a link in the temporary directory
to a file in the fixtures directory and can fail if those directories
are on different devices. Update the test so that both the source and
target of the link reside on the same device.

PR-URL: #39485
Fixes: #39484
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau added a commit that referenced this issue Jul 29, 2021
The WASI link test attempts to create a link in the temporary directory
to a file in the fixtures directory and can fail if those directories
are on different devices. Update the test so that both the source and
target of the link reside on the same device.

PR-URL: #39485
Fixes: #39484
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BethGriggs pushed a commit that referenced this issue Jul 29, 2021
The WASI link test attempts to create a link in the temporary directory
to a file in the fixtures directory and can fail if those directories
are on different devices. Update the test so that both the source and
target of the link reside on the same device.

PR-URL: #39485
Fixes: #39484
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BethGriggs pushed a commit that referenced this issue Jul 29, 2021
The WASI link test attempts to create a link in the temporary directory
to a file in the fixtures directory and can fail if those directories
are on different devices. Update the test so that both the source and
target of the link reside on the same device.

PR-URL: #39485
Fixes: #39484
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this issue Sep 4, 2021
The WASI link test attempts to create a link in the temporary directory
to a file in the fixtures directory and can fail if those directories
are on different devices. Update the test so that both the source and
target of the link reside on the same device.

PR-URL: #39485
Fixes: #39484
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ibm i Issues and PRs related to the IBM i platform. test Issues and PRs related to the tests. wasi Issues and PRs related to the WebAssembly System Interface.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant