Open Bug 1548826 Opened 6 years ago Updated 2 years ago

generic-worker: worker starts up despite missing taskcluster-proxy executable, then crashes after first attempted use

Categories

(Taskcluster :: Workers, defect, P4)

defect

Tracking

(Not tracked)

REOPENED

People

(Reporter: pmoore, Unassigned, Mentored)

Details

The worker shouldn't start up if there is no taskcluster-proxy executable.

Furthermore, it shouldn't crash with "invalid memory address or nil pointer dereference" if at runtime it discovers it is missing, which happened here:

[taskcluster 2019-05-03T12:07:58.186Z] Worker Type (macos) settings:
[taskcluster 2019-05-03T12:07:58.186Z]   {
[taskcluster 2019-05-03T12:07:58.186Z]     "config": {
[taskcluster 2019-05-03T12:07:58.186Z]       "deploymentId": "",
[taskcluster 2019-05-03T12:07:58.186Z]       "runTasksAsCurrentUser": true
[taskcluster 2019-05-03T12:07:58.186Z]     },
[taskcluster 2019-05-03T12:07:58.186Z]     "generic-worker": {
[taskcluster 2019-05-03T12:07:58.186Z]       "go-arch": "amd64",
[taskcluster 2019-05-03T12:07:58.186Z]       "go-os": "darwin",
[taskcluster 2019-05-03T12:07:58.186Z]       "go-version": "go1.10.3",
[taskcluster 2019-05-03T12:07:58.186Z]       "release": "https://github.com/taskcluster/generic-worker/releases/tag/v11.0.1",
[taskcluster 2019-05-03T12:07:58.186Z]       "revision": "a0a5271ddad42022606ca47a6c16f84c128223ab",
[taskcluster 2019-05-03T12:07:58.186Z]       "source": "https://github.com/taskcluster/generic-worker/commits/a0a5271ddad42022606ca47a6c16f84c128223ab",
[taskcluster 2019-05-03T12:07:58.186Z]       "version": "11.0.1"
[taskcluster 2019-05-03T12:07:58.186Z]     }
[taskcluster 2019-05-03T12:07:58.186Z]   }
[taskcluster 2019-05-03T12:07:58.186Z] Task ID: cPGC8byaTb6lxOVuPCmgkA
[taskcluster 2019-05-03T12:07:58.186Z] === Task Starting ===
[taskcluster 2019-05-03T12:07:58.946Z] Uploading redirect artifact public/logs/live.log to URL https://2a2l62aaaaawu7qtu4rzfg7h63o22lxrmdag5xluis3nucuk.taskcluster-worker.net:60023/log/VykLtkAmSiWKa0vx_qGhRA with mime type "text/plain; charset=utf-8" and expiry 2019-05-03T14:22:58.339Z
[taskcluster 2019-05-03T12:07:59.418Z] Uploading redirect artifact public/logs/live.log to URL https://queue.taskcluster.net/v1/task/cPGC8byaTb6lxOVuPCmgkA/runs/0/artifacts/public/logs/live_backing.log with mime type "text/plain; charset=utf-8" and expiry 2020-05-02T11:30:46.810Z
[taskcluster:error] Could not start taskcluster proxy: exec: "taskcluster-proxy": executable file not found in $PATH
[taskcluster:error] goroutine 1 [running]:
[taskcluster:error] runtime/debug.Stack(0xc425945540, 0x14bf0a0, 0x18749d0)
[taskcluster:error] 	/home/travis/.gimme/versions/go1.10.3.src/src/runtime/debug/stack.go:24 +0xa7
[taskcluster:error] main.(*TaskRun).Run.func2(0xc42000c0e0, 0xc42592a000, 0xc42000c1c8)
[taskcluster:error] 	/home/travis/gopath/src/github.com/taskcluster/generic-worker/main.go:1125 +0x22a
[taskcluster:error] panic(0x14bf0a0, 0x18749d0)
[taskcluster:error] 	/home/travis/.gimme/versions/go1.10.3.src/src/runtime/panic.go:502 +0x229
[taskcluster:error] github.com/taskcluster/generic-worker/tcproxy.(*TaskclusterProxy).Terminate(0x0, 0x0, 0x0)
[taskcluster:error] 	/home/travis/gopath/src/github.com/taskcluster/generic-worker/tcproxy/tcproxy.go:62 +0x2e
[taskcluster:error] main.(*TaskclusterProxyTask).Stop(0xc420241d40, 0xc42020c440)
[taskcluster:error] 	/home/travis/gopath/src/github.com/taskcluster/generic-worker/taskcluster_proxy.go:106 +0x87
[taskcluster:error] main.(*TaskRun).Run.func3(0xc42000c0e0, 0x1609ce0, 0xc420241d40, 0x160a160, 0x189f360)
[taskcluster:error] 	/home/travis/gopath/src/github.com/taskcluster/generic-worker/main.go:1207 +0xd5
[taskcluster:error] main.(*TaskRun).Run(0xc42592a000, 0xc42089a0a0)
[taskcluster:error] 	/home/travis/gopath/src/github.com/taskcluster/generic-worker/main.go:1211 +0x1493
[taskcluster:error] main.RunWorker(0x0)
[taskcluster:error] 	/home/travis/gopath/src/github.com/taskcluster/generic-worker/main.go:675 +0xe14
[taskcluster:error] main.main()
[taskcluster:error] 	/home/travis/gopath/src/github.com/taskcluster/generic-worker/main.go:423 +0x846
[taskcluster:error] 
[taskcluster:error] "invalid memory address or nil pointer dereference"
[taskcluster:error] runtime error: invalid memory address or nil pointer dereference
Mentor: pmoore
Priority: -- → P4

Not actively working on this at the moment.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INACTIVE

Reopening inactive bugs, because they may still need attention. Historically, inactive bugs were closed, but this hides the fact there are genuine issues which have not been resolved.

Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---
You need to log in before you can comment on or make changes to this bug.