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

Revert: bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (GH-11617) #12159

Merged
merged 4 commits into from
Mar 4, 2019
Merged

Revert: bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (GH-11617) #12159

merged 4 commits into from
Mar 4, 2019

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 4, 2019

https://bugs.python.org/issue33608

@vstinner
Copy link
Member Author

vstinner commented Mar 4, 2019

The world hates me: I wrote this PR to fix https://bugs.python.org/issue36114 race condition, but test__xxsubinterpreters failed on AppVeyor :-(

https://ci.appveyor.com/project/python/cpython/builds/22802115

test_bad_id (test.test__xxsubinterpreters.ChannelIDTests) ... Fatal Python error: Py_EndInterpreter: thread still has a frame
Current thread 0x00001338 (most recent call first):
  File "C:\projects\cpython\lib\test\test__xxsubinterpreters.py", line 297 in tearDown
  File "C:\projects\cpython\lib\unittest\case.py", line 645 in run
  File "C:\projects\cpython\lib\unittest\case.py", line 702 in __call__
  File "C:\projects\cpython\lib\unittest\suite.py", line 122 in run
  File "C:\projects\cpython\lib\unittest\suite.py", line 84 in __call__
  File "C:\projects\cpython\lib\unittest\suite.py", line 122 in run
  File "C:\projects\cpython\lib\unittest\suite.py", line 84 in __call__
  File "C:\projects\cpython\lib\unittest\suite.py", line 122 in run
  File "C:\projects\cpython\lib\unittest\suite.py", line 84 in __call__
  File "C:\projects\cpython\lib\unittest\runner.py", line 176 in run
  File "C:\projects\cpython\lib\test\support\__init__.py", line 1968 in _run_suite
  File "C:\projects\cpython\lib\test\support\__init__.py", line 2064 in run_unittest
  File "C:\projects\cpython\lib\test\libregrtest\runtest.py", line 178 in test_runner
  File "C:\projects\cpython\lib\test\libregrtest\runtest.py", line 182 in runtest_inner
  File "C:\projects\cpython\lib\test\libregrtest\runtest.py", line 137 in runtest
  File "C:\projects\cpython\lib\test\libregrtest\main.py", line 305 in rerun_failed_tests
  File "C:\projects\cpython\lib\test\libregrtest\main.py", line 623 in _main
  File "C:\projects\cpython\lib\test\libregrtest\main.py", line 586 in main
  File "C:\projects\cpython\lib\test\libregrtest\main.py", line 640 in main
  File "C:\projects\cpython\lib\test\__main__.py", line 2 in <module>
  File "C:\projects\cpython\lib\runpy.py", line 85 in _run_code
  File "C:\projects\cpython\lib\runpy.py", line 192 in _run_module_as_main
C:\projects\cpython>set lastexitcode=-1073740791 

@vstinner vstinner requested a review from a team as a code owner March 4, 2019 13:03
@vstinner
Copy link
Member Author

vstinner commented Mar 4, 2019

My intent is to revert the commit ef4ac96, but sadly I had to also revert 3 commits written by Eric Snow which are based on this commit :-( I would prefer to revert a single commit, but I had to revert 4 commits :-(

@vstinner
Copy link
Member Author

vstinner commented Mar 4, 2019

This PR reverts the commit ef4ac96 because it introduced multiple regressions:

@vstinner
Copy link
Member Author

vstinner commented Mar 4, 2019

I tested manually this PR and I confirm that it fix https://bugs.python.org/issue36114

I stressed my FreeBSD 12 VM with test_multiprocessing_spawn:

  • Without this change, I can reliably reproduce https://bugs.python.org/issue36114 crash
  • With this change, WithThreadsTestManagerRestart.test_rapid_restart() doesn't crash anymore.

@vstinner vstinner merged commit 4d61e6e into python:master Mar 4, 2019
@vstinner vstinner deleted the revert_pending_call branch March 4, 2019 13:21
ericsnowcurrently added a commit that referenced this pull request Apr 12, 2019
gh-12360)

This is effectively an un-revert of #11617 and #12024 (reverted in #12159). Portions of those were merged in other PRs (with lower risk) and this represents the remainder. Note that I found 3 different bugs in the original PRs and have fixed them here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants