Runner stops at random place with "Cleaning up project directory and file based variables" even if there is no error
Summary
The Gitlab Runner just stops at a random place with the message
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
Steps to reproduce
Actually I've no clue how to reproduce it because it's not deterministic.
- See this job log that failed at showing the files from a
tar cvzf
command. - I thought it might be related somehow to the long log on a parallel pipeline and that it doesn't show the real error in step 1.
- Thus I removed the
v
flag from mytar
command in the Dockerfile to reduce the output and now the runner passes the previous step but suddenly dies with the same message at a different place (installing new apt packages).
Example Project
https://gitlab.com/freepascal.org/fpc/docker
What is the current bug behavior?
The Gitlab Runner randomly stops during building docker images while local creation of these images works fine.
docker buildx build -f Ubuntu/Dockerfile .
docker buildx build -f AlpineLinux/Dockerfile .
What is the expected correct behavior?
The Gitlab Runner shouldn't stop suddenly without any error (or at least print an error message but I doubt there is one).
Relevant logs and/or screenshots
#14 21.54 Setting up build-essential (12.8ubuntu1.1) ...
#14 21.55 Setting up libalgorithm-diff-xs-perl (0.04-6) ...
#14 21.56 Setting up libalgorithm-merge-perl (0.08-3) ...
#14 21.58 Setting up libldap-2.4-2:amd64 (2.4.49+dfsg-2ubuntu1.9) ...
#14 21.59 Setting up dirmngr (2.2.19-3ubuntu2.2) ...
#14 21.75 Setting up gpg-wks-client (2.2.19-3ubuntu2.2) ...
#14 21.76 Setting up gnupg (2.2.19-3ubuntu2.2) ...
#14 21.76 Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
Output of checks
This bug happens on GitLab.com
gitlab-runner 15.4.0~beta.5.gdefc7017 (defc7017) on green-2.shared.runners-manager.gitlab.com/default
$ docker version
Client:
Version: 20.10.17
API version: 1.41
Go version: go1.17.11
Git commit: 100c701
Built: Mon Jun 6 22:56:42 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.17
API version: 1.41 (minimum version 1.12)
Go version: go1.17.11
Git commit: a89b842
Built: Mon Jun 6 23:01:45 2022
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: v1.6.6
GitCommit: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
runc:
Version: 1.1.2
GitCommit: v1.1.2-0-ga916309f
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Edited by Bi0T1N