kytos-ng / kytos

Kytos SDN Platform. Kytos is designed to be easy to install, use, develop and share Network Apps (NApps).
https://kytos-ng.github.io/
MIT License
3 stars 7 forks source link

2022.3: socket.send on `msg_out_event_handler` crashed #475

Open viniarck opened 4 months ago

viniarck commented 4 months ago

This has been caught in prod on May 22, 2024:

<Task finished name='Task-7' coro=<Controller.msg_out_event_handler() done, defined at /usr/local/lib/python3.9/dist-packages/kytos/core/controller.py:607> exception=DeprecationWarning("Using sendall() method on sockets returned from get_extra_info('socket') will be prohibited in asyncio 3.9. Please report your use case to bugs.python.org.")>,
kytos $> controller._tasks[4].get_stack()
Out[174]:
[<frame at 0x5432670, file '/usr/local/lib/python3.9/dist-packages/kytos/core/controller.py', line 640, code msg_out_event_handler>,
 <frame at 0x538cf70, file '/usr/local/lib/python3.9/dist-packages/kytos/core/connection.py', line 97, code send>,
 <frame at 0x7faf04e54040, file '/usr/lib/python3.9/asyncio/trsock.py', line 150, code sendall>,
 <frame at 0x7faf04e54cf0, file '/usr/lib/python3.9/asyncio/trsock.py', line 20, code _na>]

However this part has been refactored and this warning has been mitigated on recent PRs when python was upgraded to 11, following std lib docs. Nevertheless, I'll leave this issue open, let's try to exercise switches connection/disconnection more.