-
Notifications
You must be signed in to change notification settings - Fork 170
Chefspec tests trigger segfault on chef dk 0.4.0 on Windows #332
Comments
FULL OUTPUT HERE: |
Specs for the VM with chef dk 0.4.0: 64-bit Win 2008r2 w/ SP1 |
I should also mention that this error as seen in the full output...
...was produced in a variety of ways with a very simple test cookbook I wrote that does nothing, and has a very simple spec test that just checks for a recipe's existence. Basically, I got a Seg fault one way, a seg fault a different way, a successful pass (which I have since been unable to repro) and more failures with different points of failure, but the same error message. It seems very sporadic. |
Without the test's failure messages, I cannot determine whether it's the cookbook's fault for having bad code or tests, or an actual ChefDK issue. The large number of deprecation warnings might indicate that it's somewhat out of date. I'll ask around if anyone is seeing segfaults like this and if they have any workarounds. Usually the only way to fix is to upgrade ruby, but on Windows we get a build from an upstream packager, so we might be limited there. |
@chef/client-windows had any other reports of segfaults like this? |
Thanks @danielsdeleo. The code I ran was very simple. It is a simple spec test that just checks for a recipe's existence. I verified it to work on an older version of ChefDk (0.2.0, I believe) some months ago. I was also able to get this one (0.4.0) to pass a successful run once, but as I said, have been unable to reproduce that outcome (although I stop trying after a while). I would think that my assertion of this ChefDk failing is is quite easily reproduced yourself by trying the actions that I have described. You should be able to see exactly what I am seeing for an error. If you have any further questions, please ask. Thanks. |
@bmartino right, there's two things going on here. At the Chef/ChefSpec level, there's a failing test:
If that fails only periodically, there are many different things that could be wrong. But I can't really tell what's going on, because of the second, more serious issue, which is that Ruby is crashing with a segfault. It makes sense to me that the segfault issue would appear somewhat random because usually the GC is involved in some way in creating the conditions where the segfault occurs, and GC occurs at different times based on a bunch of different factors. Anyway, someone who knows a bit more of the windows APIs might be able to make some sense of what's going on here:
|
We upgraded Ruby on the windows build of ChefDK, so I'm going to close this. Let me know if this is still an issue on 0.6 and I'll reopen. |
Tried it with 0.6 and not getting this issue anymore. It appears to be resolved. Thanks |
I believe this issue is the same as: #171
I have forked the powershell cookbook as my own copy here:
https://github.com/bmartino/powershell
I made no changes to it whatsoever. I tried the chefspec tests (ran 'rspec' cmdline) on an older chefdk (0.3.5) and got this error:
So I ran it again exactly the same (no changes) on a new VM that I configured the latest chefdk on (0.4.0) and got a different error:
I will post the full output of the latter error on a separate post as it is very long.
Of course, I tried some of my own spec tests, a very simple one that just checked to make sure a recipe is included (nothing fancy) and got the same error first. That was when I tried to use the powershell spec tests straight out of the box and realized that nothing worked.
The text was updated successfully, but these errors were encountered: