powerful-hairdresser-78108
07/31/2025, 6:10 AM�
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.DuplexClosedtall-airline-16756
07/31/2025, 6:10 AMtall-airline-16756
07/31/2025, 6:11 AMRoomInputOptions.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:
@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.