-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
Failure to launch process with a materialized arg0 on rust 1.49.0 and OSX #11406
Comments
How do you know? It could be /usr/bin/env is not found:
|
After the run, with $ /private/var/folders/bg/_r10hqp14kjcpv68yzdk5svc0000gn/T/process-executionvrX4qr/find_binary.sh bash
+ command -v which
+ command which -a bash
+ which -a bash
/bin/bash |
Also I see that |
(Or is that a relative working directory for the Process request?) |
Yea, it's for the request. The process itself is always launched inside the sandbox, and the extra working directory is a subdirectory of the sandbox. |
Poked this for a few minutes over the weekend: at the time of spawning, the executable does exist on disk. Next might be looking into any changes to the |
This will need to be fixed to unblock building Pants with Apple Silicon machines. Co-assigning to me. |
How come you think that might be a possibility? This seems to pretty confidently be a regression between Rust 1.48 vs. 1.49. Using the exact same environment, e.g. same OS, this code works with 1.48 but breaks on 1.49. The file also seems to be the same contents between both versions, per That is, Rust seems to have changed something, but I don't think something like how the shebang is interpreter by the kernel would be in play. |
rust-lang/rust#80819 seems to be this issue with a work-around fix in rust-lang/rust#80537. Basically a bug on macOS with a certain syscall used by the Rust |
To clarify, the workaround is to absolutify the path, right? |
Seems like that. Which you could do by not relying on the shebang but instead run |
That would fix |
Which will work in local execution, but not in remote execution (since you currently cannot rely on a remote execution server to normalize paths). So your proposal should fix the issue locally in the short term. Long term I've thought about proposing a change to REAPI to do that, but that would require much thought. Although given REAPI servers only run on Linux currently, maybe it is fine to just keep the path relative on every platform other than macOS? |
…v0 (#11452) Works around #11406, which we found is due to rust-lang/rust#80819. To workaround, we absolutify relative paths when they are argv[0]. We only do this for local execution.
On rust 1.49.0:
The text was updated successfully, but these errors were encountered: