[issue33612] Assertion failure in PyThreadState_Clear

2018-05-24 Thread STINNER Victor
STINNER Victor added the comment: > Thank you for fixing this Victor! You're welcome. It's always a pleasure to remove code! -- ___ Python tracker

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for fixing this Victor! -- ___ Python tracker ___

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread STINNER Victor
STINNER Victor added the comment: Mark Shannon, the author of the assertion, approved my PR to remove the assertion: https://github.com/python/cpython/pull/7069#issuecomment-391342700 The initial issue, the failing assertion, has been fixed. Well, to be honest, I failed

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread Ned Deily
Ned Deily added the comment: New changeset 508d7693bc09affd99fdaa4a321cc3da0638c8a0 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33612: Remove PyThreadState_Clear() assertion (GH-7069) (GH-7074)

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +6704 ___ Python tracker ___

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset b6dccf54fd3bac9c87348d96f9d6b571608c15bc by Victor Stinner in branch 'master': bpo-33612: Remove PyThreadState_Clear() assertion (#7069) https://github.com/python/cpython/commit/b6dccf54fd3bac9c87348d96f9d6b571608c15bc

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 23/05/2018 à 13:57, STINNER Victor a écrit : > > I agree that in a perfect world, Python should cleanup everything properly, > but in the current world, daemon threads and fork are a mess full of corner > cases like this one. For now, we

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread STINNER Victor
STINNER Victor added the comment: > Yes, simply removing the assertion feels more like a copout than an actual > fix. We are very close to the 3.7rc1, so I suggest to remove the assertion, just to get more time to fix the issue. -- I agree that in a perfect world,

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, simply removing the assertion feels more like a copout than an actual fix. (perhaps it *is* the right fix to the issue, but it would be nice to find out why :-)) -- ___ Python tracker

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The assertion looked good to me when I reviewed this code, and I don't understand why it fails. Maybe it would be better to fix the case in which tstate->exc_info->previous_item != NULL before calling PyThreadState_Clear().

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +6697 stage: -> patch review ___ Python tracker ___

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread STINNER Victor
STINNER Victor added the comment: I created PR 7069 to remove the assertion. With this change, attached bug.py doesn't crash anymore, but it still logs warnings in verbose mode: vstinner@apu$ ./python -v bug.py (...) PyThreadState_Clear: warning: thread still has a frame

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread STINNER Victor
STINNER Victor added the comment: Attached bug.py reproduces the bug with a daemonic thread but without fork(): $ ./python bug.py ls coredpython: Python/pystate.c:589: PyThreadState_Clear: Assertion `tstate->exc_info->previous_item == NULL' failed. Aborted (core dumped)

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-33613: "test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error". I don't think that it's directly related. -- ___ Python tracker

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread STINNER Victor
STINNER Victor added the comment: Failing assertion: /* The stack of exception states should contain just this thread. */ assert(tstate->exc_info->previous_item == NULL); "test_multiprocessing_fork passed in 9 min 13 sec" Oh. A child process crashed on "self.pid

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread STINNER Victor
STINNER Victor added the comment: The assertion has been added by bpo-25612: commit ae3087c6382011c47db82fea4d05f8bbf514265d Author: Mark Shannon Date: Sun Oct 22 22:41:51 2017 +0100 Move exc state to generator. Fixes bpo-25612 (#1773) Move

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread Antoine Pitrou
Change by Antoine Pitrou : -- priority: normal -> critical ___ Python tracker ___ ___

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +vstinner ___ Python tracker ___ ___

[issue33612] Assertion failure in PyThreadState_Clear

2018-05-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : I got the following output when run tests in the huntrleaks mode. $ ./python -We -m test -R 3:3 -x test_builtin -x test_urlparse ... 1:24:54 load avg: 2.48 [225/414] test_multiprocessing_fork beginning 6 repetitions 123456