Skip to content

[3.7] bpo-33735: Fix test_multiprocessing random failure (GH-8059)#8060

Merged
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-23401fb-3.7
Jul 3, 2018
Merged

[3.7] bpo-33735: Fix test_multiprocessing random failure (GH-8059)#8060
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-23401fb-3.7

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 3, 2018

Copy link
Copy Markdown
Contributor

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)

Co-authored-by: Victor Stinner vstinner@redhat.com

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)

Co-authored-by: Victor Stinner <vstinner@redhat.com>

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot 🤖!

@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Backport status check is done, and it's a success ✅ .

@miss-islington
miss-islington merged commit 42b2f84 into python:3.7 Jul 3, 2018
@miss-islington
miss-islington deleted the backport-23401fb-3.7 branch July 3, 2018 11:38
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.

4 participants