exec command frequently exits before running step
There is probably some timing/signal bug. Because step is run once in three or four tries.
uname -a
: Linux devpc 4.2.0-34-generic #39-Ubuntu SMP Thu Mar 10 22:13:01 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
docker info
:
Containers: 971
Running: 1
Paused: 0
Stopped: 970
Images: 1715
Server Version: 1.10.3
Storage Driver: overlay
Backing Filesystem: extfs
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: bridge null host
Kernel Version: 4.2.0-34-generic
Operating System: Ubuntu 15.10
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.59 GiB
Name: loki
ID: REDACTED :-)
Dockerfile
(docker build -t ci-runner .
)
FROM docker:1.9
# gitlab-ci-runner requirements
RUN apk --update-cache add \
git \
bash \
make
# custom requirements
# ...
# workaround to avoid compilation for alpine linux
RUN wget -O /tmp/glibc.apk "https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/6/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-2.21-r2.apk" \
&& apk add --allow-untrusted /tmp/glibc.apk \
&& /usr/glibc/usr/bin/ldconfig /lib /usr/glibc/usr/lib \
&& rm /tmp/glibc.apk
COPY gitlab-ci-multi-runner /usr/local/bin/
# copy custom scripts
# ...
VOLUME ["/etc/gitlab-runner"]
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["gitlab-ci-multi-runner", "run"]
Run in root of git repository with .gitlab-ci.yml
file:
docker run -it --rm \
-v "/var/run/docker.sock:/var/run/docker.sock" \
-v "$(pwd):/source" \
-w "/source" \
--entrypoint "gitlab-ci-multi-runner" \
ci-runner exec shell --builds-dir /tmp build
I have encountered only these outputs on failure:
- Received signal child exited
- Grim reaper cleanup: pid=19, wstatus=0
FATAL: wait: no child processes
- Received signal child exited
FATAL: wait: no child processes
- Grim reaper cleanup: pid=19, wstatus=0
- Received signal child exited
- Received signal child exited
- Received signal child exited
- Grim reaper cleanup: pid=21, wstatus=0
- Received signal child exited
- Received signal child exited
- Received signal child exited
- Received signal child exited
FATAL: wait: no child processes
- Grim reaper cleanup: pid=21, wstatus=0
- Received signal child exited
- Received signal child exited
- Grim reaper cleanup: pid=20, wstatus=0
- Received signal child exited
- Grim reaper cleanup: pid=21, wstatus=0
FATAL: wait: no child processes
Success:
- Received signal child exited
- Received signal child exited
- Received signal child exited
- Received signal child exited
... build output as expected ...