Skip to content

[2.7] bpo-33735: Fix test_multiprocessing random failure (GH-8059) #8061

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

Merged
merged 1 commit into from
Jul 3, 2018
Merged

[2.7] bpo-33735: Fix test_multiprocessing random failure (GH-8059) #8061

merged 1 commit into from
Jul 3, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jul 3, 2018

When hunting memory leaks using -R 3:3, test_imap_unordered() of
test_multiprocessing leaks randomly a few memory blocks. It is a
false alarm: when testing using -R 3:20 for example, no leak is
detected.

Modify test_imap_unordered() to be closer to test_imap():

  • Only test 10 numbers instead of 1000: it's a pool of 4 processes, so
    10 is enough to test at least one number per process
  • Use chunksize=100 instead of chunksize=53 to mimick test_imap()

(cherry picked from commit 23401fb)

https://bugs.python.org/issue33735

When hunting memory leaks using -R 3:3, test_imap_unordered() of
test_multiprocessing leaks randomly a few memory blocks. It is a
false alarm: when testing using -R 3:20 for example, no leak is
detected.

Modify test_imap_unordered() to be closer to test_imap():

* Only test 10 numbers instead of 1000: it's a pool of 4 processes, so
  10 is enough to test at least one number per process
* Use chunksize=100 instead of chunksize=53 to mimick test_imap()

(cherry picked from commit 23401fb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants