Skip to content

Tests fail often for different reasons #129

Open

Description

@FliegendeWurst

Describe the bug
The tests occasionally fail when running with default settings. I have also observed the tests to hang indefinitely.

ERROR traitlets:client.py:568 Error occurred while starting new kernel client for kernel 95bf912a-0d9e-419a-8ae5-3b4fd9c31f6e: Kernel died before replying to kernel_info
ERROR traitlets:client.py:568 Error occurred while starting new kernel client for kernel fc8ac83e-1017-412a-95de-475b0d83c8ba: Kernel didn't respond in 60 seconds
None = NotebookResult(nb={'cells': [{'cell_type': 'code', 'execution_count': 1, 'metadata': {'execution': {'iopub.status.busy...'949777d72b0d2535278d3dc13498b2535136f6dfe0678499012e853ee9abcab1'}}}, 'nbformat': 4, 'nbformat_minor': 2}, error=None).error�[0m
zmq.error.ZMQError: Address already in use (addr='tcp://127.0.0.1:39979')

^ it is a very bad idea to use ports >32k, since those are also used for outgoing TCP connections.

To Reproduce
Steps to reproduce the behavior:

  1. Build and test nbmake using Nix (https://github.com/NixOS/nixpkgs)

Expected behavior
No test errors.

Logs
https://gist.github.com/FliegendeWurst/807356cbe8f273045a167198350e3d9c

Activity

  1. mweinelt commented on Dec 8, 2024

    @mweinelt

    This looks like a race condition due to using xdist with high parallelism. A workaround is to set --maxproccesses to something lower.

  2. alex-remedios commented on Dec 9, 2024

    @alex-remedios
    Member

    this def feels like something best worked around - for reference, we depend on nbclient and they depend on a stack of jupyter libraries that are not the most amenable to parallelism.

    https://github.com/jupyter/nbclient

    What degree of parallelism are you running with?

  3. FliegendeWurst commented on Dec 9, 2024

    @FliegendeWurst
    Author

    What degree of parallelism are you running with?

    I was running the tests with 32 jobs, but I sometimes encountered the issue with 12 jobs too.

  4. sammorley-short commented on Nov 4, 2025

    @sammorley-short

    Not sure if there's been any update on this since @FliegendeWurst raised the original issue, but I can also confirm I'm seeing this regularly even with only 4 workers.

  5. alex-remedios commented on Jan 3, 2026

    @alex-remedios
    Member

    hey I'm sorry I basically have no capacity to work on this project atm apart from serious crashes/version issues. PRs are welcome though if there are low-risk fixes

    ty for using this library and reporting issues which benefits other users though

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