[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2019-09-24 Thread miss-islington


miss-islington  added the comment:


New changeset 081641fe520382d48ffead158ab528180f72017d by Miss Islington (bot) 
in branch '3.8':
bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349)
https://github.com/python/cpython/commit/081641fe520382d48ffead158ab528180f72017d


--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2019-09-24 Thread miss-islington


miss-islington  added the comment:


New changeset 46f6c566a888fb637913ef71fed28568180eafb4 by Miss Islington (bot) 
in branch '3.7':
bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349)
https://github.com/python/cpython/commit/46f6c566a888fb637913ef71fed28568180eafb4


--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2019-09-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15931
pull_request: https://github.com/python/cpython/pull/16352

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2019-09-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15933
pull_request: https://github.com/python/cpython/pull/16353

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2019-09-24 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b0e1ae5f5430433766e023c1a6936aeba0f2b84e by Victor Stinner in 
branch 'master':
bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349)
https://github.com/python/cpython/commit/b0e1ae5f5430433766e023c1a6936aeba0f2b84e


--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2019-09-24 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15927
pull_request: https://github.com/python/cpython/pull/16349

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

I fixed the test in 3.6, 3.7 and master branches.

--
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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread miss-islington


miss-islington  added the comment:


New changeset a599323fc7661668a01e9fbb0d2369e62941bdf1 by Miss Islington (bot) 
in branch '3.6':
bpo-30356: Fix test_mymanager_context() of multiprocessing (GH-7968)
https://github.com/python/cpython/commit/a599323fc7661668a01e9fbb0d2369e62941bdf1


--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread miss-islington


miss-islington  added the comment:


New changeset 34f2935dca7bb20cd87e42dc41985cc3d688a735 by Miss Islington (bot) 
in branch '3.7':
bpo-30356: Fix test_mymanager_context() of multiprocessing (GH-7968)
https://github.com/python/cpython/commit/34f2935dca7bb20cd87e42dc41985cc3d688a735


--
nosy: +miss-islington

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

The bug can easily be reproduced on Linux using this change:

diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
index 04df26bac6..3d952407c2 100644
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -649,7 +649,7 @@ class BaseManager(object):
 except Exception:
 pass
 
-process.join(timeout=1.0)
+process.join(timeout=0.0)
 if process.is_alive():
 util.info('manager still alive')
 if hasattr(process, 'terminate'):

--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset fbd7172325e6ce55b6d5d3d7603e4c1c8a219cb8 by Victor Stinner in 
branch 'master':
bpo-30356: Fix test_mymanager_context() of multiprocessing (GH-7968)
https://github.com/python/cpython/commit/fbd7172325e6ce55b6d5d3d7603e4c1c8a219cb8


--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7578

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7577

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

> I see different options: (...) * Allow -signal.SIGTERM exit code in 
> test_mymanager_context()

When I discussed with Davin, he told me that it's an acceptable solution.

So I wrote the PR 7968 to implement this trivial fix.

--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

Python 2.7 terminates the manager process if it takes longer than 200 ms to 
stop (Python 3 uses a limit of 1 second), but test_multiprocessing doesn't test 
the exit code of the manager process and so Python 2.7 is not impacted by this 
bug.

--
versions: +Python 3.6, Python 3.8

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2017-09-18 Thread STINNER Victor

STINNER Victor added the comment:

Similar issue: bpo-31510.

--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2017-05-15 Thread STINNER Victor

STINNER Victor added the comment:

> manager._process.exitcode == -15

-15 is -signal.SIGTERM and comes from Popen.wait() of 
multiprocessing.popen_spawn_win32.

res = _winapi.WaitForSingleObject(int(self._handle), msecs)
if res == _winapi.WAIT_OBJECT_0:
code = _winapi.GetExitCodeProcess(self._handle)
if code == TERMINATE:
code = -signal.SIGTERM

The process exited and its exit code is 0x1 (TERMINATE).

I understand that Popen.terminate() of multiprocessing.popen_spawn_win32 was 
called.

BaseManager.start() registers a finalizer: _finalize_manager(). This method 
sends a "shutdown" message to the process and then gives 1.0 second to the 
process to complete. If the process doesn't complete in 1 second, .terminate() 
is called.

1 second is kind of arbitrary: it depends on the system load. We should give 
more time to the manager to complete, or accept -signal.SIGTERM as a "valid" 
exit code.

I see different options:

* Shutdown the manager in test_multiprocessing and give more time to the 
manager to complete
* Make the timeout configurable
* Allow -signal.SIGTERM exit code in test_mymanager_context()

--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2017-05-12 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/601/steps/test/logs/stdio

==
FAIL: test_mymanager_context 
(test.test_multiprocessing_spawn.WithManagerTestMyManager)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 2232, in test_mymanager_context
self.assertEqual(manager._process.exitcode, 0)
AssertionError: -15 != 0

--
Ran 277 tests in 667.577s

FAILED (failures=1, skipped=24)
test test_multiprocessing_spawn failed

--
components: Tests, Windows
messages: 293585
nosy: davin, haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: test_mymanager_context() of test_multiprocessing_spawn: 
manager._process.exitcode=-15 on x86 Windows7 3.x
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