Open nikhil2611 opened 7 months ago
Thinking this through, I think the waking up if asleep is perfectly safe, but returning false if the thread is dead may not be the right approach here. We don't want to silently continue if we cannot send a CloseShell message to the server. It is possible that one could end up with lots of orphaned shell processes on the server and we should have some way of communicating to the user that we could not close the shell.
Thinking this through, I think the waking up if asleep is perfectly safe, but returning false if the thread is dead may not be the right approach here. We don't want to silently continue if we cannot send a CloseShell message to the server. It is possible that one could end up with lots of orphaned shell processes on the server and we should have some way of communicating to the user that we could not close the shell.
@mwrock I think the dead thread limited options, maybe an exception can be raised instead?
Yeah @tpowell-progress an exception could be raised if the thread is dead leading to a clearer exception message. I was looking at this some more today and I think this could also be remedied if kitchen or kitchen-inspec or inspec or whoever is creating the shell, explicitly closes it when done. This way you could be assured the thread is live and it is not left to the finalizer after kitchen exits. It looks like kitchen is good about doing that so I suspect this is somewhere in inspec.
Fixed the below thread error coming up on windows nodes on the execution of the kitchen verify and knife commands.
Issue - https://github.com/chef/chef-workstation/issues/3073
Note- This warning is coming up in the stdout while executing kitchen verify command, though it is not effecting kitchen verify command execution. We have added a patch to fix this warning if the thread is in dead or sleep state.