Skip to content

compose attach sometimes loses the input in TestComposeAttach #5335

Closed as not planned

Description

@cvas22

Description

TestComposeAttach from #5302 sometimes loses everything sent through nerdctl compose attach. Attach does read the detach keys and exits, but none of the commands it got before that reach the shell in the container.

On a failing run the container was still running, /bin/sh was PID 1 and sleeping, fds 0-2 were there, and the file the commands write was never created. So the shell looks fine, the input just gets lost somewhere between attach and the container console. It happened on a few different jobs (rootless and rootful, arm), maybe 1 in 10 runs.

The service runs with stdin_open and tty, so compose up starts it with nerdctl run -it in a subprocess and the test detaches from that before attaching. TestAttach does the same thing with a plain nerdctl run -it and I haven't seen it fail this way, so I suspect something in the compose up path.

Steps to reproduce the issue

  1. Run TestComposeAttach from compose: add attach command #5302 in CI a few times
  2. Check the "attaches to the service container" subtest

Describe the results you received and expected

Expected the commands sent through compose attach to run in the container. Sometimes none of them do. I'm marking the subtest flaky in #5302 with a link here and will keep digging.

What version of nerdctl are you using?

main + #5302

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