Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.
This repository was archived by the owner on May 26, 2026. It is now read-only.

Race condition in testsuite causes deadlocks #5

Description

@jcowgill

From: https://bugs.debian.org/851876

There is a race condition in the testsuite related to closing the listener mux.

Due to golang/go#10527 (which may or may not be a bug), calling Listener.Close does not actually close the socket if any goroutines are still blocked in Listener.Accept. This means that after TestSimple finishes, TestMany may run immediately afterwards and try to bind to port 55111 but it can't because the socket from TestSimple hasn't been closed yet.

This can happen by chance on any system, but on uniprocessor systems this is 100% reproducible because the go scheduler always schedules TaskMany first. If you are on Linux, I found that it's easy to reproduce this by hotplugging all but one CPU out.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions