This repository was archived by the owner on Nov 10, 2023. It is now read-only.
Open
Conversation
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D35240414 |
Summary: Pull Request resolved: facebook#2692 When running `buck test ...` the RemoteExecution tests fails with **"Argument list too long"**. Reason: The concatanation of paths used as BUCK_CLASSPATH is crossing the limit emposed by linux for the env variable values. (https://github.com/torvalds/linux/blob/master/include/uapi/linux/limits.h#L8) How to reproduce the problem on a devserver: - execute jshell ``` /usr/local/java-runtime/impl/11/bin/jshell ``` - paste the script that spawn a process with an env value ``` int test(String env, int size) throws Exception { var p = new ProcessBuilder("ls"); p.environment().put(env, "b".repeat(size)); return p.start().waitFor(); } test("BUCK_CLASSPATH", 131_056) // ok: 0 test("BUCK_CLASSPATH", 131_057) // fail: 7 - Argument list too long ``` Reviewed By: bobyangyf fbshipit-source-id: 82be3046d32894b9449bfec84c7cf1cc1e87f798
4b1712a to
284e69e
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D35240414 |
facebook-github-bot
pushed a commit
that referenced
this pull request
Mar 30, 2022
Summary: Pull Request resolved: #2692 When running `buck test ...` the RemoteExecution tests fails with **"Argument list too long"**. Reason: The concatanation of paths used as BUCK_CLASSPATH is crossing the limit emposed by linux for the env variable values. (https://github.com/torvalds/linux/blob/master/include/uapi/linux/limits.h#L8) How to reproduce the problem on a devserver: - execute jshell ``` /usr/local/java-runtime/impl/11/bin/jshell ``` - paste the script that spawn a process with an env value ``` int test(String env, int size) throws Exception { var p = new ProcessBuilder("ls"); p.environment().put(env, "b".repeat(size)); return p.start().waitFor(); } test("BUCK_CLASSPATH", 131_056) // ok: 0 test("BUCK_CLASSPATH", 131_057) // fail: 7 - Argument list too long ``` Reviewed By: bobyangyf fbshipit-source-id: 7a95aac009e4c25c3ea536ec4a3d371525ee2654
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
When running
buck test ...the RemoteExecution tests fails with "Argument list too long".Reason: The concatanation of paths used as BUCK_CLASSPATH is crossing the limit emposed by linux for the env variable values. (https://github.com/torvalds/linux/blob/master/include/uapi/linux/limits.h#L8)
How to reproduce the problem on a devserver:
Reviewed By: bobyangyf