CI/CD job fails with error: argument list too long
Description
-
CI/CD job fails during the environment prepare phase with error:
exec /usr/bin/dumb-init: argument list too long
Environment
CI/CD jobs running on Linux systems (Example: job running in a container created from alpine:latest image)
-
Impacted offerings:
- GitLab.com
- GitLab Dedicated
- GitLab Self-Managed
Solution
Reduce the size of the CI/CD variable value so that it doesn't exceed 128 KiB.
Workarounds
- Move large variables to files where possible.
- If a single variable is too large, try using project-level secure files or bring the file to the job through some other mechanism.
Cause
Linux systems have a size limit for any single environment variable value. This is set via the MAX_ARG_STRLEN
definiton during compilation of the kernel. This value generally ends up being 131072 bytes (128 KiB).
This includes the pre-defined CI/CD variables which are passed to the job and in particular the CI_COMMIT_MESSAGE
variable which can be long.