Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiprocessing test_shared_memory_recreate is not concurrency-safe #95212

Closed
tiran opened this issue Jul 24, 2022 · 1 comment
Closed

multiprocessing test_shared_memory_recreate is not concurrency-safe #95212

tiran opened this issue Jul 24, 2022 · 1 comment
Assignees
Labels
3.10 only security fixes 3.11 only security fixes 3.12 bugs and security fixes tests Tests in the Lib/test dir triaged The issue has been accepted as valid by a triager. type-bug An unexpected behavior, bug, or error

Comments

@tiran
Copy link
Member

tiran commented Jul 24, 2022

Bug report

The test cases

  • test.test_multiprocessing_spawn.WithProcessesTestSharedMemory.test_shared_memory_recreate
  • test.test_multiprocessing_fork.WithProcessesTestSharedMemory.test_shared_memory_recreate
  • test.test_multiprocessing_forkserver.WithProcessesTestSharedMemory.test_shared_memory_recreate

are not concurrency-safe because they all use the same semaphore name. A left-over semaphore from a previous run can also cause problems The bug is currently causing several buildbots to break. The obvious solution is to use the _new_shm_name helper like the other tests.

@tiran tiran added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir 3.11 only security fixes 3.10 only security fixes 3.12 bugs and security fixes labels Jul 24, 2022
@tiran tiran self-assigned this Jul 24, 2022
tiran added a commit to tiran/cpython that referenced this issue Jul 24, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 25, 2022
…H-95213)

(cherry picked from commit 5956de1)

Co-authored-by: Christian Heimes <christian@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 25, 2022
…H-95213)

(cherry picked from commit 5956de1)

Co-authored-by: Christian Heimes <christian@python.org>
miss-islington added a commit that referenced this issue Jul 25, 2022
(cherry picked from commit 5956de1)

Co-authored-by: Christian Heimes <christian@python.org>
miss-islington added a commit that referenced this issue Jul 25, 2022
(cherry picked from commit 5956de1)

Co-authored-by: Christian Heimes <christian@python.org>
@erlend-aasland erlend-aasland added the triaged The issue has been accepted as valid by a triager. label Jul 25, 2022
@tiran
Copy link
Member Author

tiran commented Jul 25, 2022

Problem is fixed in 3.10, 3.11, and main branch.

@tiran tiran closed this as completed Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 only security fixes 3.11 only security fixes 3.12 bugs and security fixes tests Tests in the Lib/test dir triaged The issue has been accepted as valid by a triager. type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants