RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1359199 - Race condition using docker exec with tty
Summary: Race condition using docker exec with tty
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-22 13:43 UTC by Andy Goldstein
Modified: 2019-03-06 01:00 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-03 20:56:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1446 0 normal SHIPPED_LIVE docker bug fix and enhancement fix update 2016-08-05 19:34:58 UTC

Description Andy Goldstein 2016-07-22 13:43:44 UTC
Description of problem: Sometimes when running 'docker exec -it ...', output from the command is lost.


Version-Release number of selected component (if applicable): 1.10.3-44.el7


How reproducible: easily


Steps to Reproduce:
1. docker run -d --name c7 centos:centos7 sleep 9999999
2. while true; do x=$(docker exec -t c7 cat /etc/hosts); if [ -z "${x}" ]; then break; fi; done

Actual results: the while loop exits


Expected results: the while loop should not exit


Additional info:

If you remove the -t (docker exec c7 cat /etc/hosts), there is no issue.

This is fixed by https://github.com/docker/docker/pull/21018

Comment 3 Luwen Su 2016-07-25 08:56:35 UTC
Wors well for me in docker-1.10.3-46.el7.8.x86_64,
I wait for a moment to see the ouput, but the ``while`` ends.

# while true; do x=$(docker exec -t c9 cat /etc/hosts); echo ${x} ;if [ -z "${x}" ]; then break; fi; done
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
 172.17.0.2 7aeb15a8df81host ip6-loopback
.....

Comment 5 errata-xmlrpc 2016-08-03 20:56:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-1446.html


Note You need to log in before you can comment on or make changes to this bug.