Skip to content

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

Merged
vstinner merged 1 commit into
python:2.7from
vstinner:mp_imap_unordered27
Jul 3, 2018
Merged

[2.7] bpo-33735: Fix test_multiprocessing random failure (GH-8059)#8061
vstinner merged 1 commit into
python:2.7from
vstinner:mp_imap_unordered27

Conversation

@vstinner

@vstinner vstinner commented Jul 3, 2018

Copy link
Copy Markdown
Member

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