Skip to content

Fix panic when generating log message if provision of node fails

Kamil Trzcińśki requested to merge fix-panic-machine into master

Fixes:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4c6e50]

goroutine 133 [running]:
panic(0xa7fa00, 0xc820010060)
    /usr/local/go/src/runtime/panic.go:481 +0x3e6
gitlab.com/gitlab-org/gitlab-ci-multi-runner/executors/docker/machine.(*machineExecutor).log(0xc820c37c20, 0xc8243aa040)
    /go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/executors/docker/machine/executor.go:31 +0x330
gitlab.com/gitlab-org/gitlab-ci-multi-runner/executors/docker/machine.(*machineExecutor).Finish(0xc820c37c20, 0x7fb47d4e9028, 0xc821ad4a60)
    /go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/executors/docker/machine/executor.go:86 +0x78
gitlab.com/gitlab-org/gitlab-ci-multi-runner/common.(*Build).Run(0xc821232d80, 0xc82004ecc0, 0x7fb47d4b1248, 0xc820b8c600, 0x7fb47d4e9028, 0xc821ad4a60)
    /go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/common/build.go:258 +0x4e4
gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands.(*RunCommand).processRunner(0xc8200d1520, 0x6c, 0xc8200922a0, 0xc82004f200, 0x0, 0x0)
    /go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands/multi.go:145 +0xcaa
gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands.(*RunCommand).processRunners(0xc8200d1520, 0x6c, 0xc8201f6060, 0xc82004f200)
    /go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands/multi.go:153 +0x23d
created by gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands.(*RunCommand).startWorkers
    /go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands/multi.go:169 +0x96

cc @tmaczukin

Merge request reports