Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print dans les scripts LUA de Calaos v3
#1
Question 
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 ?
  calaos-os-raspberrypi2-v3.0-alpha6-14-g341535a-2021-01-17 on Raspberry Pi 2 ▶ Wago_2.2/wago_881.pro on Wago 750-881 ▶ DS18B20 sensors on Pi GPIO ▶ Node-RED









Reply
#2
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.
Raoul,
Calaos Core Dev.
Calaos git sur NUC NUC5PPYH | Wago 750-849 | DALI RGB | Sondes NTC sur 750-464 | Sondes 1Wire DS18B20 avec adaptateur USB DS9490R | Nodes MySensors avec gateway USB | Ecran tactile ELO avec adaptateur USB/RS232 | Squeezebox Duet et Radio | Logitech Harmony Ultimate | Ampli Pioneer VSX921
Reply
#3
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 Undecided ) 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
  calaos-os-raspberrypi2-v3.0-alpha6-14-g341535a-2021-01-17 on Raspberry Pi 2 ▶ Wago_2.2/wago_881.pro on Wago 750-881 ▶ DS18B20 sensors on Pi GPIO ▶ Node-RED









Reply
#4
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.
Raoul,
Calaos Core Dev.
Calaos git sur NUC NUC5PPYH | Wago 750-849 | DALI RGB | Sondes NTC sur 750-464 | Sondes 1Wire DS18B20 avec adaptateur USB DS9490R | Nodes MySensors avec gateway USB | Ecran tactile ELO avec adaptateur USB/RS232 | Squeezebox Duet et Radio | Logitech Harmony Ultimate | Ampli Pioneer VSX921
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)