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

test_workingdirectory.py tests segfault #17080

Closed
5 of 10 tasks
juliangilbey opened this issue Dec 23, 2021 · 2 comments
Closed
5 of 10 tasks

test_workingdirectory.py tests segfault #17080

juliangilbey opened this issue Dec 23, 2021 · 2 comments
Assignees
Milestone

Comments

@juliangilbey
Copy link
Contributor

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

Oh, I'm sorry, there were more failures that I hadn't realised, as they aborted rather than reporting a failure. :-( And there's a new failure with spyder 5.2.1.

Anyway, here's the first one: the tests in spyder/plugins/workingdirectory/tests/ almost all segfault when run outside of the context of the whole runtests.py suite. Here's an example.

What steps reproduce the problem?

euler:~/debian/spyder-packages/spyder/build-area/spyder-5.2.1+dfsg1 $ python3.9 -m pytest spyder/plugins/workingdirectory/tests/test_workingdirectory.py::test_basic_initialization
============================= test session starts ==============================
platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
PyQt5 5.15.6 -- Qt runtime 5.15.2 -- Qt compiled 5.15.2
rootdir: /home/jdg/debian/spyder-packages/spyder/build-area/spyder-5.2.1+dfsg1, configfile: pytest.ini
plugins: typeguard-2.11.1, lazy-fixture-0.6.3, hypothesis-5.43.3, order-1.0.0, anyio-3.4.0, xvfb-2.0.0, mock-3.6.1, xdist-2.4.0, timeout-2.0.1, cov-3.0.0, forked-1.3.0, qt-4.0.2, dependency-0.5.1, flaky-3.7.0
collected 1 item                                                               

spyder/plugins/workingdirectory/tests/test_workingdirectory.py Fatal Python error: Aborted

Current thread 0x00007f1a1fb5a740 (most recent call first):
  File "/home/jdg/debian/spyder-packages/spyder/build-area/spyder-5.2.1+dfsg1/spyder/api/widgets/main_container.py", line 106 in __init__
  File "/home/jdg/debian/spyder-packages/spyder/build-area/spyder-5.2.1+dfsg1/spyder/api/plugins/new_api.py", line 313 in __init__
  File "/home/jdg/debian/spyder-packages/spyder/build-area/spyder-5.2.1+dfsg1/spyder/plugins/workingdirectory/tests/test_workingdirectory.py", line 37 in setup_workingdirectory
  File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 932 in call_fixture_func
  File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 1126 in pytest_fixture_setup
  File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83 in <lambda>
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92 in _hookexec
  File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 1072 in execute
  File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 687 in _compute_fixture_value
  File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 601 in _get_active_fixturedef
  File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 581 in getfixturevalue
  File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 568 in _fillfixtures
  File "/usr/lib/python3/dist-packages/pytest_lazyfixture.py", line 39 in fill
  File "/usr/lib/python3/dist-packages/_pytest/python.py", line 1647 in setup
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 449 in prepare
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 150 in pytest_runtest_setup
  File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83 in <lambda>
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92 in _hookexec
  File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 255 in <lambda>
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 311 in from_call
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 254 in call_runtest_hook
  File "/usr/lib/python3/dist-packages/flaky/flaky_pytest_plugin.py", line 138 in call_and_report
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 120 in runtestprotocol
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 109 in pytest_runtest_protocol
  File "/usr/lib/python3/dist-packages/flaky/flaky_pytest_plugin.py", line 94 in pytest_runtest_protocol
  File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83 in <lambda>
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92 in _hookexec
  File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/lib/python3/dist-packages/_pytest/main.py", line 348 in pytest_runtestloop
  File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83 in <lambda>
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92 in _hookexec
  File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/lib/python3/dist-packages/_pytest/main.py", line 323 in _main
  File "/usr/lib/python3/dist-packages/_pytest/main.py", line 269 in wrap_session
  File "/usr/lib/python3/dist-packages/_pytest/main.py", line 316 in pytest_cmdline_main
  File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83 in <lambda>
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92 in _hookexec
  File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 162 in main
  File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 185 in console_main
  File "/usr/lib/python3/dist-packages/pytest/__main__.py", line 5 in <module>
  File "/usr/lib/python3.9/runpy.py", line 87 in _run_code
  File "/usr/lib/python3.9/runpy.py", line 197 in _run_module_as_main
Aborted

This happens in a regular desktop session and using xvfb-run in a chroot. I'm a bit stymied on this one, I'm afraid. Aborting tests seem challenging to debug.

But when I run runtests.py on the whole test suite, it claims that all of the tests in test_workingdirectory.py pass. So it might be some sort of initialisation problem, perhaps, as with #17074.

What is the expected output? What do you see instead?

I expect the test to pass, not abort.

Versions

  • Spyder version: 5.2.1
  • Python version: 3.9 and 3.10
  • Qt version: 5.15.2
  • PyQt version: 5.15.6+dfsg-1+b1
  • Operating System name/version: Debian testing and unstable

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.0.2 (OK)
IPython >=7.6.0               :  7.27.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.0 (OK)
jellyfish >=0.7               :  0.8.9 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  23.3.0 (OK)
nbconvert >=4.0               :  6.1.0 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
parso >=0.7.0;<0.9.0          :  0.8.1 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.7.1 (OK)
pylint >=2.5.0                :  2.12.2 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.3.2;<1.4.0          :  1.3.3 (OK)
pylsp_black >=1.0.0           :  1.0.1 (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.2.1 (OK)
qtawesome >=1.0.2             :  1.1.1 (OK)
qtconsole >=5.2.1;<5.3.0      :  5.2.1 (OK)
qtpy >=1.5.0                  :  1.9.0 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=49.6.0           :  58.2.0 (OK)
sphinx >=0.6.6                :  4.3.2 (OK)
spyder_kernels >=2.2.0;<2.3.0 :  2.2.0 (OK)
textdistance >=4.2.0          :  4.2.2 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
xdg >=0.26                    :  0.27 (OK)
zmq >=17                      :  22.3.0 (OK)

# Optional:
cython >=0.21                 :  0.29.24 (OK)
matplotlib >=2.0.0            :  3.3.4 (OK)
numpy >=1.7                   :  1.21.5 (OK)
pandas >=1.1.1                :  1.3.4 (OK)
scipy >=0.17.0                :  1.7.1 (OK)
sympy >=0.7.3                 :  1.7.1 (OK)
@ccordoba12 ccordoba12 self-assigned this Dec 23, 2021
@ccordoba12 ccordoba12 added this to the v5.2.2 milestone Dec 23, 2021
@ccordoba12
Copy link
Member

Thanks for reporting @juliangilbey. Fortunately, this is an easy fix.

@juliangilbey
Copy link
Contributor Author

Thanks @ccordoba12! I'm glad to hear that ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants