Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Exception ignored in atexit callback / RuntimeError: can't create new thread at interpreter shutdown

未關閉
#271 4 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

@RonnyPfannschmidt 已經在處理了。

開始於 2024年4月14日。

評估

這個 Issue 還沒有評估資料。

描述

bug

Trying to update the Fedora RPM to 2.1.1, I see this:

+ cd execnet-2.1.1
+ PYTEST_SELECT='not test_popen_io[gevent-sys.executable]'
+ PYTEST_SELECT+=' and not [gevent-socket]'
+ PYTEST_SELECT+=' and not [eventlet-socket]'
+ PYTEST_SELECT+=' and not [python2.7]'
++ pwd
+ PYTHONPATH=.../execnet-2.1.1/src
+ py.test-3.12 -r s -k 'not test_popen_io[gevent-sys.executable] and not [gevent-socket] and not [eventlet-socket] and not [python2.7]' testing --timeout=30
============================= test session starts ==============================
platform linux -- Python 3.12.2, pytest-7.3.2, pluggy-1.2.0
rootdir: .../execnet-2.1.1
configfile: tox.ini
plugins: timeout-2.1.0, hypothesis-6.82.0, forked-1.6.0, anyio-3.7.0, cov-4.0.0
timeout: 30.0s
timeout method: signal
timeout func_only: False
collected 1095 items / 103 deselected / 992 selected

testing/test_basics.py ...............s.s.s.......                       [  2%]
testing/test_channel.py ..s...s...s...s...s...s...s...s...s...s...s...s. [  7%]
..s...s...s...s...s...s...s...s...s...s...s...s...s...s...s...s...s...s. [ 14%]
                                                                         [ 14%]
testing/test_gateway.py ..s...s...s...s...s...s.XXsX..s...s...s...s...s. [ 19%]
..s...s...s...s...s...s...s...s....ssss                                  [ 23%]
testing/test_multi.py ..s.xX                                             [ 24%]
testing/test_termination.py .s.xs                                        [ 24%]
testing/test_threadpool.py ......x.......                                [ 26%]
testing/test_basics.py .s.s.......                                       [ 27%]
testing/test_channel.py ..s...s...s...s...s...s...s...s...s...s...s...s. [ 32%]
..s...s...s...s...s...s...s...s...s...s...s...s...s...s...s...s...s...s. [ 39%]
                                                                         [ 39%]
testing/test_gateway.py ..s...s...s...s...s...s.XXsX..s...s...s...s...s. [ 44%]
..s...s...s...s...s...s...s...s....ss..                                  [ 48%]
testing/test_multi.py ..s.xX                                             [ 48%]
testing/test_termination.py .s.xs                                        [ 49%]
testing/test_threadpool.py ......x.......                                [ 50%]
testing/test_basics.py .s.s.......                                       [ 51%]
testing/test_channel.py .s..s..s..s..s..s..s..s..s..s..s..s..s..s..s..s. [ 56%]
.s..s..s..s..s..s..s..s..s..s..s..s..s..s.                               [ 60%]
testing/test_gateway.py .s..s..s..s..s..s.XsX.s..s..s..s..s..s..s..s..s. [ 65%]
.s..s..s..s....ssss                                                      [ 67%]
testing/test_multi.py .s.xx                                              [ 68%]
testing/test_termination.py .sxxs                                        [ 68%]
testing/test_threadpool.py ......x......s                                [ 69%]
testing/test_basics.py .ss.......                                        [ 70%]
testing/test_channel.py .s..s..s..s..s..s..s..s..s..s..s..s..s..s..s..s. [ 75%]
.s..s..s..s..s..s..s..s..s..s..s..s..s..s.                               [ 80%]
testing/test_gateway.py .s..s..s..s..s..s.XsX.s..s..s..s..s..s..s..s..s. [ 84%]
.s..s..s..s....ssss                                                      [ 86%]
testing/test_multi.py .s.xx                                              [ 87%]
testing/test_termination.py .sxxs                                        [ 87%]
testing/test_threadpool.py ......x......s                                [ 89%]
testing/test_basics.py .s.s............s..                               [ 91%]
testing/test_compatibility_regressions.py .                              [ 91%]
testing/test_gateway.py ........X.X......x                               [ 93%]
testing/test_multi.py ..............                                     [ 94%]
testing/test_rsync.py ...........                                        [ 95%]
testing/test_serializer.py ................                              [ 97%]
testing/test_termination.py ..s                                          [ 97%]
testing/test_xspec.py ...............X....ssss.                          [100%]

