Open italovalcy opened 3 months ago
Running without tmux results in the same behavior:
# kytosd -f --database MongoDB
Web update - Web UI was not updated
2024-08-05 13:30:42,805 - INFO [kytos.core.db] (MainThread) Starting DB connection
2024-08-05 13:30:42,806 - INFO [kytos.core.db] (MainThread) Trying to run 'hello' command on MongoDB...
2024-08-05 13:30:42,832 - INFO [kytos.core.db] (MainThread) Ran 'hello' command on MongoDB successfully. It's ready!
...
kytos $> (you type CTRL+D)
Stopping Kytos daemon... Bye, see you!
2024-08-05 13:31:00,578 - INFO [kytos.core.controller] (MainThread) Stopping Kytos controller...
2024-08-05 13:31:00,578 - INFO [kytos.core.controller] (MainThread) Stopping Kytos
...
2024-08-05 13:31:00,612 - INFO [kytos.core.controller] (MainThread) Stopping API Server...
2024-08-05 13:31:00,612 - INFO [kytos.core.controller] (MainThread) Stopped API Server
2024-08-05 13:31:00,612 - INFO [kytos.core.controller] (MainThread) Stopping TCP Server...
2024-08-05 13:31:00,612 - INFO [kytos.core.controller] (MainThread) Stopped TCP Server
^CException ignored in: <module 'threading' from '/usr/lib/python3.11/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1583, in _shutdown
lock.acquire()
KeyboardInterrupt:
# date
Mon Aug 5 13:36:05 UTC 2024
Waited for 5min without success.
Found 1 cause of a possible hanging from coloring
. But it is not the case reported above.
Reasons for a long shutdown:
@retry
was triggered just before a shutdowntime.sleep()
was not finished. We could be using self.__event.wait()
from the Event in base instead so we do not wait for slept threads to wake up.These two do not hang, but with a large topology the shutdown could take up to a minute.
It's believed that with https://github.com/kytos-ng/kytos/pull/501 this issue has been indirectly fixed too. Since it hasn't been exactly reproduced we'll leave this issue here open for some more time and if it doesn't manifest or get reproduced it'll get closed. I've removed the 2024.1
label due to this considered indirectly fixed for the moment. Thanks, guys
Hi,
While running newest version of Kytos (from amlight/kytos:latest docker container), with tmux, Kytos takes forever to stop (in fact, I waited a long time and then just gave up and issue a CTRL+C):