5-07-31 11:39:20,503 - DEBUG livekit.agents - sess...
# ask-ai
p
2025-07-31 113920,503 - DEBUG livekit.agents - session closed {"reason": "participant_disconnected", "error": null} 2025-07-31 113940,914 - DEBUG livekit.agents - shutting down job task {"reason": "", "user_initiated": false} thread 'tokio-runtime-worker' panicked at webrtc-sys\src\rtc_error.rs:71:52: byte index 8 is out of bounds of
�
note: run with
RUST_BACKTRACE=1
environment variable to display a backtrace FFI Panic: task 4762 panicked 2025-07-31 113940,916 - DEBUG livekit.agents - job exiting {"reason": "", "tid": 33972, "job_id": "AJ_G9fAn6KiV6tJ"} Process inference_proc: Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\windows_events.py", line 494, in finish_recv return ov.getresult() ^^^^^^^^^^^^^^ OSError: [WinError 64] The specified network name is no longer available During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\python-agents-examples-main\windows_env\Lib\site-packages\livekit\agents\utils\aio\duplex_unix.py", line 57, in aclose await self._writer.wait_closed() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\streams.py", line 364, in wait_closed await self._protocol._get_close_waiter(self) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 286, in _loop_reading length = fut.result() ^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\windows_events.py", line 854, in _poll value = callback(transferred, key, ov) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\windows_events.py", line 498, in finish_recv raise ConnectionResetError(*exc.args) ConnectionResetError: [WinError 64] The specified network name is no longer available The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 314, in _bootstrap self.run() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "D:\python-agents-examples-main\windows_env\Lib\site-packages\livekit\agents\ipc\inference_proc_lazy_main.py", line 63, in proc_main client.run() File "D:\python-agents-examples-main\windows_env\Lib\site-packages\livekit\agents\ipc\proc_client.py", line 85, in run loop.run_until_complete(self._task) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 654, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "D:\python-agents-examples-main\windows_env\Lib\site-packages\livekit\agents\ipc\proc_client.py", line 161, in _monitor_task await self._acch.aclose() File "D:\python-agents-examples-main\windows_env\Lib\site-packages\livekit\agents\utils\aio\duplex_unix.py", line 60, in aclose raise DuplexClosed() from e livekit.agents.utils.aio.duplex_unix.DuplexClosed
t
Thanks for reaching out, Avinash. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The logs you provided indicate several issues, including participant disconnections, job task shutdowns, and a Windows-specific connection reset error. Below are troubleshooting steps for each: 1. Participant Disconnected Errors: • Check if the session is being closed automatically due to participant disconnection. You can disable this by setting
RoomInputOptions.close_on_disconnect=False
. • Monitor disconnect reasons such as
DUPLICATE_IDENTITY
,
ROOM_DELETED
, or
PARTICIPANT_REMOVED
. • Handle connection state changes by monitoring events like
ParticipantDisconnected
,
Reconnecting
, and
Reconnected
. 2. Shutting Down Job Task Errors: • Ensure proper connection handling by calling
job_ctx.connect()
within 10 seconds to avoid warnings. • Implement proper shutdown handling using session close callbacks, for example:
Copy code
@session.on("close")
def on_close(ev: CloseEvent):
    print(f"Agent Session closed, reason: {ev.reason}")
• Monitor job lifecycle logs to understand shutdown reasons. 3. Connection Reset Errors: • Check network stability, as connection resets often indicate network issues. • Monitor reconnection attempts, as LiveKit automatically tries to reconnect through ICE restarts. • Implement connection state monitoring to detect and respond to network issues proactively. If the issue persists, especially the Windows-specific
ConnectionResetError: [WinError 64]
, further platform-specific troubleshooting may be required. Let me know if you need additional assistance or have more details to share.