Stability with Python Plugins

Python and python framework

Moderator: leecollings

micha_pr
Posts: 82
Joined: Friday 24 October 2014 12:26
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Germany, near Berlin
Contact:

Re: Stability with Python Plugins

Post by micha_pr »

Code: Select all

2017-12-24 10:03:06.094  Error: Domoticz received fatal signal 11 !...
2017-12-24 10:03:06.094  Error: Domoticz received fatal signal 11 while backtracing !...
2017-12-24 10:03:06.099  Error:   /home/pi/domoticz/domoticz() [0x236be4]
2017-12-24 10:03:06.099  Error:   /home/pi/domoticz/domoticz(_Z14signal_handleri+0x4c) [0x236c9c]
2017-12-24 10:03:06.099  Error:   /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x76c04180]

Code: Select all

2017-12-24 10:20:58.128  Error: Domoticz received fatal signal 6 !...
2017-12-24 10:20:58.131  Error:   /home/pi/domoticz/domoticz() [0x236be4]
2017-12-24 10:20:58.131  Error:   /home/pi/domoticz/domoticz(_Z14signal_handleri+0x4c) [0x236c9c]
2017-12-24 10:20:58.131  Error:   /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x76cd0180]
2017-12-24 10:20:58.131  Error:   /lib/arm-linux-gnueabihf/libc.so.6(gsignal+0x38) [0x76ccef70]
But without the "CConnection" line in this time...
(version 3.8796)
Michael Pruefer
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)
micha_pr
Posts: 82
Joined: Friday 24 October 2014 12:26
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Germany, near Berlin
Contact:

Re: Stability with Python Plugins

Post by micha_pr »

Not sure why,... but I made a second installation now with Stretch and new Python version - now all is stable since more than two hours.
It was not possible before.
At other installation nothing else was installed - it was also a minimal system with Z-Wave-stick only for plugin testing, but Jessie with Python version 3.4.2.
Using Beta 3.8796.
Michael Pruefer
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)
Noudje
Posts: 16
Joined: Monday 25 January 2016 23:07
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta

Re: Stability with Python Plugins

Post by Noudje »

I also have less problems with a complete new install on Stretch. All plugins work great!!! Also the Kodi plugin is better then the standard interface :) .
I only have sometimes problems with Connections. Last I did 'import urllib.request' and the plugin didn't work. I commented out this line and the plugin was working again. I have to investigate this again, also because something is changed during the last update.
Raspberry Pi 2 with latest beta version
1x Aeon Labs USB Z-Stick S2
5x Fibaro Modules
micha_pr
Posts: 82
Joined: Friday 24 October 2014 12:26
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Germany, near Berlin
Contact:

Re: Stability with Python Plugins

Post by micha_pr »

I have seen that any enabled Python Event (the integrated one in Event system with Lua, Blockly...) will cause this error.
Even if enable the sample code the signal 11 error will come up.

It's not easy to go back - because system hang very fast...
Enable sample event:

Code: Select all

2017-12-27 16:21:38.559  EventSystem: reset all events...
2017-12-27 16:21:39.249  Error: Domoticz received fatal signal 11 !...
2017-12-27 16:21:39.251  Error:   /home/pi/domoticz/domoticz() [0x236be4]
2017-12-27 16:21:39.251  Error:   /home/pi/domoticz/domoticz(_Z14signal_handleri+0x4c) [0x236c9c]
2017-12-27 16:21:39.251  Error:   /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0x76be06b0]
restarting Domoticz - all is ok, while not python event will be fired:

Code: Select all

2017-12-27 16:23:35.646  RxQueue: queue worker started...
2017-12-27 16:23:35.757  Incoming connection from: 192.168.178.185
2017-12-27 16:23:37.646  Hardware Monitor: Started
2017-12-27 16:23:37.662  EventSystem: reset all events...
2017-12-27 16:23:37.663  EventSystem: reset all device statuses...
2017-12-27 16:23:37.801  Python EventSystem: Initalizing event module.
2017-12-27 16:23:37.802  EventSystem: Queue thread started...
2017-12-27 16:23:37.802  EventSystem: Started
2017-12-27 16:23:38.039  PluginSystem: Entering work loop.
2017-12-27 16:24:00.433  Error: Domoticz received fatal signal 11 !...
2017-12-27 16:24:00.435  Error:   /home/pi/domoticz/domoticz() [0x236be4]
2017-12-27 16:24:00.435  Error:   /home/pi/domoticz/domoticz(_Z14signal_handleri+0x4c) [0x236c9c]
2017-12-27 16:24:00.435  Error:   /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0x76c4f6b0]
-> Disable python event, all is ok again...
Michael Pruefer
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Stability with Python Plugins

Post by Dnpwwo »

@micha_pr ,

Can you post the event source that used and if you stored it in a file or the database.

I will try and reproduce it if you do.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
micha_pr
Posts: 82
Joined: Friday 24 October 2014 12:26
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Germany, near Berlin
Contact:

Re: Stability with Python Plugins

Post by micha_pr »

Dnpwwo wrote: Friday 29 December 2017 9:00 @micha_pr ,

Can you post the event source that used and if you stored it in a file or the database.

I will try and reproduce it if you do.
I have used for testing the sample code (with setting "All") only-

Thanks!
Michael Pruefer
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Stability with Python Plugins

Post by Dnpwwo »

@micha_pr,

Thanks. I used the sample as you suggested and could easily get Domoticz to crash quite reliably which was great (kind of :( ).

Anyway I found an issue in the event system where it was potentially clashing with the Plugin Framework and resolved it. I also found some places where the Plugin Framework was not locking properly either.

I've pushed an update so it will be in the next beta, fingers crossed :!:
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
micha_pr
Posts: 82
Joined: Friday 24 October 2014 12:26
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Germany, near Berlin
Contact:

Re: Stability with Python Plugins

Post by micha_pr »

@Dnpwwo:
In 3.8798 I have still same problem - not sure, your patch is inside?

Thanks!
Michael Pruefer
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Stability with Python Plugins

Post by Dnpwwo »

@micha_pr,

I assume so but I don't run betas (I build from source).

That said, there are 21 outstanding pull requests so may gizmocuz has taken an Xmas holiday.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
micha_pr
Posts: 82
Joined: Friday 24 October 2014 12:26
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Germany, near Berlin
Contact:

Re: Stability with Python Plugins

Post by micha_pr »

Just updated to 3.8799 - at Stretch with Python 3.5.3

Removed the running Python plugin - and created a new integrated Python event - have taken the sample event - not with "All" but in this time with "Device"

Changed a dummy device level - and got again this:

Code: Select all

2018-01-06 16:37:40.461  EventSystem: reset all events...
2018-01-06 16:37:58.759  User: Admin initiated a switch command (33/test-selector/Set Level)
2018-01-06 16:37:58.780  (dummy) Light/Switch (test-selector)
2018-01-06 16:37:58.892  Error: Domoticz received fatal signal 11 !...
2018-01-06 16:37:58.894  Error:   /home/pi/domoticz/domoticz() [0x237154]
2018-01-06 16:37:58.895  Error:   /home/pi/domoticz/domoticz(_Z14signal_handleri+0x4c) [0x23720c]
2018-01-06 16:37:58.895  Error:   /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0x76c786b0]
What is your pull request (can not find it in list)?

Maybe your source is different from build - any other/additional files?

Thanks!
Michael Pruefer
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest