Repository navigation
Closed
Labels
kind/bugSomething isn't working
Milestone
Description
Problem
When running the standard integration tests for universe.dagger.io/yarn, on main, the test fails with a cryptic buildkit/docker error. As far as I know, this test is not failing in CI. There is no recent change to this package that seems relevant.
Steps to reproduce
1. Check current commit:
$ git show
commit 1135398beec4965f095ca70917908a06d804ff22 (HEAD -> main, origin/main, origin/HEAD)
Merge: 47a8bbc3 f6cee7f3
Author: Solomon Hykes <[email protected]>
Date: Wed Feb 23 14:05:13 2022 -0800
Merge pull request #1644 from shykes/go-fix
go.#Build: small improvements
2. Run yarn test
$ dagger up ./pkg/universe.dagger.io/yarn/test
...
3. Observe cryptic error
...
$ dagger up
[✔] inputs.directories.testdata 0.0s
[✔] actions.tests.customImage.buildImage 0.8s
[✔] actions.tests.customImage.build 0.6s
[✔] actions.tests.customName.build.container.script 0.0s
[✔] inputs.directories.testdata2 0.0s
[✔] actions.tests.simple.build 0.7s
[✔] actions.tests.customName.build 0.8s
[✔] actions.tests.customImage.build.container.script 0.0s
[✔] actions.tests.simple.build.container.script 0.0s
[✗] actions.tests.simple.build.container 0.1s
[✗] actions.tests.customImage.build.container 0.1s
[✗] actions.tests.customName.build.container 0.0s
7:27AM FTL failed to up environment: task failed: actions.tests.simple.build.container._exec:
process "bash --norc -e -o pipefail /bash/scripts/run.sh" did not complete successfully: unable to find user root: invalid argument
Speculation on root cause
- Perhaps the recent upgrade to buildkit 0.10rc1 is to blame?
- I suspected an apparmor configuration error, because of Error response from daemon: unable to find user 0: invalid argument. portainer/portainer#4319 . But I reproduced the issue on 2 completely different machines, one running Alpine Linux, the other running NixOS. This makes a distro config error less likely.
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working
Activity
shykes commentedon Mar 7, 2022
I believe this has been solved in the latest version of buildkit. It was related to the buildkit 0.10.0-rc1 and/or 0.10.0-rc2, and migration of cache layers. Clearing the cache solves the problem.
cc @crazy-max who shared this information.
@grouville can you double-check that this is correct, and close if so?
Thanks!
grouville commentedon Mar 9, 2022
It is correct. Clearing the cache did solve the issue. Reproducing from a fresh install (latest), the issue is not appearing.
jpluscplusm commentedon Apr 12, 2022
I believe I have a currently-valid minimal repro for this:
On the buildkitd side of the fence:
jpluscplusm commentedon Apr 12, 2022
@shykes Ping for visibility ^^. Let me know if I should open a separate issue, or if you feel it's worth you re-opening this one.
jpluscplusm commentedon Apr 12, 2022
I believe this has something to do with the sparse / not-a-shell-able nature of the image.
I resurrected an example of this that I hit previously, whilst exploring dagger, but ignored because I assumed I was driving Dagger's Docker abstraction incorrectly. I don't /think/ I was, as this output shows (same machine as the example in #1659 (comment); cache cleared before each test).
Here, I drive the 2 different flavours of the "shellcheck" image, and the one that contains /only/
/bin/shellcheckin the image fails with the same error as described in this issue. It's defined here, if it helps: https://github.com/koalaman/shellcheck/blob/master/Dockerfile.multi-arch#L21Buildkit logs:
shykes commentedon Apr 12, 2022
Thanks @jpluscplusm ! @grouville can you either look into it, or if you're too busy with other things, either find someone else to assign, or unassign so that we know it needs attention?
sipsma commentedon May 31, 2022
Another user in discord reported the same behavior here when using an image that did not have
/etc/passwd. Sent out a fix here: #2542