bloomberg / pytest-pystack

Pytest plugin that runs PyStack on slow or hanging tests.
Apache License 2.0
12 stars 2 forks source link

RuntimeError: can't create new thread at interpreter shutdown on Python 3.12 #8

Closed martyanov closed 9 months ago

martyanov commented 10 months ago

Is there an existing issue for this?

Current Behavior

Exception ignored in atexit callback: <function _stop at 0x7fcf97f30000>
Traceback (most recent call last):
  File "/usr/lib64/python3.12/site-packages/pytest_pystack/_monitor_process.py", line 73, in _stop
    queue.put(None)
  File "/usr/lib64/python3.12/multiprocessing/queues.py", line 94, in put
    self._start_thread()
  File "/usr/lib64/python3.12/multiprocessing/queues.py", line 177, in _start_thread
    self._thread.start()
  File "/usr/lib64/python3.12/threading.py", line 971, in start
    _start_new_thread(self._bootstrap, ())
RuntimeError: can't create new thread at interpreter shutdown

Expected Behavior

No errors.

Steps To Reproduce

Run test suite with pytest-pystack==1.0.0 and pystack_args="--native --locals".

Pystack Version

1.3.0

Python Version

3.12

Linux distribution

Fedora

Anything else?

pytest 7.4.3 pytest-xdist 3.5.0

Can not really provide any project specific details, just tried to update to Python 3.12 and got the errors.

godlygeek commented 9 months ago

Oof, that was fixed in #6 but never released - we somehow lost track of #7.

OK, let's get a release cut that fixes that...

godlygeek commented 9 months ago

Fixed now that #7 has landed.