Message293717
> 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 0x10000 (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() |
|
Date |
User |
Action |
Args |
2017-05-15 15:48:38 | vstinner | set | recipients:
+ vstinner, paul.moore, tim.golden, zach.ware, steve.dower, davin |
2017-05-15 15:48:38 | vstinner | set | messageid: <1494863318.76.0.122731545758.issue30356@psf.upfronthosting.co.za> |
2017-05-15 15:48:38 | vstinner | link | issue30356 messages |
2017-05-15 15:48:38 | vstinner | create | |
|