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:
- 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