Skip to content
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 sometimes crashes #452

Closed
shadycuz opened this issue May 29, 2022 · 2 comments
Closed

S6 sometimes crashes #452

shadycuz opened this issue May 29, 2022 · 2 comments

Comments

@shadycuz
Copy link

My container will sometimes run correctly and other times is crashes with this in the logs.

FROM ubuntu:20.04

## Install the S6-overlay
ARG S6_OVERLAY_VERSION=3.1.0.1
RUN apt-get update && apt-get install -y xz-utils
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz

# add my services
COPY services /etc/s6-overlay/s6-rc.d


ENTRYPOINT ["/init"]
s6-rc: fatal: timed out
s6-sudoc: fatal: unable to get exit status from server: Operation timed out

It's really intermittent but once it happens, it seems like it keeps happening. I'm not sure what the issue is.

@skarnet
Copy link
Contributor

skarnet commented May 29, 2022

  • This is neither s6 nor a crash. This is a timeout happening in s6-rc, as the error message states.
  • From the migration guide:
  • There is a global timeout for all the services, adjustable via the S6_CMD_WAIT_FOR_SERVICES_MAXTIME variable. You can disable it via setting this variable to 0.
  • S6_CMD_WAIT_FOR_SERVICES_MAXTIME (default = 5000): The maximum time (in milliseconds) the services could take to bring up before proceding to CMD executing. Note that this value also includes the time setting up legacy container initialization (/etc/cont-init.d) and services (/etc/services.d), and that it is taken into account even if you are not running a CMD. In other words: no matter whether you're running a CMD or not, if you have scripts in /etc/cont-init.d that take a long time to run, you should set this variable to either 0, or a value high enough so that your scripts have time to finish without s6-overlay interrupting them and diagnosing an error.

@shadycuz
Copy link
Author

Oh 😊, I will give this a shot. I didnt think this applied since I'm not running a CMD or using legacy services.

PromoFaux added a commit to pi-hole/docker-pi-hole that referenced this issue Aug 29, 2022
…VICES_MAXTIME to 0, per just-containers/s6-overlay#452

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants