Skip to content

BUG: test_inference.py raises stack overflowerror #35218

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

Closed
2 of 3 tasks
joooeey opened this issue Jul 10, 2020 · 4 comments
Closed
2 of 3 tasks

BUG: test_inference.py raises stack overflowerror #35218

joooeey opened this issue Jul 10, 2020 · 4 comments
Labels
Bug Testing pandas testing functions or related to the test suite Windows Windows OS

Comments

@joooeey
Copy link
Contributor

joooeey commented Jul 10, 2020

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Code Sample, a copy-pastable example

In Anaconda Prompt:

(pandas-dev) C:\Users\Joey\pandas-joooeey> pytest pandas
.
.
.
pandas\tests\dtypes\test_generic.py ..                                   [ 21%]
pandas\tests\dtypes\test_inference.py .................................. [ 22%]
..............................................Windows fatal exception: stack overflow

Thread 0x00003d8c (most recent call first):
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 302 in wait
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 558 in wait
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\site-packages\IPython\core\history.py", line 829 in run
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\site-packages\IPython\core\history.py", line 58 in needs_sqlite
  File "<decorator-gen-24>", line 2 in run
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 932 in _bootstrap_inner
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 890 in _bootstrap

Thread 0x00002ef8 (most recent call first):
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\multiprocessing\pool.py", line 576 in _handle_results
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 870 in run
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 932 in _bootstrap_inner
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 890 in _bootstrap

Thread 0x00006314 (most recent call first):
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\multiprocessing\pool.py", line 528 in _handle_tasks
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 870 in run
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 932 in _bootstrap_inner
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 890 in _bootstrap

Thread 0x000067cc (most recent call first):
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\multiprocessing\connection.py", line 810 in _exhaustive_wait
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\multiprocessing\connection.py", line 878 in wait
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\multiprocessing\pool.py", line 499 in _wait_for_updates
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\multiprocessing\pool.py", line 519 in _handle_workers
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 870 in run
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 932 in _bootstrap_inner
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 890 in _bootstrap

Thread 0x00000ef4 (most recent call first):
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\multiprocessing\pool.py", line 114 in worker
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 870 in run
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 932 in _bootstrap_inner
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 890 in _bootstrap

Thread 0x00006718 (most recent call first):
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\multiprocessing\pool.py", line 114 in worker
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 870 in run
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 932 in _bootstrap_inner
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 890 in _bootstrap

Thread 0x000031c0 (most recent call first):
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\multiprocessing\pool.py", line 114 in worker
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 870 in run
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 932 in _bootstrap_inner
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 890 in _bootstrap

Thread 0x00002644 (most recent call first):
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\multiprocessing\pool.py", line 114 in worker
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 870 in run
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 932 in _bootstrap_inner
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\threading.py", line 890 in _bootstrap

Current thread 0x000029fc (most recent call first):
  File "C:\ProgramData\Anaconda3\envs\pandas-dev\lib\abc.py", line 98 in __instancecheck__
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 130 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  File "C:\Users\Joey\pandas-joooeey\pandas\tests\dtypes\test_inference.py", line 131 in foo
  ...

(pandas-dev) C:\Users\Joey\pandas-joooeey>pytest pandas/tests/dtypes/test_inference.py
============================= test session starts =============================
platform win32 -- Python 3.8.2, pytest-5.4.2, py-1.8.1, pluggy-0.13.1
rootdir: C:\Users\Joey\pandas-joooeey, inifile: setup.cfg
plugins: hypothesis-5.15.0, asyncio-0.12.0, cov-2.8.1, forked-1.1.2, xdist-1.32.0
collected 447 items

pandas\tests\dtypes\test_inference.py .................................. [  7%]
........................................................................ [ 23%]
........................................................................ [ 39%]
........................................................................ [ 55%]
........................................................................ [ 72%]
........................................................................ [ 88%]
.....................................................                    [100%]

============================= 447 passed in 1.81s =============================

(pandas-dev) C:\Users\Joey\pandas-joooeey>

Problem description

pytest pandas fails at 22% with Windows fatal exception: stack overflow in test_inference.py line 131. According to the test file, the offending code is expected to raise a RecursionError.

Curiously, the following test runs green: pytest pandas/tests/dtypes/test_inference.py

Expected Output

When I run pytest pandas on the master branch (like I did), I expect the entire test suite to run green.

Output of pd.show_versions()

pd.show_versions()
Traceback (most recent call last):

  File "<ipython-input-3-3d232a07e144>", line 1, in <module>
    pd.show_versions()

  File "C:\Users\Joey\pandas-joooeey\pandas\util\_print_versions.py", line 106, in show_versions
    deps = _get_dependency_info()

  File "C:\Users\Joey\pandas-joooeey\pandas\util\_print_versions.py", line 86, in _get_dependency_info
    result[modname] = _get_version(mod) if mod else None

  File "C:\Users\Joey\pandas-joooeey\pandas\compat\_optional.py", line 43, in _get_version
    raise ImportError(f"Can't determine version for {module.__name__}")

ImportError: Can't determine version for hypothesis
@joooeey joooeey added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 10, 2020
@mroeschke mroeschke added Testing pandas testing functions or related to the test suite Windows Windows OS and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 10, 2020
@mzeitlin11
Copy link
Member

@joooeey would you mind checking to see if you still have this issue (or if any other windows users can reproduce?)

@joooeey
Copy link
Contributor Author

joooeey commented Jun 28, 2021

I'll have a look at it on the weekend.

@joooeey
Copy link
Contributor Author

joooeey commented Jul 9, 2021

I'm not sure how to run the test suite.

This is what I get:

(base) C:\Users\Joey>git clone https://github.com/joooeey/pandas.git pandas-joooeey
Cloning into 'pandas-joooeey'...
remote: Enumerating objects: 280071, done.
remote: Counting objects: 100% (1032/1032), done.
remote: Compressing objects: 100% (584/584), done.
remote: Total 280071 (delta 675), reused 658 (delta 447), pack-reused 279039R
Receiving objects: 100% (280071/280071), 225.69 MiB | 6.77 MiB/s, done.
Resolving deltas: 100% (233868/233868), done.
Updating files: 100% (2319/2319), done.

(base) C:\Users\Joey>cd pandas-joooeey

(base) C:\Users\Joey\pandas-joooeey>pytest pandas
ImportError while loading conftest 'C:\Users\Joey\pandas-joooeey\pandas\conftest.py'.
pandas\__init__.py:22: in <module>
    from pandas.compat import is_numpy_dev as _is_numpy_dev
pandas\compat\__init__.py:15: in <module>
    from pandas.compat.numpy import (
pandas\compat\numpy\__init__.py:7: in <module>
    from pandas.util.version import Version
pandas\util\__init__.py:1: in <module>
    from pandas.util._decorators import (  # noqa
pandas\util\_decorators.py:14: in <module>
    from pandas._libs.properties import cache_readonly  # noqa
pandas\_libs\__init__.py:13: in <module>
    from pandas._libs.interval import Interval
E   ModuleNotFoundError: No module named 'pandas._libs.interval'

Is there anything else I need to do to run the tests?

@mroeschke
Copy link
Member

Looks like this issue hasn't had much activity where other windows user were able to replicate the same behavior. Closing, but happy to reopen if we get a reproducer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Testing pandas testing functions or related to the test suite Windows Windows OS
Projects
None yet
Development

No branches or pull requests

3 participants