summaryrefslogtreecommitdiffstats
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-03-02 12:55:02 +0100
committerJunio C Hamano <gitster@pobox.com>2026-03-02 11:08:14 -0800
commiteb35167dd4b5f410c261680c8d634bee394eca19 (patch)
treecbfd7107221e46c473e2c005340c4df50fde1e2c /contrib/persistent-https
parent67ad42147a7acc2af6074753ebd03d904476118f (diff)
downloadgit-eb35167dd4b5f410c261680c8d634bee394eca19.tar.gz
git-eb35167dd4b5f410c261680c8d634bee394eca19.zip
ci: unset GITLAB_FEATURES envvar to not bust xargs(1) limits
We have started to see the following assert happen in our GitLab CI pipelines for jobs that use Windows with Meson: assertion "bc_ctl.arg_max >= LINE_MAX" failed: file "xargs.c", line 512, function: main The assert in question verifies that we have enough room available to pass at least `LINE_MAX` many bytes via the command line. The xargs(1) binary in those jobs comes from Git for Windows, which in turn sources the binaries from MSYS2, and has the following limits in place: $ & "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'xargs --show-limits </dev/null' Your environment variables take up 17373 bytes POSIX upper limit on argument length (this system): 12579 POSIX smallest allowable upper limit on argument length (all systems): 4096 Maximum length of command we could actually use: 18446744073709546822 Size of command buffer we are actually using: 12579 Maximum parallelism (--max-procs must be no greater): 2147483647 What's interesting to see is the limit of 16 exabits for the maximum command line length. This value might seem a bit high, and it is indeed the result of an underflow: our environment is larger than the POSIX upper limit on argument length, and the value is computed by subtracting the former from the latter. So what we get is the result of `2^64 - (17373 - 12579)`. This makes it clear that the problem here is the size of our environment variables. A listing sorted by length yields the following result: $ Get-ChildItem "Env:" | Sort-Object { $_.Value.Length } -Descending | Select-Object Name, @{Name="Length"; Expression={$_.Value.Length}} Name Length ---- ------ GITLAB_FEATURES 6386 Path 706 PSModulePath 229 The GITLAB_FEATURES environment variable makes up for roughly a third of the complete environment. This variable is a comma-separated list of features available for the GitLab instance, and seemingly it has been growing over time as GitLab added more and more features. Fix the issue by unsetting the environment variable in "ci/lib.sh". This ensures that the environment variables are now smaller than the upper limit on argument length again, and that in turn fixes the assert in xargs(1). Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions