This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [subinterpreters] Test Py_Finalize() from a subinterpreter
Type: Stage: resolved
Components: Subinterpreters, Tests Versions: Python 3.9
process
Status: closed Resolution: duplicate
Dependencies: Superseder: [subinterpreters] Can Py_Finalize() be called if the current interpreter is not the main interpreter?
View: 38865
Assigned To: Nosy List: LewisGaul, eric.snow, nanjekyejoannah, ncoghlan, vstinner
Priority: normal Keywords: patch

Created on 2019-08-06 17:43 by nanjekyejoannah, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17575 open LewisGaul, 2020-10-25 15:55
Messages (5)
msg349123 - (view) Author: Joannah Nanjekye (nanjekyejoannah) * (Python committer) Date: 2019-08-06 17:43
Am opening a test request from @ncoghlan from the discussing on issue 36225.

There is a need to add a test that exercises what happens when Py_Finalize() is called from a sub-interpreter rather than the main interpreter.
msg358349 - (view) Author: Lewis Gaul (LewisGaul) * Date: 2019-12-13 18:21
It seems that test_audit_subinterpreter() in _testembed.c was (unintentionally?) doing this already.

After fixing #36225 I found this testcase causes a segfault, but works fine when switching back to the main threadstate before calling Py_Finalize().

So it looks like adding a specific testcase for this is likely to weed out an actual issue here!
msg358357 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2019-12-13 21:33
On Fri, Dec 13, 2019 at 11:22 AM Lewis Gaul <report@bugs.python.org> wrote:
> So it looks like adding a specific testcase for this is likely to weed out an actual issue here!

+1
msg363786 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-03-09 23:22
See also bpo-38865.
msg411120 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-01-21 12:34
I mark this issue as a duplicate of bpo-38865.
History
Date User Action Args
2022-04-11 14:59:18adminsetgithub: 81957
2022-01-21 12:34:50vstinnersetstatus: open -> closed
superseder: [subinterpreters] Can Py_Finalize() be called if the current interpreter is not the main interpreter?
messages: + msg411120

resolution: duplicate
stage: patch review -> resolved
2020-10-25 15:55:15LewisGaulsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request21890
2020-05-15 00:40:17vstinnersetcomponents: + Subinterpreters
title: Test Py_Finalize() from a subinterpreter -> [subinterpreters] Test Py_Finalize() from a subinterpreter
2020-03-09 23:22:05vstinnersetnosy: + vstinner
messages: + msg363786
2019-12-13 21:33:48eric.snowsetmessages: + msg358357
2019-12-13 18:21:58LewisGaulsetnosy: + LewisGaul
messages: + msg358349
2019-08-06 17:46:05nanjekyejoannahsetstage: needs patch
components: + Tests
versions: + Python 3.9
2019-08-06 17:43:30nanjekyejoannahcreate