Hallo,
mein SmarthomeNG ist sehr störrisch beim beenden.
Umgebung:
Core: Master von heute
Plugin: Develop von heute
Python 3.5.3
Ubuntu Server
Das Problem tritt aber eigentlich schon seit sehr langer Zeit auf.
Beispiel:
SmarthomeNG im interactive mode:
STRG + C
Nach einigen Minuten: Nichts weiter passiert. Smarthome.py läuft weiter - console blockiert noch.
Wieder STRG + C
Dann terminiert der Prozess.
Ich konnte folgendes eingrenzen:
Das Problem tritt insbesondere dann auf, wenn Plugins aktiviert sind, die einen HTTP Socket bereitstellen (Backend, Alexa, Firtzbox etc). Es scheint so, als ob SmarthomeNG diese Kindsprozesse nicht sauber beenden kann.
Tritt dieses Verhalten bei euch auch auf? Anhand der Logs gehe ich davon aus, dass die Core Entwickler das Thema kennen.
Kann man etwas dagegen tun? Workaround/Fix?
Liebe Grüße
mode
mein SmarthomeNG ist sehr störrisch beim beenden.
Umgebung:
Core: Master von heute
Plugin: Develop von heute
Python 3.5.3
Ubuntu Server
Das Problem tritt aber eigentlich schon seit sehr langer Zeit auf.
Beispiel:
SmarthomeNG im interactive mode:
STRG + C
Code:
2017-12-28 15:36:40 INFO smarthome Main stop: Number of Threads: 34 -- smarthome.py:stop:498 2017-12-28 15:36:40 INFO plugin Main Stop plugins -- plugin.py:stop:306 2017-12-28 15:36:40 INFO service Main Alexa: service stopping -- service.py:stop:31 2017-12-28 15:36:41 WARNING module Main Stop Modules -- module.py:stop:337 2017-12-28 15:36:41 INFO __init__ Main http: Shutting down -- __init__.py:stop:610 [28/Dec/2017:15:36:41] ENGINE Bus STOPPING 2017-12-28 15:36:41 INFO _cplogging Main [28/Dec/2017:15:36:41] ENGINE Bus STOPPING -- _cplogging.py:error:214 [28/Dec/2017:15:36:41] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('192.168.6.99', 8384)) shut down 2017-12-28 15:36:41 INFO _cplogging Main [28/Dec/2017:15:36:41] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('192.168.6.99', 8384)) shut down -- _cplogging.py:error:214 [28/Dec/2017:15:36:41] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('192.168.6.99', 8383)) shut down 2017-12-28 15:36:41 INFO _cplogging Main [28/Dec/2017:15:36:41] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('192.168.6.99', 8383)) shut down -- _cplogging.py:error:214 [28/Dec/2017:15:36:41] ENGINE Stopped thread '_TimeoutMonitor'. 2017-12-28 15:36:41 INFO _cplogging Main [28/Dec/2017:15:36:41] ENGINE Stopped thread '_TimeoutMonitor'. -- _cplogging.py:error:214 [28/Dec/2017:15:36:41] ENGINE Bus STOPPED 2017-12-28 15:36:41 INFO _cplogging Main [28/Dec/2017:15:36:41] ENGINE Bus STOPPED -- _cplogging.py:error:214 [28/Dec/2017:15:36:41] ENGINE Bus EXITING 2017-12-28 15:36:41 INFO _cplogging Main [28/Dec/2017:15:36:41] ENGINE Bus EXITING -- _cplogging.py:error:214 [28/Dec/2017:15:36:41] ENGINE Bus EXITED 2017-12-28 15:36:41 INFO _cplogging Main [28/Dec/2017:15:36:41] ENGINE Bus EXITED -- _cplogging.py:error:214 2017-12-28 15:36:46 WARNING smarthome Main The following threads have not been terminated propperly by their plugins (please report to the plugin's author): -- smarthome.py:stop:535 2017-12-28 15:36:46 WARNING smarthome Main -Thread: Thread-29, still alive -- smarthome.py:stop:537 2017-12-28 15:36:46 WARNING smarthome Main -Thread: MonitoringService_avm_fritzbox_7490, still alive -- smarthome.py:stop:537 2017-12-28 15:36:46 WARNING smarthome Main -Thread: Thread-28, still alive -- smarthome.py:stop:537 2017-12-28 15:36:46 WARNING smarthome Main -Thread: Thread-30, still alive -- smarthome.py:stop:537 2017-12-28 15:36:46 WARNING smarthome Main SmartHomeNG stopped -- smarthome.py:stop:539
Wieder STRG + C
Code:
^C2017-12-28 15:40:34 INFO smarthome Main stop: Number of Threads: 5 -- smarthome.py:stop:498 2017-12-28 15:40:34 INFO plugin Main Stop plugins -- plugin.py:stop:306 2017-12-28 15:40:34 INFO service Main Alexa: service stopping -- service.py:stop:31 2017-12-28 15:40:34 WARNING module Main Stop Modules -- module.py:stop:337 2017-12-28 15:40:34 INFO __init__ Main http: Shutting down -- __init__.py:stop:610 [28/Dec/2017:15:40:34] ENGINE Bus STOPPING 2017-12-28 15:40:34 INFO _cplogging Main [28/Dec/2017:15:40:34] ENGINE Bus STOPPING -- _cplogging.py:error:214 [28/Dec/2017:15:40:34] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('192.168.6.99', 8384)) already shut down 2017-12-28 15:40:34 INFO _cplogging Main [28/Dec/2017:15:40:34] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('192.168.6.99', 8384)) already shut down -- _cplogging.py:error:214 [28/Dec/2017:15:40:34] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('192.168.6.99', 8383)) already shut down 2017-12-28 15:40:34 INFO _cplogging Main [28/Dec/2017:15:40:34] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('192.168.6.99', 8383)) already shut down -- _cplogging.py:error:214 [28/Dec/2017:15:40:34] ENGINE No thread running for None. 2017-12-28 15:40:34 INFO _cplogging Main [28/Dec/2017:15:40:34] ENGINE No thread running for None. -- _cplogging.py:error:214 [28/Dec/2017:15:40:34] ENGINE Bus STOPPED 2017-12-28 15:40:34 INFO _cplogging Main [28/Dec/2017:15:40:34] ENGINE Bus STOPPED -- _cplogging.py:error:214 [28/Dec/2017:15:40:34] ENGINE Bus EXITING 2017-12-28 15:40:34 INFO _cplogging Main [28/Dec/2017:15:40:34] ENGINE Bus EXITING -- _cplogging.py:error:214 [28/Dec/2017:15:40:34] ENGINE Bus EXITED 2017-12-28 15:40:34 INFO _cplogging Main [28/Dec/2017:15:40:34] ENGINE Bus EXITED -- _cplogging.py:error:214 2017-12-28 15:40:38 WARNING smarthome Main The following threads have not been terminated propperly by their plugins (please report to the plugin's author): -- smarthome.py:stop:535 2017-12-28 15:40:38 WARNING smarthome Main -Thread: Thread-29, still alive -- smarthome.py:stop:537 2017-12-28 15:40:38 WARNING smarthome Main -Thread: MonitoringService_avm_fritzbox_7490, still alive -- smarthome.py:stop:537 2017-12-28 15:40:38 WARNING smarthome Main -Thread: Thread-28, still alive -- smarthome.py:stop:537 2017-12-28 15:40:38 WARNING smarthome Main -Thread: Thread-30, still alive -- smarthome.py:stop:537 2017-12-28 15:40:38 WARNING smarthome Main SmartHomeNG stopped -- smarthome.py:stop:539 Exception ignored in: <module 'threading' from '/usr/lib/python3.5/threading.py'> Traceback (most recent call last): File "/usr/lib/python3.5/threading.py", line 1288, in _shutdown t.join() File "/usr/lib/python3.5/threading.py", line 1054, in join self._wait_for_tstate_lock() File "/usr/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock elif lock.acquire(block, timeout): File "/usr/local/bin/smarthome.py", line 546, in stop exit() File "/usr/lib/python3.5/_sitebuiltins.py", line 26, in __call__ raise SystemExit(code) SystemExit: None
Ich konnte folgendes eingrenzen:
Das Problem tritt insbesondere dann auf, wenn Plugins aktiviert sind, die einen HTTP Socket bereitstellen (Backend, Alexa, Firtzbox etc). Es scheint so, als ob SmarthomeNG diese Kindsprozesse nicht sauber beenden kann.
Tritt dieses Verhalten bei euch auch auf? Anhand der Logs gehe ich davon aus, dass die Core Entwickler das Thema kennen.
Kann man etwas dagegen tun? Workaround/Fix?
Liebe Grüße
mode
Kommentar