[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-05-04 Thread miss-islington


miss-islington  added the comment:


New changeset 70fe95cdc9ac1b00d4f86b7525dca80caf7003e1 by Miss Islington (bot) 
in branch '3.8':
bpo-40135: Fix multiprocessing test_shared_memory_across_processes() (GH-19892)
https://github.com/python/cpython/commit/70fe95cdc9ac1b00d4f86b7525dca80caf7003e1


--

___
Python tracker 

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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the fix Hai Shi!

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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-05-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +19217
pull_request: https://github.com/python/cpython/pull/19903

___
Python tracker 

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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-05-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset caa3ef284a2e5e5b9bdd6a9e619804122c842d80 by Hai Shi in branch 
'master':
bpo-40135: Fix multiprocessing test_shared_memory_across_processes() (GH-19892)
https://github.com/python/cpython/commit/caa3ef284a2e5e5b9bdd6a9e619804122c842d80


--

___
Python tracker 

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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-05-03 Thread hai shi


hai shi  added the comment:

The easy way to fix this test case is that don't define the shared memory 
block's name. `test_shared_memory_basics` has tested against the shared memory 
block's name, so canceling the shared memory block'name has no side-effect.

--

___
Python tracker 

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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-05-03 Thread hai shi


Change by hai shi :


--
keywords: +patch
nosy: +shihai1991
nosy_count: 1.0 -> 2.0
pull_requests: +19203
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19892

___
Python tracker 

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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-04-01 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3.7 is not affected: it doesn't have 
test_shared_memory_across_processes().

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



[issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel

2020-04-01 Thread STINNER Victor


New submission from STINNER Victor :

Sometimes, I need to run multiprocessing tests multiple times in parallel to 
attempt to reproduce a race condition. Except that 
test_shared_memory_across_processes() fails in this case:

$ ./python -m test test_multiprocessing_spawn --fail-env-changed -v -j4 -F -m 
test_shared_memory_across_processes 

== CPython 3.9.0a5+ (heads/master:17b4733f2f, Apr 1 2020, 15:02:04) [GCC 9.2.1 
20190827 (Red Hat 9.2.1-1)]
== Linux-5.5.9-200.fc31.x86_64-x86_64-with-glibc2.30 little-endian
== cwd: /home/vstinner/python/master/build/test_python_1133450
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 1.64 Run tests in parallel using 4 child processes
0:00:01 load avg: 1.64 [  1/1] test_multiprocessing_spawn failed
test_shared_memory_across_processes 
(test.test_multiprocessing_spawn.WithProcessesTestSharedMemory) ... ERROR

==
ERROR: test_shared_memory_across_processes 
(test.test_multiprocessing_spawn.WithProcessesTestSharedMemory)
--
Traceback (most recent call last):
  File "/home/vstinner/python/master/Lib/test/_test_multiprocessing.py", line 
3862, in test_shared_memory_across_processes
sms = shared_memory.SharedMemory('test02_tsmap', True, size=512)
  File "/home/vstinner/python/master/Lib/multiprocessing/shared_memory.py", 
line 100, in __init__
self._fd = _posixshmem.shm_open(
FileExistsError: [Errno 17] File exists: '/test02_tsmap'

--

Ran 1 test in 0.247s

FAILED (errors=1)
test test_multiprocessing_spawn failed
Kill  process group
Kill  process group
Kill  process group

== Tests result: FAILURE ==

1 test failed:
test_multiprocessing_spawn

Total duration: 1.2 sec
Tests result: FAILURE

--
components: Tests
messages: 365462
nosy: vstinner
priority: normal
severity: normal
status: open
title: multiprocessing: test_shared_memory_across_processes() cannot be run 
twice in parallel
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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