-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when spinning up a child process from inside of ruby #1083
Comments
Attempted to run locally, works fine. Did a little research, it seems likes others are having similar problems in Github: https://github.com/enkessler/childprocess/pull/178/checks?check_run_id=2725513511 |
Thanks to @da-ar for the investigation in to this, so far. We use the childprocess to abstract the spawning / handling of exec threads across platforms. Setting the leader attribute will ensure any process trees created will die when the child process does. On Windows platforms, this is done by setting the CREATE_BREAKAWAY_FROM_JOB flag when calling [AssignProcessToJobObject](https://docs.microsoft.com/en-us/windows/win32/api/jobapi2/nf-jobapi2-assignprocesstojobobject] in the Win32 API. According to [the Win32 API documentation]https://docs.microsoft.com/en-us/windows/win32/api/jobapi2/) when this flag is set:
Jobs (and nested jobs) created through this API are created via the Task Scheduler. According to this bug write up from Mozilla, and the associated patch to fix on Windows < 8 / Server 2008 R2 ( NT < 6.2 ), the For our scenario, we should conditionally set the More investigation / understanding would be required to offer a fix upstream to |
Due to upstream issues with one of our dependencies we are currently unable to run the acceptance test's on GHA, as such for now we will move only the General and Unit tests while we search for a fix for this issue. Further information on the issue can be found within the following link: puppetlabs/pdk#1083
Due to upstream issues with one of our dependencies we are currently unable to run the acceptance test's on GHA, as such for now we will move only the General and Unit tests while we search for a fix for this issue. Further information on the issue can be found within the following link: puppetlabs/pdk#1083
Bumping Using this test workflow, on a repo pulling in a version of PDK with the above changes, I was able to get This run is with PDK 2.1.0, reproducing the original issue. |
I spiked a test PR on Windows based on @sanfrancrisko's work here: And it works! |
We have a number of AppVeyor tests that have been failing. We got some issues resolved with #1089, however, there are still failures that seem to be specific to AppVeyor. See @jpogran 's comment here We have tested this manually on:
@michaeltlombardi also created a workflow with the config of the original issue, but this fixed pulled in: https://github.com/puppetlabs/Puppet.Dsc/pull/168/checks?check_run_id=2785882419#step:4:357 |
…s_win (GH-1083) Bump childprocess to '~> 4.0.0'; Disable @process.leader
When running the Puppet.Dsc acceptance tests on GHA we hit an error during the setup for the first test.
This error occurs whenever the pdk is called upon in order to create a module and states that there has been a
ChildProcess::LaunchError
due to our access having been denied.The exact error that we have been getting can be seen here.
And the PR on which we were working when we discovered this bug can be shown here.
A conversation between @michaeltlombardi the inimitable @glennsarti, who went out of his way to try a minimal local repro using the GHA docker image, discovered the problem seems to be this line in the PDK, which sets
process.leader
:pdk/lib/pdk/cli/exec/command.rb
Line 30 in 2b03b72
In his manual testing, attempting to start a process in GHA with this flag breaks
But with it removed, no error is returned:
We had opened a PR on the pdk in order to try and implement two possible solutions, shown here.
The first of these solutions was to move the pin of the
childprocess
gem fromv0.7.1
tov4.0.0
in order to bring in the patch shown here, however this did not resolve the issue as the error still occured.The second of our attempted solutions was to comment out the above linked line:
pdk/lib/pdk/cli/exec/command.rb
Line 30 in 2b03b72
But this did not work either as the change somehow caused a dependency error in the bundle install as shown here
A draft for the experimental branch that we used is currently open can can be found here: #1081
We are hoping for some help in finding a fix for this as it is a major blocker in moving our CI off of appveyor.
The text was updated successfully, but these errors were encountered: