wasmerio / winterjs

Winter is coming... ❄️
https://winterjs.org/
MIT License
3k stars 54 forks source link

readBinary throws Could not read file: file:... mozilla::detail::MutexImpl::~MutexImpl: pthread_mutex_destroy failed: Device or resource busy #93

Open guest271314 opened 2 weeks ago

guest271314 commented 2 weeks ago

Download winterjs-linux from https://github.com/wasmerio/winterjs/actions/runs/9683093431#artifacts.

Extract to a directory in PATH

winter.js

#!/usr/bin/env -S /home/user/bin/winterjs exec
const f = await globalThis.fs.readBinary(new URL("nm_host.js", import.meta.url));
console.log(f);

At commandline run

$ ./winter.js

Observe the error

Unhandled Promise Rejection: Error - Could not read file: file:///home/user/bin/nm_host.js
mozilla::detail::MutexImpl::~MutexImpl: pthread_mutex_destroy failed: Device or resource busy
Segmentation fault (core dumped)

System: Linux 5.15.0-43-generic x86_64 x86_64 x86_64 GNU/Linux

guest271314 commented 2 weeks ago

Actually the error happens just running the script

#!/usr/bin/env -S /home/user/bin/winterjs exec
// ...
./winter.js
mozilla::detail::MutexImpl::~MutexImpl: pthread_mutex_destroy failed: Device or resource busy
Segmentation fault (core dumped)
guest271314 commented 2 weeks ago

winterjs from winterjs-x86_64-linux-gnu-0.4.2.tar.gz here https://wasmer.io/wasmer/winterjs%400.4.2/exe running the same file exits, too, with

Error setting filesystem