-
Notifications
You must be signed in to change notification settings - Fork 20
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
Behavex runner gets stuck indefinitely when a test case terminates with sys.exit/seg fault #114
Comments
Hi @hrcorval, sorry for direct ping but just curious if you think you'll get to this at some point or if you're lacking bandwidth to maintain Thanks for this project, it's been very useful! |
Hi @jbridger, @lazareviczoran and @bombsimon, thanks for reporting this issue. |
Hi! Sorry for maybe dumb question but did you see the repro in the issue description? What happens when you run it, does it not behave (no pun intended) as the description states? If not I can try to make a new repro! Totally understand about the size of the PR. Sadly the changes spread a bit wide. I guess that's something to consider as well but let's see if we can get a working repro first.😀 EDIT Oh I assume you want some behave feature and step impl that causes the same issue. I'll try to get back with that early next week! |
I created a repro here: https://github.com/bombsimon/behavex-issue-114-repro It's basically just a test step doing |
hey gents. thanks for reporting this. i have a feeling im getting a related issue. only happens on multi proc too. i can reproduce the issue on this repo https://github.com/bombsimon/behavex-issue-114-repro, python 3.10.11 |
Hi! In a few days we are releasing a new version (v4.0.1) that contains multiple changes that were suggested in this thread, including changing the parallel execution implementation to start using concurrent.futures.ProcessPoolExecutor instead of multiprocessing.Pool. |
Hi @lazareviczoran , @jbridger , @bombsimon , @iamkenos . Finally, we have released a new library version (v4.0.2) with core changes in the way parallel executions are being performed. |
Great! We'll try it out and report back if we notice any issue. |
Hi @hrcorval thanks to the team for working on the release! I'm getting issues with the new release, something around the HTML reporter not loading the environment variables when ran on parallel mode. e.g the merged behave output xml file is showing the tests that ran but the html report doesnt. (this only happens on parallel mode) I havent found the cause yet and couldnt recreate the issue with a minimum repro example. Would it be possible to back-port the fix for issue 114 on v3? i checked the changes on v4 and there seem to be a handful around the html reporter (and one related to env variables). have a feeling some of it may have caused a regression. otherwise, would you be able to advise on the best next step for troubleshooting this? thank again! |
Hi @iamkenos, it seems the way we are using/testing the library is not catching the issue you are experiencing, so I would like to ask you for more details in order to investigate it: Thanks for reporting that, as we are extensively using the solution and it seems we are not reproducing this issue, and we need to consider the way to reproduce it. Regards! |
Appreciate the prompt response @hrcorval ! I have a feeling the issue is intermittent. I'll raise a separate github issue once I find a way to reproduce it consistently. Once again, thanks for all your work! |
Describe the bug
Hello, we ran into a case where we noticed that the runner gets stuck while running the test cases when one of the test processes ends unexpectedly. We tried to dig into this and figure out why this behavior is occurring, and we noticed that there is an open bug in the
multiprocessing.Pool
where if the function that is being executed as a subprocess ends with a sys.exit/seg fault, the process will get stuck on the join part indefinitely. Seems like theconcurrent.futures.ProcessPoolExecutor
has this specific issue fixed, not sure if there would be some other side effects that would break the current behavex behavior, but it might be worth looking into it.To Reproduce
Steps to reproduce the behavior:
Expected behavior
In case any of the test cases exits with a seg fault or a sys.exit, the runner should exit instead of hanging indefinitely.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: