Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Merge requests
  • !2692

fix BUCK_CLASSPATH limit on linux

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Adolfo requested to merge github/fork/adolfojunior/export-D35240414-to-dev into dev Mar 30, 2022
  • Overview 2
  • Commits 1
  • Pipelines 1
  • Changes 8

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

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/adolfojunior/export-D35240414-to-dev