"argument list too long" error with very large CI/CD variable (#392406) · Issues · GitLab.org / GitLab · GitLab (original) (raw)

Skip to content

"argument list too long" error with very large CI/CD variable

Status update (2023-06-08)

  1. There is no planned code update to the runner core code base for this issue.
  2. We have identified a few workarounds and will be adding those to the documentation.
  3. Long-term we have started to explore the future evolution of GitLab Runner.

Workarounds

Summary

Runner fails during the executor preparation section with the error exec /usr/bin/dumb-init: argument list too long. This occurs when a CI/CD variable contains a very large value. Some customers have come across this specifically by adding a large amount of certificates to a CI/CD variable.

If we use a file based variable with more than 200,000 characters in it, the error message changes to: "unable to upgrade connection: container not found ("build")". It's also observed that the issue happens when Runner version > 15.3 is used.

Steps to reproduce

  1. Add a very large Project CI/CD variable (~400KB)
  2. Create a very basic .gitlab-ci.yml file with a single job targeting a docker or docker+machine executor Runner
  3. Run pipeline

Example Project

https://gitlab.com/gitlab-gold/tmike/zd375642/zd375642

What is the current bug behavior?

Error exec /usr/bin/dumb-init: argument list too long occurs during preparation of executor

What is the expected correct behavior?

Either limit the CI/CD variable size when saving, or check for CI/CD variable size prior to preparing executor to avoid failure.

Relevant logs and/or screenshots

Screenshot_2023-02-20_at_2.26.03_PM

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:env:info)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

As the issue seems to pop up after Runner upgrade from 15.3 to 15.5 or later, I wonder if https://gitlab.com/gitlab-org/security/gitlab-runner/-/merge_requests/38 is somehow involved.

Tasks to complete to close this issue:

Edited Jun 08, 2023 by Darren Eastman