Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hanging IOBus Server at 100% CPU load #47

Open
Emantor opened this issue Jun 21, 2024 · 1 comment
Open

Hanging IOBus Server at 100% CPU load #47

Emantor opened this issue Jun 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Emantor
Copy link
Member

Emantor commented Jun 21, 2024

Today I observed a hanging IOBus Server with 100% one core load:

Jun 12 14:38:49 rlabD-srv systemd[1]: Starting lxa-iobus.service - LXA iobus Server...
Jun 12 14:38:49 rlabD-srv systemd[1]: Started lxa-iobus.service - LXA iobus Server.
Jun 12 14:38:53 rlabD-srv lxa-iobus-server[1225]: starting server on http://*:8080/
Jun 14 08:38:47 rlabD-srv lxa-iobus-server[1225]: WARNING:lxa-iobus.network:lss_ping: node <LxaBusNode(address=00000507.00000002.00000003.00000002, node_id=1)> does not respond
Jun 14 08:39:19 rlabD-srv lxa-iobus-server[1225]: WARNING:lxa-iobus.network:lss_ping: node <LxaBusNode(address=00000507.00000002.00000003.00000005, node_id=2)> does not respond
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: ERROR:aiohttp-json-rpc.server:list.remove(x): x not in list
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: Traceback (most recent call last):
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:   File "/usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py", line 325, in _handle_rpc_msg
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:     await self._ws_send_str(http_request, result)
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:   File "/usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py", line 278, in _ws_send_str
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:     self.clients.remove(client)
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: ValueError: list.remove(x): x not in list
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: ERROR:asyncio:Task exception was never retrieved
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: future: <Task finished name='Task-1938381' coro=<JsonRpc._handle_rpc_msg() done, defined at /usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py:283> exception=Val>
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: Traceback (most recent call last):
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:   File "/usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py", line 325, in _handle_rpc_msg
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:     await self._ws_send_str(http_request, result)
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:   File "/usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py", line 278, in _ws_send_str
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:     self.clients.remove(client)
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: ValueError: list.remove(x): x not in list
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: During handling of the above exception, another exception occurred:
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: Traceback (most recent call last):
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:   File "/usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py", line 339, in _handle_rpc_msg
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:     await self._ws_send_str(http_request, encode_error(
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:   File "/usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py", line 278, in _ws_send_str
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:     self.clients.remove(client)
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: ValueError: list.remove(x): x not in list
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: ERROR:aiohttp-json-rpc.server:list.remove(x): x not in list
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: Traceback (most recent call last):
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:   File "/usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py", line 325, in _handle_rpc_msg
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:     await self._ws_send_str(http_request, result)
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:   File "/usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py", line 278, in _ws_send_str
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:     self.clients.remove(client)
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: ValueError: list.remove(x): x not in list
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: ERROR:asyncio:Task exception was never retrieved
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: future: <Task finished name='Task-1938382' coro=<JsonRpc._handle_rpc_msg() done, defined at /usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py:283> exception=Val>
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: Traceback (most recent call last):
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:   File "/usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py", line 325, in _handle_rpc_msg
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:     await self._ws_send_str(http_request, result)
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:   File "/usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py", line 278, in _ws_send_str
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:     self.clients.remove(client)
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: ValueError: list.remove(x): x not in list
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: During handling of the above exception, another exception occurred:
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: Traceback (most recent call last):
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:   File "/usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py", line 339, in _handle_rpc_msg
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:     await self._ws_send_str(http_request, encode_error(
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:   File "/usr/ptx-venvs/lxa-iobus/lib/python3.11/site-packages/aiohttp_json_rpc/rpc.py", line 278, in _ws_send_str
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]:     self.clients.remove(client)
Jun 17 06:24:30 rlabD-srv lxa-iobus-server[1225]: ValueError: list.remove(x): x not in list

This looks like some issue related to client handling?

@SmithChart
Copy link
Member

aiohttp-json-rpc is discontinued. So we should think about removing it completely anyway.

I would like to keep this issue open. Maybe we can collect more occurrences - or at least let other know - until we find the time to remove aiohttp-json-rpc from this project.

@SmithChart SmithChart added the bug Something isn't working label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants