vmware-archive/fly

fly execute fails to exit (requiring a KILL -9) upon error

Closed this issue · 6 comments

fly: 3.14.1
arch: os x 10.13.6 x64

I'm completely unable to exit fly execute without sending the job to the background (CTRL+Z) and then issuing a kill -9 %<JOB_ID>

Here's an example where I tried to fly execute after removing a file (but before adding the change to the git working tree, so fly still tried to upload it):

executing build 31 at http://concourse.service.local.consul:8080/builds/31
initializing
failed to upload input 'source': Put http://concourse.service.local.consul:8080/api/v1/builds/31/plan/5b621025/input: tar compress failed (exit status 1). output: "tar: .PACKAGE_NAME: Cannot stat: No suchsource: 41.08 MiB/s 0s
Put /volumes/1cd4b3c8-5730-4096-5ef9-fb32c16c908b/stream-in?path=.: unexpected EOF
errored
^C
aborting...
failed to abort: Unexpected Response
Status: 500 Internal Server Error
Body:

^C^C^C^C^C^C^C^C^C^Z
[1]+  Stopped                 /opt/concourse/local/bin/fly -t local execute -c ci/concourse/tasks/build-osx.yaml -i source=. -o dist-osx=/Users/eedwards/Documents/dev/bash-util/mydist
$ eedwards @ eedwardslt-mac in ~/Documents/dev/bash-util ± |wip S:3 U:6 ?:1 ✗| [14:55:32] C:146
→ kill -9 %1
[1]+  Killed: 9               /opt/concourse/local/bin/fly -t local execute -c ci/concourse/tasks/build-osx.yaml -i source=. -o dist-osx=/Users/eedwards/Documents/dev/bash-util/mydist

You can see it doesn't respond to CTRL+C whatsoever. Only after backgrounding it and then killing the job (forcefully, a regular kill won't work) does it finally exit.

This also happens if you have a typo in image name. The error doesn't give me any idea about what could've gone wrong.

The error looks like this:

executing build 3977266 at https://wings.pivotal.io/builds/3977266
initializing
resource script '/opt/resource/check []' failed: exit status 1

stderr:
failed to fetch digest: 401 Unauthorized

errored
^C
aborting...
failed to abort: Unexpected Response
Status: 500 Internal Server Error
Body:

^C^C^C
Killed: 9

@eedwards-sk this fix concourse/concourse#1083 should prevent you to see those error

@akshaymankar could you provide some details of a typo in image name? Also what version of concourse is it? Thx.

@xtremerui you linked to an issue, not a PR, not sure what the fix is?

to be clear, my issue is not related to the cause of the error, but the behavior when fly execute fails (the original reproduction I show is merely an attempt to cause fly to error)

@eedwards-sk the fix is linked on the issue as commit concourse/concourse@ad411a6. Though you are right that the fix I linked is not intended to fix current issue. I encounter the same error as yours but in my case fly error out without problem.

So I ask other folks for a better way to reproduce it. In you case, could you also provide some example ? Thx.

@xtremerui I think I just had a wrong image name in my task yaml, I guess it would happen if you try to run an image which doesn't exist in docker hub (or any other registry).

I think the version was 4.1.0 (whatever was deployed in wings when I posted that comment).

@xtremerui thanks for writing a fix!