You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The STDIO streams did not close within 10 seconds of the exit event from process '/usr/bin/pwsh'. This may indicate a child process inherited the STDIO streams and has not yet exited.
#49
Open
mattduguid opened this issue
Apr 12, 2021
· 0 comments
Recently we have been trying to get the terraform provider nrkno/lastpass working and we think we have 2 issues which are related to each other so initially have logged them as 1.
Hierarchy of how we have things running,
Azure DevOps Hosted Agent (ubuntu 20.04.2 LTS)
Azure DevOps Pipeline Task (AzurePowerShell@4)
all required environment variables set (LASTPASS_USER, LASTPASS_PASSWORD, LPASS_DISABLE_PINENTRY=1, LPASS_HOME, PATH, etc)
terraform (v0.14.6) and lpass cli (v1.3.3.15.g8767b5e) binaries
Even though it hangs this is after it has completed the task and we can write debug secrets out to screen from lastpass.
This only happens when we add the terraform provider nrkno/lastpass, if we take it away things run OK again.
The error is,
The STDIO streams did not close within 10 seconds of the exit event from process '/usr/bin/pwsh'. This may indicate a child process inherited the STDIO streams and has not yet exited.
To troubleshoot this we dumped a list of processes at start of task and end of task, the one that stood out was "lpass" as we'd expect this not to be running after exiting the provider task. We added some code to detect if the process was running and kill it and this does workaround the issue by closing the task and allowing the pipeline to complete.
We suspect its waiting for input but havent been able to see any useful information by using system.debug=true in Azure DevOps pipeline or $env:TF_LOG = "TRACE" in terraform.
While the workaround works for issue 1 keen to see if we can enable any other debug to determine why this is happening to fix the root cause.
Issue 2 - random failure to display secrets and prompting for password
We are trying to use the data resource to load 19 secrets from lastpass eg:
data "lastpass_secret" "my_secret_name_1" {
id = "1114567890123456789"
}
data "lastpass_secret" "my_secret_name_2" {
id = "2224567890123456789"
}
etc
We tried loading them all and got the following error,
Error Please enter the LastPass master password for [email protected].
Master Password: Error: Could not find decryption key. Perhaps you need to login with lpass login.
Error Please enter the LastPass master password for [email protected].
Master Password: Error: Could not find decryption key. Perhaps you need to login with lpass login.
The STDIO streams did not close within 10 seconds of the exit event from process /usr/bin/pwsh. This may indicate a child process inherited the STDIO streams and has not yet exited.
Script Execution Complete
So we commented them all out then added them back 1 by 1 testing as we went. Initially we thought we had a couple of problem ones but then worked out through further testing none of them were special and this was failing randomly.
If we take it back to a single secret seems to work every time. We dont have a workaround for this but keen to see if we can enable any other debug to determine why this is happening.
Both issues throw up the same error tending to indicate something is holding the IO streams open which is why we think if we fix that issue we may resolve both.
The text was updated successfully, but these errors were encountered:
Recently we have been trying to get the terraform provider nrkno/lastpass working and we think we have 2 issues which are related to each other so initially have logged them as 1.
Hierarchy of how we have things running,
Issue 1 - azure devops pipeline task hangs indefinitely
Even though it hangs this is after it has completed the task and we can write debug secrets out to screen from lastpass.
This only happens when we add the terraform provider nrkno/lastpass, if we take it away things run OK again.
The error is,
The STDIO streams did not close within 10 seconds of the exit event from process '/usr/bin/pwsh'. This may indicate a child process inherited the STDIO streams and has not yet exited.
To troubleshoot this we dumped a list of processes at start of task and end of task, the one that stood out was "lpass" as we'd expect this not to be running after exiting the provider task. We added some code to detect if the process was running and kill it and this does workaround the issue by closing the task and allowing the pipeline to complete.
We suspect its waiting for input but havent been able to see any useful information by using system.debug=true in Azure DevOps pipeline or $env:TF_LOG = "TRACE" in terraform.
While the workaround works for issue 1 keen to see if we can enable any other debug to determine why this is happening to fix the root cause.
Issue 2 - random failure to display secrets and prompting for password
We are trying to use the data resource to load 19 secrets from lastpass eg:
data "lastpass_secret" "my_secret_name_1" {
id = "1114567890123456789"
}
data "lastpass_secret" "my_secret_name_2" {
id = "2224567890123456789"
}
etc
We tried loading them all and got the following error,
Error Please enter the LastPass master password for [email protected].
Master Password: Error: Could not find decryption key. Perhaps you need to login with lpass login.
Error Please enter the LastPass master password for [email protected].
Master Password: Error: Could not find decryption key. Perhaps you need to login with lpass login.
The STDIO streams did not close within 10 seconds of the exit event from process /usr/bin/pwsh. This may indicate a child process inherited the STDIO streams and has not yet exited.
Script Execution Complete
So we commented them all out then added them back 1 by 1 testing as we went. Initially we thought we had a couple of problem ones but then worked out through further testing none of them were special and this was failing randomly.
If we take it back to a single secret seems to work every time. We dont have a workaround for this but keen to see if we can enable any other debug to determine why this is happening.
Both issues throw up the same error tending to indicate something is holding the IO streams open which is why we think if we fix that issue we may resolve both.
The text was updated successfully, but these errors were encountered: