-
Notifications
You must be signed in to change notification settings - Fork 216
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
fix-attrs broken in v2.2.0.1 #329
Comments
Let me know if there is any more info I can provide to help :) The only suspect I could make out is this change: 3e7bc9f |
Can you come up with a small example? I can't seem to get it to fail |
Hi @jprjr , I have created a reproduction at https://github.com/b-m-f/s6-overlay-bug-reproduction . It is based on the nginx example from the README. Simply clone and run
Versions: |
FWIW I too encountered this issue with my containers today. Upgraded to the latest 2.2.0.3 and that didn't help either. Docker version 20.10.2, build 2291f61 |
fix-attrs.d just hangs for me. on
|
Not sure if this will help anyone but I had this problem when using the s6-overlay package in the Alpine repository. When I installed using a release from this repo, the problem went away. |
On Friday, March 12, 2021, 6:03:03 PM GMT, Timothy Lister ***@***.***> wrote:
Not sure if this will help anyone but I had this problem when using the package in the Alpine
repository. When I installed using a release from this repo, the problem went away.
Hi there, Alpine maintainer for s6-overlay here.
Which Alpine release was this with? Edge? v3.13.0/v3.13.1/v3.13.2?
Which version of the s6-overlay package? Which version of s6-overlay?
Alpine Edge has the current release of s6-overlay packaged whereas v3.13.x has an older version, likewise the version of the other s6 packages differ between Edge and v3.13.x.
Dermot
|
Hi there, I just reran my test to make sure, from my dockerfile:
Shows when run:
From inside 3.13:
Trying with alpine:edge gives:
|
On Friday, March 12, 2021, 6:57:04 PM GMT, Timothy Lister ***@***.***> wrote:
Trying with alpine:edge gives:
export: fatal: unable to exec /etc/s6/init/init-stage1: Permission denied
Ah, I see the problem with that, several files that should be marked executable are not:
/etc/s6/init-no-catchall/init-stage1
/etc/s6/init-no-catchall/init-stage2
/etc/s6/init/init-stage1
/etc/s6/init/init-stage3
and possibly some other files. When I create the Alpine package I unpack the upstream tarfile and any file permissions come from this tarfile. I'll raise an Issue in Github s6-overlay to log this.
Separately I'll fix this in the Alpine package and push out a new minor release for Edge - hopefully tonight, if not then tomorrow.
Looks like this has been an issue for the last few s6-overlay versions - unfortunately I've been busy with some other stuff and haven't been actively using s6-overlay for the past couple of months and so didn't spot this earlier.
Dermot
|
@timothydlister I've figured out the problem with the Alpine Edge package for s6-overlay and raised a MR for a new package release to resolve it in Edge, https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/19251. I'm not part of the core Alpine and so can't do the merge myself - hopefully it will be merged in the next few hours and then the revised package will be rolled out to the repository mirrors, however it might take a day or two with it being the weekend. In the meantime you could modify your Dockerfile for Alpine Edge to do the I haven't looked at the older package for Alpine 3.13 yet but its probably the same issue. I've raised #334 regarding the s6-overlay Source Code tarfile i'm using for the packaging. |
looks like I can reproduce this issue with s6-overlay package from alpine:3.13. FROM alpine:3.13
RUN apk add --no-cache s6-overlay
ENTRYPOINT ["/init"] just hangs. @dermotbradley can you please fix this as well? |
Hi. The issue I fixed in Alpine Edge was a packaging mistake which caused the "export: fatal: unable to exec /etc/s6/init/init-stage1: Permission denied" error that @timothydlister saw. This packaging issue was not present in s6-overlay for Alpine 3.13 (I only introduced the, now corrected, mistake in Edge). As the original problem report for this ticket was observed on Debian then I don't believe the underlying issue is Alpine-specific. |
This happens on debian, alpine, and centos for me. I build it from source, so I don't think it's a packaging issue. |
I found some time to look at the underlying issue and its not a packaging issue. Using the reproduction repo of @b-m-f which is Ubuntu based I saw the same error. However the fix is simple - the "fix-mounted" file in that repo simply needs a newline added and it works! I also created an Alpine 3.13-based version of this "reproducer" and it failed in the same way until I added a newline to that file and then it also worked. |
Think I just encountered this as well in docker with alpine 3.13 and s6-overlay 1.22.1.0 Dockerfile
Gets stuck on...
Switching to alpine 3.12 and it works fine again. EDIT: Okay so it looks like this could be expected due to compatibility with dependencies, possibly execline. @dermotbradley Maybe consider updating your s6-overlay package in 3.13 to 2.2.x.x |
You used this repo's "nobin" tarfile which only contains the s6-overlay specific files. If using this file fails but then using the same version of the "amd64" tarfile (obviously not then using "apk add" for the s6/s6-portable-utils packages) from this repo does work then that points to a version compatibility issue with the OS' (in this case Alpine's) versions of s6/execline/etc packages.
I have replied to the Alpine gitlab issue you raised about this issue. I don't want to fill up this repo's issue with Alpine-specific discussions so we can talk further about it in that Gitlab issue. Fundamentally when execline 2.7.0.0 came it out it changed some behaviour that then had to be fixed in s6-overlay (#317, #319), then when execline 2.8.0.0 came out it also changed some behaviour that required other s6-overlay changes (#335). In general there is always likely to be some sort of time delay from whenever newer versions of s6 utilities are released and then when s6-overlay is updated to handle any changes (if needed). |
ah yes. Looks like this comment describes the exact problem I faced. This is the commit which fixes that. Guys, can you please reference such important issues in commit messages? It would've been so much easier to get the full picture in this case,,, |
I have the same issue on 2.2.x.x like: I use alpine/debian/ubuntu with the tarfile from this repository: |
Hi all, I think there's a lot of comments in this issue that may be specific to alpine's package of s6-overlay. I think @b-m-f provided an example that narrows the issue down.
I'm pretty sure the core issue is how execline-2.7.0.0 changed handling non-existant and empty files on the forstdin program, and fix-attrs needs to be updated to handle that.
Please give me some time and I'll address it when I can.
…On March 26, 2021 7:14:21 AM EDT, Pascal Vizeli ***@***.***> wrote:
I have the same issue on 2.2.x.x like:
https://github.com/b-m-f/s6-overlay-bug-reproduction
I use alpine/debian/ubuntu with the tarfile from this repository:
https://github.com/home-assistant/docker-base
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#329 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Here's some notes fix-attrs has two places that uses There's a chunk that tests if a file is a directory, calls
If something is an empty directory, Before execline 2.7.0.0, The other place is
Previously, if a file did not end in a newline character (like in the repo @b-m-f created), |
I've been reviewing this, and I think the only real fix is to rewrite In most other cases, I was able to replace I think the better solution is to just write a custom program in C and include it as a static binary. |
Upstream development appears to have stopped several months ago. Recent s6-overlay versions do not work correctly with recent execline versions (which are separately packaged for Alpine by skarnet). For more information see just-containers/s6-overlay#329 Closes #12547. If/when upstream resolves compatibility with general s6/execline packages then I will restart maintaining this package. For now the only solution for end-users is to download and use upstream's arch-specific binary tarfiles at https://github.com/just-containers/s6-overlay/releases which contain versions of s6/execline binaries that upstream has tested with s6-overlay.
Replaces forstdin with custom fork that allows for emtpy files and lines missing the newline. See #329
Replaces forstdin with custom fork that allows for emtpy files and lines missing the newline. See #329
Replaces forstdin with custom fork that allows for emtpy files and lines missing the newline. See #329
Hi all, I believe I've come up with a fix for this and could use help testing. I've made a fork of forstdin that re-enables some of the old behavior (reading in 0 bytes of input is fine, missing a final newline is also fine), and made a branch of Here is a n example Dockerfile for installing the from the latest build off the
If anybody out there can try this out and see if it fixes their issue, that would be a huge help! |
Works for me. Use newest v2.2.0.3
issue-329 version
file
file
But when have bad file (example 01, wrong username) and use variable
|
…erlay#329 Signed-off-by: Adam Warner <[email protected]>
Version 3.0.0.0 of s6-overlay is out, which should hopefully fix all these outstanding issues. |
I am using the
fix-attrs.d
directory to change permissions on a file that is mounted into the container at launch.This worked fine in
2.1.0.2
but breaks in2.2.0.1
.Working in 2.1.0.2
https://github.com/b-m-f/WirtBot/runs/1894909984#step:3:1813
Breaking with 2.2.0.1
https://github.com/b-m-f/WirtBot/runs/1898569667?check_suite_focus=true#step:3:2244
The text was updated successfully, but these errors were encountered: