-
Notifications
You must be signed in to change notification settings - Fork 213
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
s6-linux-init: warning: parent wrote to fd 3! #564
Comments
It has nothing to do with your What is happening is that your container manager is starting your container not only with stdin, stdout and stderr open, but also file descriptor 3, and is writing to descriptor 3 for some reason. This is weird, so s6-linux-init warns about it. Some container managers (Docker) start their container with a pipe open to fd 3 as a synchronization mechanism: the pipe gets closed when Docker is actually ready to provide the container with what it needs (filesystems, etc.), so when you're starting a container, if fd 3 is open, it's good practice to wait until you read EOF on it before continuing, this ensures there will be no race condition when acquiring resources. That's what s6-linux-init does. But the container manager isn't supposed to write anything to fd 3, it's only supposed to close its end of the pipe when it's ready. Here, your container manager is writing. It should not. Check your container manager's configuration, its documentation, find out why it's writing to fd 3 of the container it launches, and what that's supposed to mean. If there's new stuff, if it transmits information via fd 3, I might have to add support for it in s6-linux-init, or at least remove that pesky warning. |
@skarnet Thank you for the detailed response. I am using Docker as my container manager. I think what you're suggesting is that I create some new oneshot service that waits for fd3 to close and make my other s6-rc services dependent on it so that it waits until it starts. |
I'm not suggesting that at all: the waiting is done by s6-linux-init automatically, you have nothing to do on that front. What I would like you to do, however, is help me understand what's going on. Why is Docker writing to the container init's fd 3, and what is it writing? A cursory search isn't turning up anything. If you don't want to do this, that's fine; as long as your container is working properly, you can safely ignore the warning, there's nothing to fix on your side. The work to do here is for me, because if it's something Docker is going to keep doing in the future, I'd rather not stress other users with a constant warning. |
I do see the same problem and I am using
I can provide more information if needed. |
Thank you. It looks like a change made in a recent version of Docker. I'll have a look. |
Also, I thought changing |
|
@skarnet Were you able to verify that this happens in the base Docker case? I believe that's the case. If so, would we be able to hide that log? |
Not yet, sorry. I'll keep you informed. For now, please just ignore the warning, if everything is working as intended. |
I can confirm that I got the same warning here: running docker on macOs m1 (local dev before deploying on linux), base file Fedora:40, using the latest (3.2.0.2) s6-overlays, with multiple services (oneshot and longrun). |
Before trying to minimally repro, I want to just see if there's anything I'm missing. I'm seeing
s6-linux-init: warning: parent wrote to fd 3!
at the very startup. I'm using s6-rc with this structureI'm not sure if it's related but I am performing an
echo
in every run script 👇🏼The text was updated successfully, but these errors were encountered: