#investigating the glibc issue 🧵/cc @
1 messages · Page 1 of 1 (latest)
I can see that we went from glibc-2.40-r21 to glibc-2.40-r22:
https://v3.dagger.cloud/dagger/traces/142ecbaa60e1e8696954fad40c51fa61?span=aa4072c52240e741 (works)
https://v3.dagger.cloud/dagger/traces/d1777cae2dc5fc23387bc63943dc53d9?span=d8c649fa1807fb8f (breaks)
maybe this broke it? https://github.com/wolfi-dev/os/commit/8229c0379cada98fb9504dd19a068dbbe2bd0d98
seems likely - we must not have /usr/bin/sh?
I see that we are not actually pulling a docker image but instead we pull a repo? Can't we just change main here: https://github.com/dagger/dagger/blob/dc18cc39d1ea05bcdc90bc5a8abf1165992797d3/modules/alpine/wolfi.go#L34 to a working commit?
@normal grail hrmmm this might be unique to the approach our wolfi module takes to installing packages
or maybe that module is just more bleeding-edge and thus able to pick up the brokenness
Yup, seems reasonable ?
if i use my old module that uses the apko tool, it's able to build OK, and does indeed pick up r22: https://v3.dagger.cloud/dagger/traces/89e82dcdae2599ddfec5d530e792684a?listen=ec385b597354a6c4&listen=6b9281e4b167ee01#6b9281e4b167ee01:L6
So it's a combination of multiple things?
we could, but we might not remember to un-pin it, probably don't want to be trailing for too long. especially if it's us broken, not them.
0.16.1 breaks too, so I'm not sure it comes from us? It appeared sudently
Which dagger version is your apko module using?
Yeah I wouldn't be surprised if the logic in modules/alpine just got out of sync with Wolfi assumptions. We could try going down from edge/main but agree it'd be nicer if we can find a quick fix
https://github.com/sipsma/dagger/blob/fd199d89fe3e26f08c20a1677d45d668d90561be/modules/alpine/main.go#L187-L187 that feels potentially related; the script used to use busybox but now just wants /usr/bin/sh which probably doesn't get setup
it's a bit stale by now but i don't think dagger version impacts this, my module still just grabs the latest packages from the alpine or wolfi repo in the same way (unless you pin)
ah yep maybe that's it!
I'll try a fix
DId you guys find a way to unlock it locally, for the local dev loop ?
I don't really care about pin / unpin for this local instance 👼
You could try setting "Branch" here https://github.com/sipsma/dagger/blob/fd199d89fe3e26f08c20a1677d45d668d90561be/modules/wolfi/main.go#L27-L27, I'm not 100% sure what the valid values are, but I'd guess that's where a version num would be set?
Or just change all the uses of wolfi in CI to be plain old Alpine, I don't think we really care about wolfi specifically
Making some progress, the problem appears to actually be that there's a trigger for busybox that does busybox --install -s and creates all the symlinks, but that trigger doesn't run right now until after glibc's trigger. Might just need an ordering fix
Thanks because i can't seem to make the above hack work ahah 🤣
#SKILL ISSUE :-p
Ah okay, no those were super vague suggestions, lemme find the dumbest quick fix here to unblock
diff --git a/modules/alpine/main.go b/modules/alpine/main.go
index 35a4180c9..6089072af 100644
--- a/modules/alpine/main.go
+++ b/modules/alpine/main.go
@@ -259,8 +259,15 @@ func (m *Alpine) withPkgs(
Exclude: pkg.rmFileNames,
})
ctr = ctr.With(pkgscript("post-install", pkg.name, pkg.postInstall))
+ // HACK: quick fix for busybox trigger needing to be run before glibc trigger (which needs /usr/bin/sh symlink to busybox created)
+ if pkg.name == "busybox" {
+ ctr = ctr.With(pkgscript("trigger", pkg.name, pkg.trigger))
+ }
}
for _, pkg := range alpinePkgs {
+ if pkg.name == "busybox" {
+ continue
+ }
ctr = ctr.With(pkgscript("trigger", pkg.name, pkg.trigger))
}
That fixes it
If you want to apply locally
I'll just send that out quick as a PR
Then hopefully I can follow up with something less dumb
cc @stiff juniper
https://github.com/dagger/dagger/pull/9800 meant to post that lol...
Wolfi made a change that causes glibc triggers to require busybox triggers having already run:
wolfi-dev/os@8229c03
This isn't obviously wrong, but our current alpine module likely runs tri...
thank you @spark birch I'll let the engine build related CI run then merge
okay merged that, I'll see what it's gonna take to fix the trigger ordering generally
It works, I'm able to compile using v0.16.1, I don't know why it doesn't work with 0.16.2 but it's unrelated to that issue
lol IIUC it seems like apko special cases this too: https://github.com/chainguard-dev/apko/blob/3e63d01bb69480954b6040f5470197aead3f81da/pkg/build/build_implementation.go#L181-L189
So maybe the hack I added is actually just necessary
did you pull main w/ the fix in place? It should all work now with that
It works if I set v0.16.1 engine, otherwise it fails like that:
There's no specific error message so I'm not able to understand why it fails
It works for me locally, including after docker rm -fv dagger-engine-v0.16.2 to try w/ fresh cache, and CI seems to be happy with it. @spark birch can you confirm that the fix pushed to main works for you now?
It looks like everything just got canceled, but yeah I can't find any actual error in that output
When you run locally do you see any more output?
like an actual error or something? or is it just suddenly canceled
Works for me too 👍
I cherry-picked your commit and it just works
No, no special output, I'll try to update orbstack, I guess it's a setup issue
this still doesn't work for me, but I'm not sure if it's the same issue or different
admin@ip-172-31-4-147:~/vikram.dagger/docs/recorder$ dagger version
dagger v0.16.3-250307154740-11d93c834085 (docker-container://dagger-engine.dev) linux/amd64
admin@ip-172-31-4-147:~/vikram.dagger/docs/recorder$ dagger call generate-quickstart-recordings --base=../current_docs/ci/quickstart/snippets export --path=/tmp/out
✔ connect 0.2s
✔ load module 28.1s
✔ parsing command line arguments 0.0s
✔ Host.directory(path: "/home/admin/vikram.dagger/docs/current_docs/ci/quickstart/snippets"): Directory! 0.0s
✔ recorder: Recorder! 2m13s
✘ .generateQuickstartRecordings(
│ │ base: Host.directory(path: "/home/admin/vikram.dagger/docs/current_docs/ci/quickstart/snippets"): Directory!
│ ): Directory! 2m23s
! process "apk add curl" did not complete successfully: exit code: 99
│ ✔ git(url: "https://github.com/dagger/hello-dagger"): GitRepository! 0.0s
│ ✔ .branch(name: "main"): GitRef! 0.0s
│ ✔ .tree: Directory! 1.8s
similar error with
dagger -m github.com/dagger/dagger/modules/wolfi@v0.16.2 -c 'container | with-exec apk,add,curl | with-exec curl,-L,dagger.io | stdout'
@gray nova that wouldn’t have been expected to work before either, when using the wolfi module you need to specify the apk packages when calling the wolfi module rather than do apk add calls later
That’s just a current limitation
Ok, I took that example from our docs
So I guess it changed at some point, because it used to work
But I tried the screen recorder module just 2 weeks ago and it worked then
And it's the same error
They are both apk add errors
Additional info: the original docs examples use Solomon's wolfi module. That wasn't working so I switched to the one above and got this error.