Product
BAML
Describe the bug
Summary
After upgrading @boundaryml/baml from 0.220.0 to 0.221.0, our application crashes with a tracing/storage panic originating from the BAML runtime.
The issue persists in 0.222.0.
Downgrading back to 0.220.0 resolves the problem completely.
Error
thread '<unnamed>' (128394) panicked at baml-runtime/src/tracingv2/storage/storage.rs:546:22:
Function log expected to be present (no FunctionStart event?). Did you forget to track_function()?
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5, aborting
Aborted (core dumped)
Versions tested
- ✅
@boundaryml/baml@0.220.0 — works
- ❌
@boundaryml/baml@0.221.0 — crashes
- ❌
@boundaryml/baml@0.222.0 — crashes
Expected behavior
BAML function calls should execute normally without runtime panics, and tracing/collector logs should be handled safely.
Actual behavior
The process aborts due to a Rust panic in:
baml-runtime/src/tracingv2/storage/storage.rs:546:22
The error indicates that a FunctionLog is being accessed without a corresponding FunctionStart event:
Function log expected to be present (no FunctionStart event?)
Additional context
- We are using Collector / tracing functionality.
- The issue appears to be a regression introduced in
0.221.0.
- Likely related to tracing v2 lifecycle or event ordering/cleanup.
Environment
- Node.js:
v22.15.0
- OS: Ubuntu 24.04.4 LTS
- Package manager: npm 10.9.2
- BAML package:
@boundaryml/baml
Notes / Hypothesis
This may be caused by:
- Missing or dropped
FunctionStart events in tracing v2
- Collector lifecycle or reference-counting issue
- Race condition or cleanup happening before logs are accessed
Please let me know if you'd like additional debug output (RUST_BACKTRACE=1, BAML_LOG=debug) or a minimal repro.
Reproduction Steps
Consistently reproducible after upgrading from 0.220.0 → 0.221.0+.
If needed, I can attempt to provide a minimal reproduction case.
BAML Version
No response
Language/Framework
None
LLM Provider
None
LLM Model
No response
Operating System
None
Browser
None
Code Editor
None
Product
BAML
Describe the bug
Summary
After upgrading
@boundaryml/bamlfrom0.220.0to0.221.0, our application crashes with a tracing/storage panic originating from the BAML runtime.The issue persists in
0.222.0.Downgrading back to
0.220.0resolves the problem completely.Error
Versions tested
@boundaryml/baml@0.220.0— works@boundaryml/baml@0.221.0— crashes@boundaryml/baml@0.222.0— crashesExpected behavior
BAML function calls should execute normally without runtime panics, and tracing/collector logs should be handled safely.
Actual behavior
The process aborts due to a Rust panic in:
The error indicates that a
FunctionLogis being accessed without a correspondingFunctionStartevent:Additional context
0.221.0.Environment
v22.15.0@boundaryml/bamlNotes / Hypothesis
This may be caused by:
FunctionStartevents in tracing v2Please let me know if you'd like additional debug output (
RUST_BACKTRACE=1,BAML_LOG=debug) or a minimal repro.Reproduction Steps
Consistently reproducible after upgrading from
0.220.0→0.221.0+.If needed, I can attempt to provide a minimal reproduction case.
BAML Version
No response
Language/Framework
None
LLM Provider
None
LLM Model
No response
Operating System
None
Browser
None
Code Editor
None