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

Dash fixes and pthreads #3663

Merged
merged 70 commits into from
Mar 17, 2023
Merged

Dash fixes and pthreads #3663

merged 70 commits into from
Mar 17, 2023

Conversation

john-sharratt
Copy link
Contributor

This merge brings in support for pthreads using the WASI threads spec and fixes a number of issues with dash WASIX

@john-sharratt
Copy link
Contributor Author

Note the snapshot tests won't work until I regenerate them all - which I'll do now but be aware they are not backwards compatible

Copy link
Contributor

@theduke theduke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good to me, apart from some smaller requests and one larger issue (Errno).

lib/wasi/src/runtime/mod.rs Outdated Show resolved Hide resolved
lib/wasi/src/runtime/mod.rs Outdated Show resolved Hide resolved
lib/wasi/src/runtime/mod.rs Outdated Show resolved Hide resolved
lib/wasi-types/Cargo.toml Outdated Show resolved Hide resolved
lib/wasi/src/bin_factory/exec.rs Show resolved Hide resolved
@john-sharratt
Copy link
Contributor Author

john-sharratt commented Mar 9, 2023

Note the snapshot tests won't work until I regenerate them all - which I'll do now but be aware they are not backwards compatible

Snapshot tests are updated but there is a strange cranelift error that is not understood

---
source: tests/integration/cli/tests/snapshot.rs
assertion_line: 268
expression: snapshot
---
{
  "spec": {
    "name": null,
    "wasm_hash": "3d1ec94e88031b45f7f6d4213f045060",
    "use_packages": [],
    "cli_args": [],
    "stdin": null,
    "debug_output": true,
    "enable_threads": true
  },
  "result": {
    "Success": {
      "stdout": "",
      "stderr": "error: failed to run `/tmp/wasmer-snapshot-tests/3d1ec94e88031b45f7f6d4213f045060.wasm`\n│   1: module instantiation failed (compiler: cranelift)\n╰─▶ 2: Validation error: Invalid type (at offset 165)\n",
      "exit_code": 1
    }
  }
}

john-sharratt and others added 8 commits March 9, 2023 16:14
Just a small restructuring that moves the capabilities submodule from
state into the root lib.

Done because it is now exported in full rather than just partially from
state::, and because it is a more generic module that will probably be moved
out to a separate crate soon.
@john-sharratt john-sharratt force-pushed the dash-fixes-and-pthreads branch from 5a54a0b to 32c0b3c Compare March 16, 2023 02:09
-- Fixed some linting issues on the "--" argument fix of the wasmer command
- Fixed the unit tests for dash and bash subprocesses
- Fixed the order of the flushing of files so that processes are notified of exit only after the open file handles are flushed
- Added a step that explictily flushes the stdout and stderr on cleanup of an exited process
@john-sharratt john-sharratt force-pushed the dash-fixes-and-pthreads branch from 32c0b3c to 8312c2e Compare March 16, 2023 02:10
@john-sharratt john-sharratt force-pushed the dash-fixes-and-pthreads branch from b9c5d21 to 0b8d2b1 Compare March 16, 2023 05:47
@john-sharratt john-sharratt enabled auto-merge March 17, 2023 03:25
@john-sharratt john-sharratt merged commit fbd6fc4 into master Mar 17, 2023
@john-sharratt john-sharratt deleted the dash-fixes-and-pthreads branch March 17, 2023 06:09
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 this pull request may close these issues.

4 participants