compose attach sometimes loses the input in TestComposeAttach

オープン
#5,335 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
cli

調査の方向性

Start with TestComposeAttach from #5302 and compare its compose up/attach path with TestAttach, which uses plain nerdctl run -it. Reproduce the intermittent failure by running the CI subtest repeatedly; done means the commands sent through compose attach reliably reach and run in the container before detaching.

索引モデルが issue の本文から書いたものです。

説明

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 #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

主要言語
Go
スター
10.5k
フォーク
853
平均マージ
6日 14時間
マージ済み PR(30日)
38

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

containerd/nerdctl のほかの issue

containerd/nerdctl の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。