Skip to content

Running a shell and allowing it to idle makes shell unresponsive #561

Closed
d11wtq/dockerpty
#22

Description

@dmp1ce

Running a shell like bash using fig run test sh and then allowing it to idle for a few minutes will make the shell unresponsive. Typing any command will produce no results.

I recently updated to Fig 1.0.0 and I'm running on and up-to-date Arch Linux.

Here is my fig.yml

test:
  image: busybox
  command: echo "Hello"

And the command I ran is fig run test sh then I waited for a few minutes and tried to run ls in the container. The shell initially works, so you have to idle for some amount of time.

Activity

  1. dnephin commented on Oct 20, 2014

    @dnephin

    I ran into this yesterday as well

  2. aanand commented on Oct 20, 2014

    @aanand

    Did you experience this error before 1.0? I wonder if it's TLS-specific.

  3. fredjean commented on Oct 20, 2014

    @fredjean

    +1 using 1.0.

    My particular use case is running Guard within a box setup as a Rails application container. The box stops responding and is left running even after I stopped the other ones. The only way to get rid of the stray box(es) is to restart the docker service.

  4. dnephin commented on Oct 20, 2014

    @dnephin

    I don't recall seeing it before 1.0 (and docker 1.3), but I rarely run interactive, so I might have just missed it.

    I was able to Ctrl-C, and then docker attach to the container again. I believe it's just the tty interaction that is having issues, so it could be dockerpty related.

    @fredjean the issue you're describing sounds a lot more severe then what I ran into.

  5. dmp1ce commented on Oct 20, 2014

    @dmp1ce
    Author

    I didn't experience with 0.5.2 and I couldn't reproduce with docker alone.

  6. dnephin commented on Oct 21, 2014

    @dnephin

    I experimented with this a bit. The interactive shell goes away at 60s. I'm pretty confident this is related to this change: d11wtq/dockerpty@6ded926

    Someone else has reported problems with it as well. When I use fig 1.0 without the vendored dockerpty, and a dockerpty==0.2.3 (before that change), it works fine.

    I think the change to which streams are flushed needs to be reverted.

  7. added this to the 1.0.1 milestone on Oct 21, 2014
  8. fredjean commented on Oct 21, 2014

    @fredjean

    I was also able to use docker attach to connect to a stray fig container and shut it down cleanly. Many thanks to @dnephin for the tip!

  9. andres-root commented on Oct 21, 2014

    @andres-root

    I guess I have the same problem. Using docker 1.3 and fig 1.0. In my case I'm using bash or zsh and after n minutes the shell becomes unresponsive. I have to stop that container with ctrl + d or ctrl + c and start a new one. However If I type fig ps I see a lot of containers running with different sequence numbers:

    mycont_run_319                    up
    mycont_run_320                    up
    mycont_run_321                    up
    

    So now I have up to 350 containers running.

  10. dnephin commented on Oct 26, 2014

    @dnephin

    I guess we need to update the vendored copy of dockerpty, or release it to pickup this change.

  11. bfirsh commented on Oct 27, 2014

    @bfirsh

    #588 :)

  12. thomasboyt commented on Oct 29, 2014

    @thomasboyt

    Can this issue be reopened, since the bug hasn't been fixed yet? Almost opened a duplicate before I thought to look in the "closed" tab...

  13. djmaze commented on Nov 3, 2014

    @djmaze

    +1 for reopening. Fig is currently almost unusable for me because of this bug.

  14. andres-root commented on Nov 4, 2014

    @andres-root

    +1 fo reopening. I'm not using the new version because of this bug.

  15. aanand commented on Nov 4, 2014

    @aanand

    I've just merged #588, which fixes it for real.

  16. andres-root commented on Nov 4, 2014

    @andres-root

    Thank you very much @aanand

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions