Skip to content

non-deterministic test_channel test failure #374

Open

Description

@apteryks

Hi,

On Guix, building using Python 3.11.4 and the following dependencies:

python-hatch-vcs@0.5.0 python-hatchling@1.27.0 python-pytest-bootstrap@8.4.1

I encountered:

FAILED testing/test_channel.py::TestChannelBasicBehaviour::test_channel_passing_over_channel[main_thread_only-popen] - execnet.gateway_base.RemoteError: Traceback (most recent call last):
  File "/gnu/store/n9wcfy3gx8gk3dd2s4xgc5119ylykcha-python-execnet-2.1.1/lib/python3.11/site-packages/execnet/gateway_base.py", line 1291, in executetask
    exec(co, loc)
  File "<remote exec>", line 2, in <module>
AssertionError
= 1 failed, 465 passed, 614 skipped, 4 xfailed, 11 xpassed, 1 warning in 59.96s =

This was under high load, and it seems difficult to retrigger that same failure (I've just built the package/ran the test suite for 5 times without the problem being triggered).

Activity

  1. RonnyPfannschmidt commented on Nov 5, 2025

    @RonnyPfannschmidt
    Member

    It seems like a potential cleanup timing issue

    Its not critical and can be fixed by repeating thr check

  2. apteryks commented on Nov 8, 2025

    @apteryks
    ContributorAuthor

    I've disable the test in Guix for now, thanks for the assessment.

  3. sanvila commented on Apr 21, 2026

    @sanvila

    Hello. On AWS instances of type r7a.medium and m7a.medium, which incidentally have a single CPU, I'm getting the failure reported here 100% of the time when trying to build the Debian package (which includes the tests). So, in this case, the failure is completely deterministic, and it may not be fixed by repeating the check.

    If this is a bug in the test and not a bug in the code, I'd like to suggest that the test is disabled for everybody.

    To reproduce the failure, try configuring GRUB with GRUB_CMDLINE_LINUX="nr_cpus=1".

    Thanks.

  4. businessdeveloper69 commented on Nov 21, 2026

    @businessdeveloper69

    On one CPU with a local popen worker, the unchanged test failed 16 times in 80 runs on main (12be141), and 14 times in 80 runs on each of 2.1.1 and 2.1.2. The failure is in the cleanup check. In a separate 400-run control for each execution model, the transferred channel delivered 42 and reached EOF every time. On one thread run the caller had already observed closure while the worker still held the previous channel ID. It disappeared when checked again. This supports waiting for cleanup while retaining the assertion that the old ID is removed.

    There is also a reason this shows up under the main_thread_only-popen test name. Running the two parameters together and inspecting the model on the worker showed that both used a thread worker. The fixture reuses the gateway by transport. With the actual main_thread_only worker, this case passed 100/100 on each revision.

    Correcting that shared fixture also exposes a different failure in the full suite. After an ordinary task error has been received and awaited, a subsequent sequential task on the same main_thread_only worker is rejected as concurrent. This reproduces on both releases and main. Debian currently marks the original channel test as an expected failure.

    Would you prefer #374 to cover the bounded cleanup check, or would you like the worker-model fixture and its error-completion path addressed in the same change?

    AI assisted.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions