-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: cannot set terminal process group (-1): Inappropriate ioctl for device #51
Comments
@alhafoudh thanks for the issue! I was able to reproduce it, we'll look into it. Just to confirm, are you still getting a usable shell? (I'm getting the error printed, but still get a shell afterwards. Just want to confirm the behavior is the same for you.) |
Yes, I have usage shell after the error
|
@alhafoudh still looking into the root cause. I think it's something we can fix. For now a workaround is to run in non-setsid mode using
The only difference behavior-wise is that signals are only forwarded to your direct child. So if you have a process tree like
when you send This is usually acceptable behavior since the server is supposed to handle signaling its workers before it dies anyway. Unfortunately there are some exceptions, which is why the default is setsid mode. I'll keep looking into this and get back to you. |
See http://engineeringblog.yelp.com/2016/01/dumb-init-an-init-for-docker.html. Also configure it to proxy only to direct children, which seems appropriate and also works around Yelp/dumb-init#51.
@chriskuehl with |
@pclalv can you provide some information on how you're running it on Mesos? What frameworks are you using (e.g. Marathon/Chronos) and how are you passing the command/arguments to the framework? I've been working with Mesos a lot recently and have found the argument passing to be a bit tricky with Docker. For example, Chronos seems to combine Any details you can provide would be really helpful to reproducing it. |
of course, @chriskuehl. i'm using Mesos 0.26.0 and Marathon 0.15.2, and passing arguments to the framework with the |
May be related to #78 |
The setsid() system call to create a new process group detaches the spawned process from a controlling tty. Therefore programs like bash complain, that they can't use job control. Re-attaching the controlling tty won't work, because the tty is still in use as a controlling tty for dumb-init. So my suggestion is to remove the controlling tty from dumb-init and attach it to the spawned process (when in setsid mode). Here my patch:
This patch uses this controlling tty stuff only in setsid mode. |
any update on this? I am seeing the same warning. |
@athakwani, @Ehlers, thanks a lot for both the patch and the bump! I just tried the patch out locally and it seems to be working great (all the existing tests pass, and we do test the behavior we care about pretty extensively). I was a little concerned about what effect it would have on the new I'll spend a little more time looking into what exactly this is doing, but I'll plan to write a test for this new behavior and make a PR shortly. |
@Ehlers perhaps open a PR for hacktoberfest? :) |
PRs definitely welcome! :) I spent a bit of time trying to write a regression test for this bug, but wasn't quite able to get something reliable yet. I'll give it another attempt on Monday if nothing else. |
Patch is included in v1.2.0 (just released), thanks all! |
Yay thanks! 😁 |
Unfortunately I still see this error message, using dumb-init 1.2.0 (Ubuntu 16.04, both directly in the host shell, and inside a
Note that |
When I have
dumb-init
inENTRYPOINT
like thisand then try to run
bash
withtty
and interactively, I get this error:The text was updated successfully, but these errors were encountered: