Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

_PyEval_SetTrace() fails with RuntimeError: Cannot install a trace function while another trace function is being installed #98257

Closed
Labels
type-bugAn unexpected behavior, bug, or error
@vstinner

Description

@vstinner

The test_concurrency() of test_import fails randomly on sys.settrace(). Example:

$ ./python -m test test_import -m test_concurrency -v -j30 -F --fail-env-changed (...)0:00:13 load avg: 12.46 [ 97/1] test_import failed (env changed)test_concurrency (test.test_import.ImportTests) ... ok----------------------------------------------------------------------Ran 1 test in 0.487sOKWarning -- Uncaught thread exception: RuntimeErrorException in thread Thread-13 (run):Traceback (most recent call last):  File "/home/vstinner/python/3.10/Lib/threading.py", line 1016, in _bootstrap_inner    self.run()  File "/home/vstinner/python/3.10/Lib/threading.py", line 953, in run    self._target(*self._args, **self._kwargs)  File "/home/vstinner/python/3.10/Lib/test/test_import/__init__.py", line 457, in run    sys.settrace(None)RuntimeError: Cannot install a trace function while another trace function is being installed(...)

The problem is that the _PyEval_SetTrace() function fails with RuntimeError("Cannot install a trace function while another trace function is being installed") onPy_XDECREF(traceobj); indirectly callssys.settrace().

IMOPy_XDECREF(traceobj); should be calledafterreentrant = 0;, at the end of the function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp