[issue31420] Reference leaks introduced by bpo-30860

2017-09-14 Thread Eric Snow

Eric Snow added the comment:


New changeset dae0276bb6bc7281d59fb0b8f1aab31634ee80dc by Eric Snow in branch 
'master':
bpo-30860: Fix a refleak. (#3567)
https://github.com/python/cpython/commit/dae0276bb6bc7281d59fb0b8f1aab31634ee80dc


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31420] Reference leaks introduced by bpo-30860

2017-09-14 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +3557

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31420] Reference leaks introduced by bpo-30860

2017-09-11 Thread Eric Snow

Changes by Eric Snow :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31420] Reference leaks introduced by bpo-30860

2017-09-11 Thread Eric Snow

Changes by Eric Snow :


--
keywords: +patch
pull_requests: +3500
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31420] Reference leaks introduced by bpo-30860

2017-09-11 Thread Eric Snow

Eric Snow added the comment:

Moving warnoptions (and xoptions) out of PyInterpreterState seems like a good 
idea to me for the same reasons as applied to sys.modules.  The case for these 
two is even stronger since they are only used in sysmodule.c.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31420] Reference leaks introduced by bpo-30860

2017-09-11 Thread Eric Snow

Changes by Eric Snow :


--
assignee:  -> eric.snow

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31420] Reference leaks introduced by bpo-30860

2017-09-11 Thread Eric Snow

Eric Snow added the comment:

I'm looking into this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31420] Reference leaks introduced by bpo-30860

2017-09-11 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31420] Reference leaks introduced by bpo-30860

2017-09-11 Thread STINNER Victor

STINNER Victor added the comment:

Extract of my msg295399: "The problem is that warnoptions is stored in a C 
global variable *and* in sys.warnoptions of each interpreter. The ownership of 
this variable is unclear."

Maybe we need a change similar to bpo-28411 (commit 
86b7afdfeee77993fe896a2aa13b3f4f95973f16) which removed the "modules" field 
from Py_InterpreterState.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31420] Reference leaks introduced by bpo-30860

2017-09-11 Thread STINNER Victor

STINNER Victor added the comment:

The leak comes from the following lines of _PySys_EndInit():
---
PyObject *warnoptions = get_warnoptions();
if (warnoptions == NULL)
return -1;
SET_SYS_FROM_STRING_BORROW_INT_RESULT("warnoptions", warnoptions);

PyObject *xoptions = get_xoptions();
if (xoptions == NULL)
return -1;
SET_SYS_FROM_STRING_BORROW_INT_RESULT("_xoptions", xoptions);
---

It's not the first time that I have an issue with these attributes. The last 
reference weak caused by multiple interpreters was also related to this one if 
I recall correctly.

See bpo-30598 and my commit 865de27dd79571a4a5c7a7d22a07fb909c4a9f8e.

--
nosy: +eric.smith, ncoghlan

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31420] Reference leaks introduced by bpo-30860

2017-09-11 Thread Stefan Krah

Stefan Krah added the comment:

Could be the same as #31408.

--
nosy: +skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31420] Reference leaks introduced by bpo-30860

2017-09-11 Thread STINNER Victor

STINNER Victor added the comment:

> The following commands show memory leaks introduced by bpo-30860:

Oh, I'm talking about the commit 2ebc5ce42a8a9e047e790aefbf9a94811569b2b6.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31420] Reference leaks introduced by bpo-30860

2017-09-11 Thread STINNER Victor

New submission from STINNER Victor:

The following commands show memory leaks introduced by bpo-30860:

$ ./python -m test -R 3:3 test_atexit -m 
test.test_atexit.SubinterpreterTest.test_callbacks_leak

$ ./python -m test -R 3:3 test_atexit -m 
test.test_atexit.SubinterpreterTest.test_callbacks_leak_refcycle

$ ./python -m test -R 3:3 test_threading -m 
test.test_threading.SubinterpThreadingTests.test_threads_join

$ ./python -m test -R 3:3 test_capi -m 
test.test_capi.SubinterpreterTest.test_subinterps

--
messages: 301882
nosy: haypo
priority: normal
severity: normal
status: open
title: Reference leaks introduced by bpo-30860
type: resource usage
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com