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
{{ message }}
Repository navigation
Commit 3532fda
Browse filesBrowse the repository at this point in the historyBrowse files
Report where every task is stuck, and name deadlocks
When a run hangs there was nothing to go on: Ctrl-C cancelled the program,
a test timeout said only that it timed out, and the shutdown leak warning
named only spawn sites. Now each of them shows every unfinished task's
BAML stack, what it waits for, and any cycle of tasks waiting on each
other:
task 11 (spawned in user.main), waiting for a key held by task 12
File "main.baml", line 46, in user.transfer
File "main.baml", line 23, in user.Ledger.record
task 12 (spawned in user.main), waiting for a key held by task 11
File "main.baml", line 30, in user.Ledger.audit
File "main.baml", line 15, in user.Account.balance_now
deadlock: task 11 waits for a key held by task 12, which waits for a
key held by task 11
- `BexEngine::task_report` stops every task as a collection does, and reads
each one's stack and why it parked. A task notes that reason when it parks
(a sys-op, an await, spawn admission): one store, nothing recorded while
it runs. The `baml.sync` key table supplies who holds each key; awaits
link a task to the one settling its future.
- `baml run`: the first Ctrl-C prints the report, then cancels as before.
- `baml test`: a timed-out test's failure message carries the report for
the test body and every task it waits on.
- Shutdown: each leaked future's task is shown under the leak warning.
- `Future.stack_trace()` returns where the task settling a future is right
now, so a program can notice a stuck task, report it and cancel it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: baml_language/crates/baml_cli/src/snapshots/baml_cli__describe_command_tests__render_builtin_package_listing.snap
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -105,15 +105,15 @@ class baml.fs.Lock <builtin>/baml/ns_fs/fs.baml:2
0 commit comments