classification
Title: [subinterpreters] Test Py_Finalize() from a subinterpreter
Type: Stage: needs patch
Components: Subinterpreters, Tests Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: LewisGaul, eric.snow, nanjekyejoannah, ncoghlan, vstinner
Priority: normal Keywords:

Created on 2019-08-06 17:43 by nanjekyejoannah, last changed 2020-05-15 00:40 by vstinner.

Messages (4)
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.
History
Date User Action Args
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