#Socket load: no query in context

1 messages · Page 1 of 1 (latest)

last fulcrum
#

We have had reports of when two dagger functions are run in CI at the same time, they occassionally step on each other with an error relating to unix sockets. The error is:

gql.transport.exceptions.TransportQueryError: Error while fetching schema: {'message': 'get or init client: initialize client: failed to add client resources from ID: failed to load sockets: load host.unixSocket(path: "/tmp/ssh-XXXXXXSB2z5f/agent.192"): Socket!: load: no query in context'}

The unix socket here is /tmp/ssh-XXXXXXSB2z5f/agent.192 which is the unix socket available on the github runner. The strange thing is that the dagger function traces show a different socket passed into the start of the dagger function /tmp/ssh-XXXXXXSB2z5f/agent.193. At a first glance it looks like something weird is going on where a concurrent run of the same dagger function is somehow "cloberring" this run.

The dag being evaluated when the error occurs is:

container(platform: "linux/amd64").
withUnixSocket(path:"/sock/ssh.sock", source:host.unixSocket(path: "/tmp/ssh-XXXXXXLziJf4/agent.193")).
withEnvVariable(name:"SSH_AUTH_SOCK", value:"/sock/ssh.sock").
withEnvVariable(name:"CACHEBUSTER", value:"2025-10-07 03:29:16.506804").
withMountedCache(path:"/root/.cache/pip", cache:CacheVolume).
build(context:Directory).
withExec(args:["dbt", "deps"]).
withoutUnixSocket(path:"/sock/ssh.sock").
withExec(args:["pip", "install", "recce==1.14.0"]).
withFile(path:"/app/recce.yml", source:File).
withDirectory(path:"/app/target/", directory:Directory).
withDirectory(path:"/app/target-base/", directory:Directory).
withMountedSecret(path:"/root/gcp-credentials.json", source:Secret).
withEnvVariable(name:"GOOGLE_APPLICATION_CREDENTIALS", value:"/root/gcp-credentials.json").
withEnvVariable(name:"CACHEBUSTER", value:"2025-10-07 03:44:22.733516").
withExec(args:["recce", "debug"]).
withExec(args:["recce", "run", "--config", "recce.yml"], expect:ANY).
file(path:"./recce_state.json")
#

The error occuring is:

dagger.ClientConnectionError: Failed to establish client connection to the Dagger session: Failed to build schema from introspection query: get or init client: initialize client: failed to add client resources from ID: failed to load sockets: load host.unixSocket(path: "/tmp/ssh-XXXXXXSB2z5f/agent.192"): Socket!: load: no query in context
#

Our engine version is 0.18.19 at the moment

rich stirrup
rich stirrup
last fulcrum
#

Thank you!

frosty crane
#

Hey @rich stirrup , was there any follow up on this one? Seeing a similar error fairly often now, we've upgraded to engine version v0.19.3

#

Have attempted to make above a bit pretty

last fulcrum
#

just to shine some more light on this one here is the trace with the error message visible:

#

as you can see the dag references a socket call agent.191, whilst the error message refers to a completely different socket agent.164

#

the exact step with the error:

last fulcrum
#

@chrome blaze

chrome blaze
lofty ibex
#

I don't think it's related to my issue, which turned out to simply be a local failure -- I was trying to debug a failure I have in my PR, and when I ran it locally I got a completely unrelated error due to my own setup.

chrome blaze
last fulcrum
#

That would be amazing thank you so much!

chrome blaze
#

If you see / encounter it, could you please re-ping me ? Don't seem to see it on the recent logs, at all

last fulcrum
#

Fix looks good.

#

We are currently still on 0.19.3 waiting for a fix for the race condition stuff