Print dans les scripts LUA de Calaos v3 - mifrey - 03-19-2017
En v2 j'avais l'habitude d'utiliser des instructions "print(script_name .. ": xxx")" dans mes scripts LUA pour pourvoir facilement les debugger avec un "journalctl -lu calaos-server". En v3, les print ne sont plus visibles dans le journal, probablement car calao-server n'execute plus directement les scripts mais appelle le programme calaos_script. Comment faire maintenant ? Les print sont-il enregistres autre part ?
RE: Print dans les scripts LUA de Calaos v3 - raoulh - 03-20-2017
J'ai deja corrigé ca dans calaos_base sur le git.
C'est pas encore a jour dans les images calaos-os v3. Prochain build ca sera dedant.
RE: Print dans les scripts LUA de Calaos v3 - mifrey - 03-21-2017
Ha ok. Pas d'autre moyen pour debugger ? Pcq je dois dire que j'ai pas mal de problemes avec les scripts. Beaucoup ne s'executent pas comme avant (et ca m'empeche de vivre comme avant ) et j'ai l'impression que sont eux qui font planter calaos-server. Ca plante assez souvent.
Ca termine toujours avec un
Code: calaos-server.service: Main process exited, code=dumped, status=11/SEGV
ou
Code: calaos-server.service: Main process exited, code=dumped, status=6/ABRT
Exemple de plantage :
Code: Mar 21 19:18:09 raspberrypi calaos_server[1847]: [INF] lua (ScriptExec.cpp:94) LUA process terminated. (0x1fb3b28)
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] network (UDPServer.cpp:92) received input 15 state=1
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (WIDigitalBP.cpp:81) Got 1 on std input 15
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (InputSwitch.cpp:62) input_43: 1
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] lua (ScriptExec.cpp:39) Starting script. (0x1fb2b38)
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] process (ExternProc.cpp:169) Starting process: /usr/bin/calaos_script --socket /tmp/calaos_proc_ea1520c4-01a7-f63c-0bde-29903e1e9f67_lua_1847 --namespace lua
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] rule (Rule.cpp:143) Rule(Salle de douche,SDD-L2): Starting execution (1 actions)
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] output (OutputLight.cpp:73) output_27: got action, True
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] rule (Rule.cpp:152) Rule(Salle de douche,SDD-L2): Execution done.
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] network (UDPServer.cpp:92) received input 16 state=1
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (WIDigitalBP.cpp:81) Got 1 on std input 16
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (InputSwitch.cpp:62) input_44: 1
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] lua (ScriptExec.cpp:39) Starting script. (0x1f73c18)
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] process (ExternProc.cpp:169) Starting process: /usr/bin/calaos_script --socket /tmp/calaos_proc_5536c03d-4a66-81be-4719-7f12f41110e1_lua_1847 --namespace lua
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] rule (Rule.cpp:143) Rule(Salle de douche,SDD-L1): Starting execution (1 actions)
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] output (OutputLight.cpp:73) output_26: got action, True
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] rule (Rule.cpp:152) Rule(Salle de douche,SDD-L1): Execution done.
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (WIDigitalBP.cpp:109) input_43: Reading initial state: true
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (WebInputString.cpp:84) Read string value : peu nuageux
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] network (UDPServer.cpp:92) received input 16 state=0
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (WIDigitalBP.cpp:81) Got 0 on std input 16
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (InputSwitch.cpp:62) input_44: 0
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] lua (ScriptExec.cpp:39) Starting script. (0x1facf08)
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] process (ExternProc.cpp:169) Starting process: /usr/bin/calaos_script --socket /tmp/calaos_proc_68792203-6040-a4c0-437c-941396e139a7_lua_1847 --namespace lua
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] network (UDPServer.cpp:92) received input 15 state=0
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (WIDigitalBP.cpp:81) Got 0 on std input 15
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (InputSwitch.cpp:62) input_43: 0
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] lua (ScriptExec.cpp:39) Starting script. (0x1faee80)
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] process (ExternProc.cpp:169) Starting process: /usr/bin/calaos_script --socket /tmp/calaos_proc_522cf165-6b92-bc20-0f14-5c63619ea5ea_lua_1847 --namespace lua
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (WebInputString.cpp:84) Read string value : peu nuageux
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] output (InputTimer.cpp:79) input_58: got action, Start Timer
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] output (IntValue.cpp:117) intern_0: got action, 1
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] lua (ScriptExec.cpp:68) LUA script finished.
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] rule.condition.script (ConditionScript.cpp:46) Script finished with false
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (WebInputString.cpp:84) Read string value : peu nuageux
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] input (WebInputString.cpp:84) Read string value : peu nuageux
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [CRI] process (ExternProc.cpp:76) Error sending data!
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [CRI] process (ExternProc.cpp:76) Error sending data!
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [CRI] process (ExternProc.cpp:76) Error sending data!
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] lua (ScriptExec.cpp:94) LUA process terminated. (0x1fb2b38)
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] lua (ScriptExec.cpp:94) LUA process terminated. (0x1f73c18)
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] rule.condition.script (ConditionScript.cpp:46) Script finished with false
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] lua (ScriptExec.cpp:94) LUA process terminated. (0x1facf08)
Mar 21 19:18:16 raspberrypi calaos_server[1847]: [INF] rule.condition.script (ConditionScript.cpp:46) Script finished with false
Mar 21 19:18:16 raspberrypi systemd[1]: calaos-server.service: Main process exited, code=dumped, status=11/SEGV
Mar 21 19:18:16 raspberrypi systemd[1]: calaos-server.service: Unit entered failed state.
Mar 21 19:18:16 raspberrypi systemd[1]: calaos-server.service: Failed with result 'core-dump'.
Mar 21 19:18:16 raspberrypi systemd[1]: calaos-server.service: Service has no hold-off time, scheduling restart.
Mar 21 19:18:16 raspberrypi systemd[1]: Stopped Calaos home automation server service.
Mar 21 19:18:16 raspberrypi systemd[1]: Starting Calaos home automation server service...
Mar 21 19:18:16 raspberrypi systemd[1]: Started Calaos home automation server service.
Mar 21 19:18:16 raspberrypi calaos_server[4536]: ╔═══════════════════════════════════════════════╗
Mar 21 19:18:16 raspberrypi calaos_server[4536]: ║ ║
Mar 21 19:18:16 raspberrypi calaos_server[4536]: ║ Calaos Server Daemon - http://www.calaos.fr ║
Mar 21 19:18:16 raspberrypi calaos_server[4536]: ║ v3.0-alpha3 ║
Mar 21 19:18:16 raspberrypi calaos_server[4536]: ╚═══════════════════════════════════════════════╝
EDIT : Suite ici https://calaos.fr/forum/showthread.php?tid=760
RE: Print dans les scripts LUA de Calaos v3 - raoulh - 03-22-2017
J'aimerai bien ta config pour que je puisse debuguer ces crash !
Sinon je vais faire un build de calaos-os de nouveau cette semaine.
|