WIP - ignore * when reading from /dev/console#1434
WIP - ignore * when reading from /dev/console#1434TomasTomecek wants to merge 1 commit intoopencontainers:masterfrom
Conversation
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
|
Eugh, I really don't like that we have to rewrite |
|
As an aside, while the So (as much as I hate punting issues like this because the systemd folks tend to get annoyed) why can't systemd only enable this SAK security behaviour if |
|
I've left a comment on the systemd issue. However, one more thing to note is that changing this here won't actually fix the bug. When you run |
|
@cyphar thank you for commenting inside the systemd issue. As I understand this now, both sides resist to fix the issue in their codebases because you and Lennart think it is a hack, is this correct? I'm not sure how to proceed. This moby/moby#9212 seems to be the same issue as the systemd issue. So Lennart seems to be correct that every init has this behaviour. |
|
Is there a reason why you even run systemd with a |
|
I would love to see output from systemd. systemd acts as a true daemon and "closes" its Hence |
|
TBH we are using the same hack in our internal version but for containerd-shim, I don't quite like it though. |
|
closing in favor of #1446 |
this adds a `platform` interface for shim service to manage platform-specific behaviors such as I/O (which uses epoll in linux to work around bugs with applications that closes all consoles i.e. opencontainers/runc#1434 and moby/moby#27202) Its expected that we only have 1 epollfd per containerd_shim to manage all processes. Since all the work are done outside of the container runtime, upgrading of runc is not required and should be done separately. Signed-off-by: Daniel Dao <dqminh89@gmail.com>
This is my attempt to initiate fix of moby/moby#27202. This PR started from code posted inside this comment: moby/moby#27202 (comment)
Using the current code I just wanted to make sure that if I ignore sighups (actually all errors), whether I get output from systemd. I did. The next step should be to decide how to fix this issue. Probably the best way would be to use epoll, which would obviously work only on linux: not sure whether if running on linux we should use epoll and other systems should use current upstream solution.
The issue is that systemd closes
/dev/consolebecause of kernel SAK -- it's arguable whether this behaviour is a bug/feature in kernel, systemd or runc.Signed-off-by: Tomas Tomecek ttomecek@redhat.com