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

copy_file_range is not supported on eCryptfs #13968

Open
qm3ster opened this issue Sep 14, 2024 · 3 comments
Open

copy_file_range is not supported on eCryptfs #13968

qm3ster opened this issue Sep 14, 2024 · 3 comments
Labels
bug Something isn't working needs triage

Comments

@qm3ster
Copy link

qm3ster commented Sep 14, 2024

What version of Bun is running?

1.1.27+267afa293

What platform is your computer?

Linux 6.8.0-44-generic x86_64 x86_64

What steps can reproduce the bug?

I was on a machine upgraded from Ubuntu 20.04 today, and the user's home was encrypted with ecryptfs.
This causes the Bun.write copy_file_range syscall to fail with EINVAL.
Perhaps it would not be too awful to attempt a slower fallback in this situation.

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

@qm3ster qm3ster added bug Something isn't working needs triage labels Sep 14, 2024
@qm3ster
Copy link
Author

qm3ster commented Sep 14, 2024

In the meantime, those suffering can set the BUN_CONFIG_DISABLE_COPY_FILE_RANGE env var

@Jarred-Sumner
Copy link
Collaborator

Sorry about this. We currently expect copy_file_range to report that it is unsupported via EOPNOTSUP or ENOSYS, but not EINVAL. So that's interesting.

@qm3ster
Copy link
Author

qm3ster commented Sep 15, 2024

The weirdest thing for me was that when it was nksaraf/vinxi#372, the file stayed empty, while when I was manually doing either something like

const a = Bun.file('.gitignore')
const b = Bun.file('out')
await Bun.write(b, a)

or

const a = Bun.file('.gitignore')
await Bun.write('out', a)

in bun repl
some(all?) of the content was copied (but an EINVAL was still returned and repl exited because it was awaited).

If there is anything you want me to try running on this setup, let me know.

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 triage
Projects
None yet
Development

No branches or pull requests

2 participants