```steno-chat-light | 2025-10-27 20:15:59,719 - I...
# agents
a
Copy code
steno-chat-light  | 2025-10-27 20:15:59,719 - INFO voice-agent - Session started successfully {"pid": 409, "job_id": "AJ_cfRagBP8gXda"}
steno-chat-light  | 
steno-chat-light  | thread 'tokio-runtime-worker' panicked at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/time.rs:1126:31:
steno-chat-light  | overflow when subtracting durations
steno-chat-light  | stack backtrace:
steno-chat-light  |    0:     0x7f6890a21262 - <unknown>
steno-chat-light  |    1:     0x7f6890a48533 - <unknown>
steno-chat-light  |    2:     0x7f6890a1da73 - <unknown>
steno-chat-light  |    3:     0x7f6890a210b2 - <unknown>
steno-chat-light  |    4:     0x7f6890a22563 - <unknown>
steno-chat-light  |    5:     0x7f6890a22345 - <unknown>
steno-chat-light  |    6:     0x7f6890a22f75 - <unknown>
steno-chat-light  |    7:     0x7f6890a22d0a - <unknown>
steno-chat-light  |    8:     0x7f6890a21769 - <unknown>
steno-chat-light  |    9:     0x7f6890a2299d - <unknown>
steno-chat-light  |   10:     0x7f6890a45a80 - <unknown>
steno-chat-light  |   11:     0x7f6890a45a5b - <unknown>
steno-chat-light  |   12:     0x7f688f6c7d26 - <unknown>
steno-chat-light  |   13:     0x7f688f6aeea6 - <unknown>
steno-chat-light  |   14:     0x7f688f72d194 - <unknown>
steno-chat-light  |   15:     0x7f688f6f2fb7 - <unknown>
steno-chat-light  |   16:     0x7f688f6f711e - <unknown>
steno-chat-light  |   17:     0x7f688f7042c5 - <unknown>
steno-chat-light  |   18:     0x7f688fb4a34b - <unknown>
steno-chat-light  |   19:     0x7f688fb49dbf - <unknown>
steno-chat-light  |   20:     0x7f688fb53536 - <unknown>
steno-chat-light  |   21:     0x7f688fb53658 - <unknown>
steno-chat-light  |   22:     0x7f688fb533fb - <unknown>
steno-chat-light  |   23:     0x7f688fb49905 - <unknown>
steno-chat-light  |   24:     0x7f688fb552b2 - <unknown>
steno-chat-light  |   25:     0x7f688fb54491 - <unknown>
steno-chat-light  |   26:     0x7f688fb47c6a - <unknown>
steno-chat-light  |   27:     0x7f688fb45501 - <unknown>
steno-chat-light  |   28:     0x7f688fb44958 - <unknown>
steno-chat-light  |   29:     0x7f688fb446dd - <unknown>
steno-chat-light  |   30:     0x7f688fb4604b - <unknown>
steno-chat-light  |   31:     0x7f688fb4712c - <unknown>
steno-chat-light  |   32:     0x7f688fb5970b - <unknown>
steno-chat-light  |   33:     0x7f688fb59e17 - <unknown>
steno-chat-light  |   34:     0x7f6890a25c2f - <unknown>
steno-chat-light  |   35:     0x7f68988d7b7b - <unknown>
steno-chat-light  |   36:     0x7f68989555f0 - __clone
steno-chat-light  |   37:                0x0 - <unknown>
steno-chat-light  | FFI Panic:  task 140 panicked
steno-chat-light  | 2025-10-27 20:15:59,778 - ERROR livekit.agents - process exited with non-zero exit code -15 {"pid": 409, "job_id": "AJ_cfRagBP8gXda"}
Hi, I tried updating my livekit to 1.2.16 today, but I am receiving the above error. I tried going back to 1.2.11, but the error persist which is strange. I have tried everything I can to get rid of it, but I can't figure it out. Could someone help? Thanks
I was able to resolve this by removing the timeout in my rpc call. Here is a write-up from Claude: The Bug The error was: thread 'tokio-runtime-worker' panicked at .../library/core/src/time.rs112631: overflow when subtracting durations This is a Rust-level panic in the LiveKit SDK's FFI layer. Here's the technical breakdown: Why Duration Subtraction Overflows in Rust In Rust, Duration represents positive time spans and cannot be negative. When you subtract durations: let d1 = Duration::from_secs(1); let d2 = Duration::from_secs(5); let result = d1 - d2; // PANIC! Can't have negative duration What the LiveKit SDK Does When you call perform_rpc(response_timeout=5.0): 1. The Rust layer calculates a deadline: current_time + 5.0 seconds 2. Later, it calculates remaining time: deadline - current_time 3. If current_time > deadline (deadline already passed), the subtraction overflows and panics Why It Happened Here Looking at your logs: - Session started: 212754.688 - RPC called: 212755.189 (0.5 seconds later) There's likely a timing bug in the LiveKit SDK where: - Some internal clock/timestamp initialization happens after session.start() - When perform_rpc tries to calculate the timeout, it uses an uninitialized or stale timestamp - The SDK thinks the deadline has already passed before the call even starts - deadline - current_time becomes negative → panic Why Removing the Timeout Works Without the response_timeout parameter, the SDK either: 1. Uses a default timeout calculated differently (without the bug) 2. Uses no timeout at all (waits indefinitely) 3. Takes a different code path that doesn't have the overflow bug The Real Issue This is definitely a bug in the LiveKit Python SDK (specifically the Rust FFI bindings). The timeout parameter should never cause a panic - at worst, it should raise a proper Python exception or timeout gracefully. You should probably report this to the LiveKit team, but for now, removing the timeout works perfectly fine. RPCs will still complete (your frontend handler returns quickly anyway), they just won't have an explicit 5-second timeout.