[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-12-03 Thread Warwick Chapman

Warwick Chapman  added the comment:

Ditto.

On Sun, 03 Dec 2017 at 16:53, INADA Naoki  wrote:

>
> INADA Naoki  added the comment:
>
> It seems it is merged in 2.7.14.
> But I can't find this in changelog of 2.7.14.
>
>
> https://raw.githubusercontent.com/python/cpython/c707893f9cee870bba8364b3a06eb9cfa3b80e58/Misc/NEWS
>
> --
>
> ___
> Python tracker 
> 
> ___
>
-- 
-- Warwick Bruce Chapman | 083 7797 094 | http://wa.rwick.com

--

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-12-03 Thread INADA Naoki

INADA Naoki  added the comment:

It seems it is merged in 2.7.14.
But I can't find this in changelog of 2.7.14.

https://raw.githubusercontent.com/python/cpython/c707893f9cee870bba8364b3a06eb9cfa3b80e58/Misc/NEWS

--

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-12-02 Thread Warwick Chapman

Warwick Chapman  added the comment:

Will this be released in 2.x as suggested by inada.naoki?

--
nosy: +Warwick Chapman

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-07-31 Thread Łukasz Langa

Łukasz Langa added the comment:


New changeset 3e37f4a11547a226c3c2f8bd612510465db397b9 by Łukasz Langa (INADA 
Naoki) in branch '2.7':
bpo-29519: weakref spewing exceptions during interp finalization (#2958)
https://github.com/python/cpython/commit/3e37f4a11547a226c3c2f8bd612510465db397b9


--

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-07-31 Thread INADA Naoki

INADA Naoki added the comment:

[gsutil](https://github.com/GoogleCloudPlatform/gsutil) shows massive 
"Exception ... ignored" message from this regression.
https://twitter.com/minimum2scp/status/890021408482316289

I think we should backport this fix to Python 2.7.14.

--
nosy: +inada.naoki
versions: +Python 2.7

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-07-31 Thread INADA Naoki

Changes by INADA Naoki :


--
pull_requests: +3006

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-02-10 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 6c961c5a5396ef125dbbc47c060272a5d12c1646 by Łukasz Langa in 
branch '3.5':
Fix #29519: weakref spewing exceptions during interp finalization
https://github.com/python/cpython/commit/6c961c5a5396ef125dbbc47c060272a5d12c1646


--

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-02-10 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 6c961c5a5396ef125dbbc47c060272a5d12c1646 by Łukasz Langa in 
branch '3.6':
Fix #29519: weakref spewing exceptions during interp finalization
https://github.com/python/cpython/commit/6c961c5a5396ef125dbbc47c060272a5d12c1646

New changeset 39279a07e8fc7bc14dcb948d970c12dbbf65ff40 by Łukasz Langa in 
branch '3.6':
Merge 3.5 (fix #29519)
https://github.com/python/cpython/commit/39279a07e8fc7bc14dcb948d970c12dbbf65ff40


--

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-02-10 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 6c961c5a5396ef125dbbc47c060272a5d12c1646 by Łukasz Langa in 
branch 'master':
Fix #29519: weakref spewing exceptions during interp finalization
https://github.com/python/cpython/commit/6c961c5a5396ef125dbbc47c060272a5d12c1646

New changeset 39279a07e8fc7bc14dcb948d970c12dbbf65ff40 by Łukasz Langa in 
branch 'master':
Merge 3.5 (fix #29519)
https://github.com/python/cpython/commit/39279a07e8fc7bc14dcb948d970c12dbbf65ff40

New changeset 8d6fcedf53048ff53cde91f7a55c1583456fa15e by Łukasz Langa in 
branch 'master':
Merge 3.6 (fix #29519)
https://github.com/python/cpython/commit/8d6fcedf53048ff53cde91f7a55c1583456fa15e


--

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-02-10 Thread Łukasz Langa

Łukasz Langa added the comment:

Given that the weakref behavior during shutdown with the repro was identical in 
3.6.0, as well as in 3.5.2 and earlier, I patched this by binding the name to a 
local, therefore making it usable also during finalization.

--
assignee: pitrou -> lukasz.langa
resolution:  -> fixed
stage:  -> 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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-02-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2cb530243943 by Łukasz Langa in branch '3.5':
Fix #29519: weakref spewing exceptions during interp finalization
https://hg.python.org/cpython/rev/2cb530243943

New changeset c5267272e66a by Łukasz Langa in branch '3.6':
Merge 3.5 (fix #29519)
https://hg.python.org/cpython/rev/c5267272e66a

New changeset e91ec62da088 by Łukasz Langa in branch 'default':
Merge 3.6 (fix #29519)
https://hg.python.org/cpython/rev/e91ec62da088

--
nosy: +python-dev

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-02-09 Thread Łukasz Langa

Łukasz Langa added the comment:

I have a pretty minimal repro. You'll have to download both `mod1.py` and 
`mod2.py` and execute `python3.6 mod1.py`. You'll see:

Exception ignored in: .remove at 
0x7fcb56b09400>
Traceback (most recent call last):
  File "/usr/local/fbcode/gcc-4.9-glibc-2.20-fb/lib/python3.6/weakref.py", line 
117, in remove
TypeError: 'NoneType' object is not callable

I can reproduce this both on CentOS 7 and macOS Sierra. I don't quite 
understand what makes this particular combination of instructions in the 
modules trigger the problem, I'd appreciate some explanation. AFAICT any 
additional simplification to the two modules makes it stop producing the spew.

Note: the spew doesn't happen with 3.6.0, only with master because it's 
directly caused by the missing global after the change in #28427.

--
Added file: http://bugs.python.org/file46617/mod1.py

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-02-09 Thread Łukasz Langa

Changes by Łukasz Langa :


Added file: http://bugs.python.org/file46618/mod2.py

___
Python tracker 

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



[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-02-09 Thread Łukasz Langa

New submission from Łukasz Langa:

Antoine, #28427 introduces a regression. When used with multiprocessing, the 
WeakValueDictionary in `multiprocessing.util._afterfork_registry` causes the 
`remove()` to be invoked during `atexit` and then `sys.meta_path` is None, lots 
of things is None, including the global `_remove_dead_weakref`.

In effect, I'm getting spew like this:

Exception ignored in: .remove at 
0x7fb2b905e2f0>
Traceback (most recent call last):
  File "/usr/local/fbcode/gcc-4.9-glibc-2.20-fb/lib/python3.6/weakref.py", line 
112, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: .remove at 
0x7fb2b905e2f0>
Traceback (most recent call last):
  File "/usr/local/fbcode/gcc-4.9-glibc-2.20-fb/lib/python3.6/weakref.py", line 
112, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: .remove at 
0x7fb2b905e2f0>
Traceback (most recent call last):
  File "/usr/local/fbcode/gcc-4.9-glibc-2.20-fb/lib/python3.6/weakref.py", line 
112, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: .remove at 
0x7fb2b905e2f0>
Traceback (most recent call last):
  File "/usr/local/fbcode/gcc-4.9-glibc-2.20-fb/lib/python3.6/weakref.py", line 
112, in remove
TypeError: 'NoneType' object is not callable

When debugged, this 'NoneType' is `_remove_dead_weakref` (weakref.py:117).

I'm working on a smaller repro, unfortunately this happens as part of a rather 
large multiprocessing app so this might take a while. Just wanted to let you 
know, maybe you'll know right away what the problem is.

--
assignee: pitrou
components: Library (Lib)
keywords: 3.5regression, 3.6regression
messages: 287475
nosy: lukasz.langa, pitrou
priority: normal
severity: normal
status: open
title: weakref spewing exceptions during finalization when combined with 
multiprocessing
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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