Skip to content
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

Disable faulthandler for pytest. #113

Merged
merged 2 commits into from
Jun 22, 2023
Merged

Conversation

DennisSoemers
Copy link
Collaborator

@DennisSoemers DennisSoemers commented Jun 21, 2023

This project uses jpype to run Java code from Python.

There is an annoying issue where, when pytest is combined with jpype, the latter sometimes crashes with a Segmentation Fault all the way at the end when automatically trying to shut down the Java Virtual Machine (after all tests have already been run and passed). This sometimes causes our github workflows to report failure, and the solution is always just to... re-run it again and hope it doesn't crash the second time.

I found an Issue about this over on the github repo of jpype itself, and the solution proposed all the way at the end there is to pass -p no:faulthandler to pytest. It looks like this is also the solution that was implemented in the CI of jpype itself. So, that's what I also try here.

It was a non-deterministic issue so I can't be 100% sure, but I made the build re-run many times for this PRs and didn't see it again, so I hope it's fixed. I did once have it fail with

ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running

through a Stable Baselines import though, not sure yet what to do about that.

@DennisSoemers DennisSoemers marked this pull request as ready for review June 22, 2023 09:34
@pseudo-rnd-thoughts pseudo-rnd-thoughts merged commit 528a41b into master Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants