Skip to content

Race condition between listener and client in remote_runtime_test  #58993

Closed
@RobertKrawitz

Description

@RobertKrawitz

A race condition between fakeremote.Start() is spawned as a goroutine to listen for connections, and its caller assumes that the listener will immediately be ready to accept connections. This leads to intermittent test failures if the caller attempts before the fake remote runtime is ready to listen. The code needs to be refactored so that the fake remote returns from listen, and then spawns the server as a goroutine and returns.

This can be reproduced by running the remote_runtime_test in a loop; it fails periodically. Failure can be accelerated by putting a time.Sleep(100010001000) in fake.Start() immediately before the call to util.CreateListener; the failure is then effectively deterministic.

Fix tested by running about 150,000 iterations without observing any failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    sig/nodeCategorizes an issue or PR as relevant to SIG Node.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions