Page 1 of 1
Python plugin (slide-domoticz) crashes domoticz with signal 11
Posted: Tuesday 28 July 2020 15:47
by heggink
Every now and then, the slide-domoticz plugin crashes domoticz with a signal-11 on Plugin_ASIO. It only seems to happen when I open or close all slides at the same time. I noticed in another topic (
https://www.domoticz.com/forum/viewtopi ... IO#p243653) the same behaviour but cannot seem to figure out what the cause is.
The plugin can be found here:
https://github.com/lokonli/slide-domoti ... /plugin.py
@dnpwwo: could you take a quick look like you did with the other crash and see if you can detect anything conspicuous?
Input greatly appreciated.
H
Re: Python plugin (slide-domoticz) crashes domoticz with signal 11
Posted: Friday 07 August 2020 11:13
by heggink
turns out multiple successive http connect requests (6x in a row) messes up the pythoin plugin crashing domoticz with a seg fault

.
Re: Python plugin (slide-domoticz) crashes domoticz with signal 11
Posted: Saturday 08 August 2020 12:41
by Dnpwwo
Hi heggink,
I don't believe that the two topics are related, UDP and TCP and implemented using separate code and the TCP code is much more mature due to it's high usage.
The Plugin_ASIO thread handles all of the
ASynchronous
Input
Output for the Plugin Framework (technically it is one of a pool of threads but the pool size is currently set to 1) but mostly it handles connections and incoming data because TCP writes are synchronous for performance reasons.
In the absense of a stack trace I've had a look at the code and have questions around line 227:
if self.myConn.Connected() & (self.access_token != ''):
and (IMHO) there are 2 things wrong with this statement:
- The two conditions are very losely connected which is bad. If the access token is blank why does this statement trigger a reconnect in the else? It may still be connected
- but more importantly I don't a Python bit wise '&' operation is what was intended here. Shouldn't this be an 'and' comparison? I suspect this drives a lot of unnecessary reconnection.
Re: Python plugin (slide-domoticz) crashes domoticz with signal 11
Posted: Monday 10 August 2020 9:57
by heggink
Hey Dnpwwo,
Many thanks for the reply! I already changed the "&" into "and".
When you say "the 2 topics", which 2 topics do you mean?
Thanks again!
H