You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Definitely seems like this is caused by #8812 in part, but also we should guard against this happening in the engine - SDKs shouldn't be able to crash the engine.
Definitely seems like this is caused by #8812 in part, but also we should guard against this happening in the engine - SDKs shouldn't be able to crash the engine.
Turns out, that PR was just triggering an issue that exists in main still. It has to do with a test in pytest triggering a log after another test used a connection on its own event loop, and when in a nested session (even without ExperimentalPrivilegedNesting).
Iβve fixed the PR to avoid the warning in the first place, but also in the Python SDKβs test suite, to ensure telemetry is initialized properly.
I can reproduce this even with a Go module, and without pytest, to avoid some questionable variables. Note that dagger run doesnβt trigger this issue, nor a single function call. Iβm also not entirely sure pytest creates a event loop per test but it makes sense that it does (depending on test scope), and itβs what I could reproduce, including the fix.
Engine crashes if log is sent after an event loop has finished establishing a client connection:
anyio.run(test_conn)
test_log() # β
Error:
β― dagger call fail stdoutError: response from query: Post "http://dagger/query": command [docker exec -i dagger-engine-v0.13.7 buildctl dial-stdio] has exited with exit status 137, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=
fix
I can fix the issue by making sure telemetry is initialized beforehand:
What seems like a similar issue appears to still exist as of 0.16.2. I'm hitting it like this:
create an empty dir and initialize elixir SDK in it,
run dagger function command several times
Repeatedly running dagger function succeeds most of the times, but occasionally would fail with either of these two errors:
β load module 1.3s
! failed to get configured module: Post "http://dagger/query": unexpected EOF
β β finding module configuration 1.3s
β ! Post "http://dagger/query": unexpected EOF
β β β moduleSource(refString: "."): ModuleSource! 2.5s
β load module 1.9s
! failed to get configured module: Post "http://dagger/query": command [docker exec -i dagger-engine-v0.16.2 buildctl dial-stdio] has exited with exit status 137, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=
β β finding module configuration 1.9s
β ! Post "http://dagger/query": command [docker exec -i dagger-engine-v0.16.2 buildctl dial-stdio] has exited with exit status 137, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=
β β β moduleSource(refString: "."): ModuleSource! 3.1s
Error: failed to get configured module: Post "http://dagger/query": command [docker exec -i dagger-engine-v0.16.2 buildctl dial-stdio] has exited with exit status 137, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=
Full log
eugene@IEVGENs-MacBook-Pro ~/oss> mkdir for-slides-march-2025
eugene@IEVGENs-MacBook-Pro ~/oss> cd for-slides-march-2025/
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger init --sdk=elixir .
β connect 31.9s
β moduleSource(allowNotExists: true, disableFindUp: true, refString: ".", requireKind: LOCAL_SOURCE): ModuleSource! 0.0s
β .configExists: Boolean! 0.0s
β ModuleSource.localContextDirectoryPath: String! 0.0s
β ModuleSource.sourceRootSubpath: String! 0.0s
β ModuleSource.withName(name: "for-slides-march-2025"): ModuleSource! 0.0s
β .withSDK(source: "elixir"): ModuleSource! 16.6s
β .withSourceSubpath(path: "."): ModuleSource! 0.1s
β .withEngineVersion(version: "latest"): ModuleSource! 0.0s
β .generatedContextDirectory: Directory! 15.2s
β .export(path: "/Users/eugene/oss/for-slides-march-2025"): String! 1.0s
12:33:34 WRN no LICENSE file found; generating one for you, feel free to change or remove license=Apache-2.0
Initialized module for-slides-march-2025 in /Users/eugene/oss/for-slides-march-2025
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.2s
β load module 10.0s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 2.4s
! failed to get configured module: Post "http://dagger/query": command [docker exec -i dagger-engine-v0.16.2 buildctl dial-stdio] has exited with exit status 137, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=
β β finding module configuration 2.4s
β ! Post "http://dagger/query": command [docker exec -i dagger-engine-v0.16.2 buildctl dial-stdio] has exited with exit status 137, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=
β β β moduleSource(refString: "."): ModuleSource! 3.6s
Error: failed to get configured module: Post "http://dagger/query": command [docker exec -i dagger-engine-v0.16.2 buildctl dial-stdio] has exited with exit status 137, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025 [1]> dagger functions
β connect 0.1s
β load module 6.2s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 2.1s
! failed to get configured module: Post "http://dagger/query": unexpected EOF
β β finding module configuration 2.1s
β ! Post "http://dagger/query": unexpected EOF
β β β moduleSource(refString: "."): ModuleSource! 3.3s
Error: failed to get configured module: Post "http://dagger/query": unexpected EOF
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025 [1]> dagger functions
β connect 0.1s
β load module 5.6s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 3.0s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 3.2s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 3.7s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.2s
β load module 2.3s
! failed to get configured module: Post "http://dagger/query": unexpected EOF
β β finding module configuration 2.3s
β ! Post "http://dagger/query": unexpected EOF
β β β moduleSource(refString: "."): ModuleSource! 3.6s
Error: failed to get configured module: Post "http://dagger/query": unexpected EOF
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025 [1]> dagger functions
β connect 0.1s
β load module 6.3s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 3.2s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 3.0s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 3.0s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 2.8s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025>
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 3.3s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 2.9s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 3.0s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 1.9s
! failed to get configured module: Post "http://dagger/query": command [docker exec -i dagger-engine-v0.16.2 buildctl dial-stdio] has exited with exit status 137, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=
β β finding module configuration 1.9s
β ! Post "http://dagger/query": command [docker exec -i dagger-engine-v0.16.2 buildctl dial-stdio] has exited with exit status 137, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=
β β β moduleSource(refString: "."): ModuleSource! 3.1s
Error: failed to get configured module: Post "http://dagger/query": command [docker exec -i dagger-engine-v0.16.2 buildctl dial-stdio] has exited with exit status 137, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025 [1]> dagger functions
β connect 0.1s
β load module 4.6s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 2.9s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.2s
β load module 1.3s
! failed to get configured module: Post "http://dagger/query": unexpected EOF
β β finding module configuration 1.3s
β ! Post "http://dagger/query": unexpected EOF
β β β moduleSource(refString: "."): ModuleSource! 2.5s
Error: failed to get configured module: Post "http://dagger/query": unexpected EOF
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025 [1]> dagger functions
β connect 0.1s
β load module 4.6s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 2.9s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
eugene@IEVGENs-MacBook-Pro ~/o/for-slides-march-2025> dagger functions
β connect 0.1s
β load module 3.4s
Name Description
container-echo Returns a container that echoes whatever string argument is provided.
grep-dir Returns lines that match a pattern in the files of the provided Directory.
Activity
[-]:lady_beetle: engine crash in telemetry stack[/-][+]π engine crash in telemetry stack[/+]helderco commentedon Nov 16, 2024
Turns out, that PR was just triggering an issue that exists in main still. It has to do with a test in pytest triggering a log after another test used a connection on its own event loop, and when in a nested session (even without
ExperimentalPrivilegedNesting).Iβve fixed the PR to avoid the warning in the first place, but also in the Python SDKβs test suite, to ensure telemetry is initialized properly.
I can reproduce this even with a Go module, and without pytest, to avoid some questionable variables. Note that
dagger rundoesnβt trigger this issue, nor a single function call. Iβm also not entirely sure pytest creates a event loop per test but it makes sense that it does (depending on test scope), and itβs what I could reproduce, including the fix.Example reproducer:
passItβs not an issue if the log comes before the client connection:
Output:
Itβs also not an issue if theyβre in the same event loop:
failEngine crashes if log is sent after an event loop has finished establishing a client connection:
Error:
fixI can fix the issue by making sure telemetry is initialized beforehand:
Output:
gmile commentedon Mar 2, 2025
What seems like a similar issue appears to still exist as of 0.16.2. I'm hitting it like this:
dagger functioncommand several timesRepeatedly running
dagger functionsucceeds most of the times, but occasionally would fail with either of these two errors:Full log