=========================== short test summary info ============================
SKIPPED [1] testing/test_basics.py:70: no pypy3 found
SKIPPED [4] testing/test_basics.py:179: no pypy3 found
SKIPPED [4] testing/test_basics.py:187: no pypy3 found
SKIPPED [4] testing/test_channel.py:19: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:24: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:28: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:36: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:42: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:49: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:62: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:68: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:73: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:78: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:86: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:94: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:104: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:119: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:132: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:157: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:174: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:192: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:210: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:249: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:256: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:273: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:287: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:310: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:325: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:333: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:347: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:363: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:371: no 'gspecs' option found
SKIPPED [4] testing/test_channel.py:384: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:35: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:41: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:44: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:49: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:53: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:69: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:78: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:100: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:113: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:146: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:186: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:197: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:201: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:205: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:209: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:214: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:220: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:231: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:248: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:265: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:398: no 'gspecs' option found
SKIPPED [4] testing/test_gateway.py:401: no 'gspecs' option found
SKIPPED [3] testing/test_gateway.py:571: can only run with main_thread_only
SKIPPED [3] testing/test_gateway.py:610: can only run with main_thread_only
SKIPPED [4] testing/test_multi.py:22: no 'gspecs' option found
SKIPPED [4] testing/test_termination.py:24: no pypy3 found
SKIPPED [4] testing/test_termination.py:111: no pypy3 found
SKIPPED [2] testing/test_threadpool.py:196: can only run with threading
SKIPPED [1] testing/test_basics.py:217: no pypy3 found
SKIPPED [1] testing/test_basics.py:233: no pypy3 found
SKIPPED [1] testing/test_basics.py:433: no pypy3 found
SKIPPED [1] testing/test_termination.py:84: no pypy3 found
SKIPPED [1] testing/test_xspec.py:198: no 'gspecs' option found
SKIPPED [1] testing/test_xspec.py:206: Vagrant binary not in PATH
SKIPPED [1] testing/test_xspec.py:227: no 'gspecs' option found
SKIPPED [1] testing/test_xspec.py:238: no 'gspecs' option found
= 715 passed, 245 skipped, 103 deselected, 17 xfailed, 15 xpassed in 61.38s (0:01:01) =
Exception ignored in atexit callback: <bound method Group._cleanup_atexit of <Group []>>
Traceback (most recent call last):
  File ".../execnet-2.1.1/src/execnet/multi.py", line 208, in _cleanup_atexit
    self.terminate(timeout=1.0)
  File ".../execnet-2.1.1/src/execnet/multi.py", line 237, in terminate
    safe_terminate(
  File ".../execnet-2.1.1/src/execnet/multi.py", line 345, in safe_terminate
    reply = workerpool.spawn(termkill, termfunc, killfunc)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../execnet-2.1.1/src/execnet/gateway_base.py", line 452, in spawn
    self.execmodel.start(self._perform_spawn, (reply,))
  File ".../execnet-2.1.1/src/execnet/gateway_base.py", line 155, in start
    _thread.start_new_thread(func, args)
RuntimeError: can't create new thread at interpreter shutdown
Exception ignored in atexit callback: <bound method Group._cleanup_atexit of <Group []>>
Traceback (most recent call last):
  File ".../execnet-2.1.1/src/execnet/multi.py", line 208, in _cleanup_atexit
    self.terminate(timeout=1.0)
  File ".../execnet-2.1.1/src/execnet/multi.py", line 237, in terminate
    safe_terminate(
  File ".../execnet-2.1.1/src/execnet/multi.py", line 345, in safe_terminate
    reply = workerpool.spawn(termkill, termfunc, killfunc)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../execnet-2.1.1/src/execnet/gateway_base.py", line 452, in spawn
    self.execmodel.start(self._perform_spawn, (reply,))
  File ".../execnet-2.1.1/src/execnet/gateway_base.py", line 155, in start
    _thread.start_new_thread(func, args)
RuntimeError: can't create new thread at interpreter shutdown
Exception ignored in atexit callback: <bound method Group._cleanup_atexit of <Group []>>
Traceback (most recent call last):
  File ".../execnet-2.1.1/src/execnet/multi.py", line 208, in _cleanup_atexit
    self.terminate(timeout=1.0)
  File ".../execnet-2.1.1/src/execnet/multi.py", line 237, in terminate
    safe_terminate(
  File ".../execnet-2.1.1/src/execnet/multi.py", line 345, in safe_terminate
    reply = workerpool.spawn(termkill, termfunc, killfunc)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../execnet-2.1.1/src/execnet/gateway_base.py", line 452, in spawn
    self.execmodel.start(self._perform_spawn, (reply,))
  File ".../execnet-2.1.1/src/execnet/gateway_base.py", line 155, in start
    _thread.start_new_thread(func, args)
RuntimeError: can't create new thread at interpreter shutdown

Not sure what exactly causes it.

主要語言
Python
星號
103
分支
49
PR 合併指標
30 天內沒有已合併 PR

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

pytest-dev/execnet 的其他 Issue

查看 pytest-dev/execnet 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。