GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test_multiprocessing_fork: test_nested_startmethod() fails randomly. · Issue #109706 · python/cpython

test_multiprocessing_fork: test_nested_startmethod() fails randomly. #109706

New issue
Copy link
New issue
Copy link
Closed
Closed
test_multiprocessing_fork: test_nested_startmethod() fails randomly.#109706
Copy link
Labels
testsTests in the Lib/test dirTests in the Lib/test dir

Description

@vstinner
vstinner
opened on Sep 22, 2023
Issue body actions

test_nested_startmethod() fails randomly. Since there is no synchronization, putting items in the queue is not really ordered.

I suggest to either accept [1, 2] and [2, 1] in the test, or add some kind of synchronization to ensure that events happen in the expected order. Here I don't think that order matters.

The test was added by PR #108568 of issue gh-108520.

FAIL: test_nested_startmethod (test.test_multiprocessing_fork.test_misc.TestStartMethod.test_nested_startmethod)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-ppc64le.lto/build/Lib/test/_test_multiprocessing.py", line 5475, in test_nested_startmethod
    self.assertEqual(results, [2, 1])
AssertionError: Lists differ: [1, 2] != [2, 1]

First differing element 0:
1
2

- [1, 2]
+ [2, 1]

build: https://buildbot.python.org/all/#/builders/503/builds/3941

The failure can be reproduced by stressing the test:

$ ./python -m test test_multiprocessing_fork.test_misc -m test_nested_startmethod -v -j50 --forever
(...)
0:00:24 load avg: 20.03 [157/1] test_multiprocessing_fork.test_misc failed (1 failure)
test_nested_startmethod (test.test_multiprocessing_fork.test_misc.TestStartMethod.test_nested_startmethod) ... FAIL

======================================================================
FAIL: test_nested_startmethod (test.test_multiprocessing_fork.test_misc.TestStartMethod.test_nested_startmethod)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/python/3.11/Lib/test/_test_multiprocessing.py", line 5399, in test_nested_startmethod
    self.assertEqual(results, [2, 1])
AssertionError: Lists differ: [1, 2] != [2, 1]

First differing element 0:
1
2

- [1, 2]
+ [2, 1]

----------------------------------------------------------------------
Ran 1 test in 2.150s

FAILED (failures=1)
test test_multiprocessing_fork.test_misc failed

Linked PRs

  • gh-109706: Fix multiprocessing test_nested_startmethod() #109707
  • [3.12] gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707) #109762
  • [3.11] gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707) #109763

Activity

  1. vstinner
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    on Sep 22, 2023
  2. vstinner
    added 3 commits that reference this issue on Sep 22, 2023

    pythongh-109706: Fix multiprocessing test_nested_startmethod()

    85c918b

    pythongh-109706: Fix multiprocessing test_nested_startmethod()

    06aa63b

    gh-109706: Fix multiprocessing test_nested_startmethod() (#109707)

    b03a791
  3. miss-islington
    added 2 commits that reference this issue on Sep 22, 2023

    pythongh-109706: Fix multiprocessing test_nested_startmethod() (pytho…

    a83132f

    pythongh-109706: Fix multiprocessing test_nested_startmethod() (pytho…

    9b81414
  4. vstinner
    added a commit that references this issue on Sep 22, 2023

    [3.11] gh-109706: Fix multiprocessing test_nested_startmethod() (GH-1…

    3db2ec2
  5. vstinner
    closed this as completedon Sep 25, 2023
  6. csm10495
    added a commit that references this issue on Sep 28, 2023

    pythongh-109706: Fix multiprocessing test_nested_startmethod() (pytho…

    0066283
  7. Yhg1s
    added a commit that references this issue on Oct 2, 2023

    [3.12] gh-109706: Fix multiprocessing test_nested_startmethod() (GH-1…

    6a6bea3
  8. Glyphack
    added a commit that references this issue on Sep 2, 2024

    pythongh-109706: Fix multiprocessing test_nested_startmethod() (pytho…

    ba451d2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirTests in the Lib/test dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.