-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
BUG?: faulthandler seems to only give its output with -s #7600
Comments
The faulthandler's plugin code does try handle this issue, but perhaps it doesn't work? I'm curious if this happens also with |
Always worked fine for me FWIW. Probably not much we can do without having a way to reproduce it. |
Indeed with
I'll work on whittling this down to a minimal example. |
Okay, the segfault is actually easy to reproduce via a Qt abort trap. Hooray! The tricky part was recognizing that the problem is when some other module does
causes
The try/except is necessary because
|
Hmm sorry, which I can reproduce the problem on Windows too. |
Sorry, example updated. It was missing the |
The naive workaround/fix here is just to monkey-patch |
I'm not sure pytest can (or should) protect against users re-enabling faulthandler. |
Fair enough, the |
I've noticed with some segfaulty tests that if I don't have the
-s
switch, it seems like I don't get thefaulthandler
output. I'm not 100% sure if this is the case because the segfaults tend to occur on CI services like Travis and Azure and be sporadic.pip list
from the virtual environment you are usingI can also remove
pytest
dependencies and trymaster
if it's expected to be fixed there.minimal example if possiblepytest mne/viz/_brain/tests/test_brain.py -vvk timeviewer
on a specific branch with specific data, etc. If it seems reasonable that this behavior might be occurring I might be able to replicate it on one of my machines and test code changes or fixes that might help. But the failing code involves VTK and Qt and event processing so it's going to take some time to whittle it down to a minimal example...If it does seem reasonable that this behavior might be occuring, I actually think it might be faster for me to try to fix
pytest
's use offaulthandler
to pump intosys.__stdout__
orsys.__stderr__
instead ofsys.stdout
/sys.stderr
, assuming that is the problem (a possibly naive idea, but would explain this behavior).The text was updated successfully, but these errors were encountered: