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

Error: Permission denied (os error 13) #945

Open
gengjiawen opened this issue Dec 19, 2020 · 4 comments
Open

Error: Permission denied (os error 13) #945

gengjiawen opened this issue Dec 19, 2020 · 4 comments
Labels
bug Something isn't working needs investigation

Comments

@gengjiawen
Copy link

gengjiawen commented Dec 19, 2020

πŸ› Bug description

wasm-pack build failed with Error: Permission denied (os error 13)。

wasm-pack --help works.

πŸ€” Expected Behavior

build passed.

πŸ‘Ÿ Steps to reproduce

open this PR gengjiawen/monkey-rust#14 in gitpods. You may need to install this extension first
https://chrome.google.com/webstore/detail/gitpod-dev-environments-i/dodmmooeoklaejobgleioelladacbeki

when opened

cd wasm/
wasm-pack build

Not sure this related to permission issue or something. But it doesn't show stacktrace.

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: 0.9.1
rustc version: 1.48

@kirillt
Copy link

kirillt commented Mar 7, 2021

While following https://developer.mozilla.org/en-US/docs/WebAssembly/Rust_to_wasm

[kirill@lenovo hello-wasm]$ rustc --version
rustc 1.47.0 (18bf6b4f0 2020-10-07)
[kirill@lenovo hello-wasm]$ wasm-pack --version
wasm-pack 0.9.1
[kirill@lenovo hello-wasm]$ cargo --version
cargo 1.47.0 (f3c7e066a 2020-08-28)
[kirill@lenovo hello-wasm]$ wasm-pack build
Error: Permission denied (os error 13)

Cargo.toml and src/lib are the same as in the tutorial.

OS: Fedora 32

@kirillt
Copy link

kirillt commented Mar 7, 2021

strace output (without flags):

statx(0, NULL, AT_STATX_SYNC_AS_STAT, STATX_ALL, NULL) = -1 EFAULT (Bad address)
statx(AT_FDCWD, "/home/kirill/hello-wasm/Cargo.toml", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0664, stx_size=279, ...}) = 0
statx(AT_FDCWD, "/home/kirill/hello-wasm/Cargo.toml", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0664, stx_size=279, ...}) = 0
openat(AT_FDCWD, "/dev/null", O_RDONLY|O_CLOEXEC) = 7 
pipe2([8, 9], O_CLOEXEC)                = 0
pipe2([10, 11], O_CLOEXEC)              = 0
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=512*1024}) = 0 
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=512*1024}) = 0 
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=512*1024}) = 0 
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=512*1024}) = 0 
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=512*1024}) = 0 
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=512*1024}) = 0 
mmap(NULL, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7ff074b88000
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0 
clone(child_stack=0x7ff074b90ff0, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = 750962
wait4(750962, NULL, 0, NULL)            = 750962
munmap(0x7ff074b88000, 36864)           = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 
close(7)                                = 0
close(9)                                = 0
close(11)                               = 0
close(8)                                = 0
close(10)                               = 0
write(2, "Error: ", 7Error: )                  = 7
write(2, "Permission denied", 17Permission denied)       = 17
write(2, " (os error ", 11 (os error )             = 11
write(2, "13", 213)                       = 2
write(2, ")", 1))                        = 1
write(2, "\n", 1
)                       = 1
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, NULL) = 0 
munmap(0x7ff075596000, 12288)           = 0
exit_group(1)                           = ?
+++ exited with 1 +++

I suspect it is something with RLIMIT_NOFILE, but couldn't find how to query current value or increase it in Fedora, yet.

@sundhaug92
Copy link

WSL2?

@Mubelotix
Copy link

Could reproduce on Debian with those env vars

environment:
PATH: /opt/rust/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUSTUP_HOME: /opt/rust
CARGO_HOME: /data/insaplace_proxy/.cargo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs investigation
Projects
None yet
Development

No branches or pull requests

5 participants