Skip to content

Fix race condition when exec with tty#21018

Merged
calavera merged 2 commits intomoby:masterfrom
hqhq:hq_fix_race_exec_tty
Mar 10, 2016
Merged

Fix race condition when exec with tty#21018
calavera merged 2 commits intomoby:masterfrom
hqhq:hq_fix_race_exec_tty

Conversation

@hqhq
Copy link
Copy Markdown
Contributor

@hqhq hqhq commented Mar 8, 2016

I can reproduce this easily on one of my servers, docker exec -ti my_cont ls will not print anything, without -t it acts normally.

It also revert hack in TestExecTTY, I think this PR can fix #18544

hqhq added 2 commits March 8, 2016 10:53
I can reproduce this easily on one of my servers,
`docker exec -ti my_cont ls` will not print anything,
without `-t` it acts normally.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
It'll weaken this test case, and the flaky test is resolved
by another commit in this PR.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
@coolljt0725
Copy link
Copy Markdown
Contributor

We have discussed this f2f, I think this can fix our issue. so LGTM

@mlaventure
Copy link
Copy Markdown
Contributor

Isn't this missing a wg.Wait() ?

@LK4D4
Copy link
Copy Markdown
Contributor

LK4D4 commented Mar 9, 2016

@mlaventure I think wg is passed from Run, and there is Wait there.
LGTM

@mlaventure
Copy link
Copy Markdown
Contributor

correct, I didn't trace the code properly, my bad. Passed down from setupPipes.

@hqhq
Copy link
Copy Markdown
Contributor Author

hqhq commented Mar 10, 2016

ping @vbatts @thaJeztah since it'll fix #18544

@calavera
Copy link
Copy Markdown
Contributor

LGTM

calavera added a commit that referenced this pull request Mar 10, 2016
Fix race condition when exec with tty
@calavera calavera merged commit 790d8f8 into moby:master Mar 10, 2016
@hqhq hqhq deleted the hq_fix_race_exec_tty branch March 11, 2016 01:17
runcom pushed a commit to runcom/docker that referenced this pull request Jul 12, 2016
Upstream reference: moby#21018

I can reproduce this easily on one of my servers,
`docker exec -ti my_cont ls` will not print anything,
without `-t` it acts normally.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky test: TestExecTTY

7 participants