Closed ThisGuyCodes closed 5 years ago
This looks related to https://github.com/hashicorp/packer/issues/7592
Yea, looks like the exact same issue.
I think this has to do with this 1.4.0 feature mentioned in the blog post:
Packer now uses a tty to receive user inputs.
This signal occurs when a process tries to set the TTY while it's not "foreground". I'm not entirely sure what they mean by "uses a TTY" though.
Issue I opened on go-tty: https://github.com/mattn/go-tty/issues/26
My thought is that go-tty could return an error if it would suspend the process. I'm not 100% on that making sense though.
Alternatively I found a very lightweight package that can report on whether you are in the foreground process group: https://github.com/snabb/tcxpgrp (lightweight enough that a copy-paste may make more sense), this could be used to disable use of a TTY when in the background (it's not relevant without a user present anyway I think).
What I don't think of as an option is leaving the current behavior. Packer used to work in build situations where it no longer does.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Run literally any packer command as a bash job, without providing the
-machine-readable
flag. No need to provide a file, or actually even a command:Using the
-machine-readable
flag fixes the issue; but I don't have a system to process that output, it's much more useful to me to have the original output. This issue is only encountered with packer 1.4.0 or later.I use please.build as my build system: and this broke my builds when trying to upgrade packer. I'm not certain if please is using bash job control specifically, but SIGTTOU is still what's locking things up.
debug output for completeness: