Skip to content

Service is killed by gitlab-ci-multi-runner

Hi

I'm using the gitlab-ci-multi-runner on a linux runner.

The script I'm using, basically, does the following:

run code
stop a service
start the service again
run code

Everything runs fine (the code runs, then the service is stopped then restarted and the code at the end is well executed)

The problem is that at the end of the script, the service suddenly stops again without any info in the service log

I suspect this is caused by the KillProcessGroup function (see https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/helpers/process_group_unix.go#L17) which seems to kill all the processes from the invoked group with a SIGABRT signal

Is there a way to keep the service alive after the job execution? I tried with nohup without success (certainly because it's not a SIGHUP signal that is sent (?))

More details here: