Skip to content

BUG?: faulthandler seems to only give its output with -s #7600

@larsoner

Description

@larsoner

I've noticed with some segfaulty tests that if I don't have the -s switch, it seems like I don't get the faulthandler 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.

  • pytest and operating system versions
  • output of pip list from the virtual environment you are using
(base) bunker:mne-python larsoner$ pip list | grep pytest
pytest                        5.4.3
pytest-cov                    2.9.0
pytest-forked                 1.1.3
pytest-mock                   3.1.0
pytest-notebook               0.6.0
pytest-timeout                1.3.4
pytest-xdist                  1.32.0
(base) bunker:mne-python larsoner$ python --version # macOS catalina
Python 3.8.3

I can also remove pytest dependencies and try master if it's expected to be fixed there.

  • minimal example if possible

pytest 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 of faulthandler to pump into sys.__stdout__ or sys.__stderr__ instead of sys.stdout/sys.stderr, assuming that is the problem (a possibly naive idea, but would explain this behavior).

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: capturerelated to the capture builtin pluginstatus: help wanteddevelopers would like help from experts on this topicstatus: needs informationreporter needs to provide more information; can be closed after 2 or more weeks of inactivitytype: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions