Open cancundeyingzi opened 8 months ago
因为 funasr-onnx 有个低级错误没改过来,要手工修整一下,see #35
现在2-3秒以上录音发送后经常导致服务器死机,具体表现为todesk显示掉线,ssh一直连接中,显示屏卡住在那一帧...(有点像无响应) 似乎是特定系统/设备的问题,树莓派现在百分百复现,amd64机器稳定不复现
Exception ignored in atexit callback: <function _exit_function at 0x7fff89b393a0>
Traceback (most recent call last):
File "/usr/lib/python3.11/multiprocessing/util.py", line 334, in _exit_function
_run_finalizers(0)
File "/usr/lib/python3.11/multiprocessing/util.py", line 300, in _run_finalizers
finalizer()
File "/usr/lib/python3.11/multiprocessing/util.py", line 224, in __call__
res = self._callback(*self._args, **self._kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/managers.py", line 676, in _finalize_manager
process.join(timeout=shutdown_timeout)
File "/usr/lib/python3.11/multiprocessing/process.py", line 149, in join
res = self._popen.wait(timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/popen_fork.py", line 40, in wait
if not wait([self.sentinel], timeout):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/connection.py", line 930, in wait
ready = selector.select(timeout)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/selectors.py", line 415, in select
fd_event_list = self._selector.poll(timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt:
Task exception was never retrieved
future: <Task finished name='Task-6' coro=<WebSocketServerProtocol.handler() done, defined at /home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/.venv/lib/python3.11/site-packages/websockets/legacy/server.py:155> exception=KeyboardInterrupt()>
Traceback (most recent call last):
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/core_server.py", line 56, in main
await asyncio.gather(recv, send)
File "/home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/util/server_ws_send.py", line 20, in ws_send
result: Result = await to_thread(queue_out.get)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/util/asyncio_to_thread.py", line 28, in to_thread
return await loop.run_in_executor(None, func_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 123, in run
raise KeyboardInterrupt()
KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/util/server_ws_recv.py", line 111, in ws_recv
async for message in websocket:
File "/home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 498, in __aiter__
yield await self.recv()
^^^^^^^^^^^^^^^^^
File "/home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 552, in recv
await asyncio.wait(
File "/usr/lib/python3.11/asyncio/tasks.py", line 418, in wait
return await _wait(fs, timeout, return_when, loop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/tasks.py", line 525, in _wait
await waiter
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/core_server.py", line 61, in init
asyncio.run(main())
File "/usr/lib/python3.11/asyncio/runners.py", line 189, in run
with Runner(debug=debug) as runner:
File "/usr/lib/python3.11/asyncio/runners.py", line 63, in __exit__
self.close()
File "/usr/lib/python3.11/asyncio/runners.py", line 71, in close
_cancel_all_tasks(loop)
File "/usr/lib/python3.11/asyncio/runners.py", line 201, in _cancel_all_tasks
loop.run_until_complete(tasks.gather(*to_cancel, return_exceptions=True))
File "/usr/lib/python3.11/asyncio/base_events.py", line 640, in run_until_complete
self.run_forever()
File "/usr/lib/python3.11/asyncio/base_events.py", line 607, in run_forever
self._run_once()
File "/usr/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once
handle._run()
File "/usr/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/.venv/lib/python3.11/site-packages/websockets/legacy/server.py", line 236, in handler
await self.ws_handler(self)
File "/home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/util/server_ws_recv.py", line 130, in ws_recv
sockets_id.remove(str(websocket.id))
File "<string>", line 2, in remove
File "/usr/lib/python3.11/multiprocessing/managers.py", line 822, in _callmethod
kind, result = conn.recv()
^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/connection.py", line 249, in recv
buf = self._recv_bytes()
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/connection.py", line 413, in _recv_bytes
buf = self._recv(4)
^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/connection.py", line 378, in _recv
chunk = read(handle, remaining)
^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
Task was destroyed but it is pending!
task: <Task cancelling name='Task-9' coro=<WebSocketCommonProtocol.close_connection() running at /home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py:1301> wait_for=<Task cancelled name='Task-7' coro=<WebSocketCommonProtocol.transfer_data() done, defined at /home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py:954>> cb=[gather.<locals>._done_callback() at /usr/lib/python3.11/asyncio/tasks.py:754]>
Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x7fff7def36b0>
Traceback (most recent call last):
File "/home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 1337, in close_connection
await self.close_transport()
File "/home/cancundeyingzi/python/CapsWriter-Offline-Windows-64bit/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 1353, in close_transport
self.transport.close()
File "/usr/lib/python3.11/asyncio/selector_events.py", line 839, in close
self._loop.call_soon(self._call_connection_lost, None)
File "/usr/lib/python3.11/asyncio/base_events.py", line 761, in call_soon
self._check_closed()
File "/usr/lib/python3.11/asyncio/base_events.py", line 519, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <Finalize object, dead>
Traceback (most recent call last):
File "/usr/lib/python3.11/multiprocessing/util.py", line 224, in __call__
File "/usr/lib/python3.11/multiprocessing/util.py", line 466, in close_fds
AttributeError: 'NoneType' object has no attribute 'close'
Exception ignored in: <Finalize object, dead>
Traceback (most recent call last):
File "/usr/lib/python3.11/multiprocessing/util.py", line 224, in __call__
File "/usr/lib/python3.11/multiprocessing/util.py", line 466, in close_fds
AttributeError: 'NoneType' object has no attribute 'close'
官方改包,原问题终结