Luup restart, deadlock

@amg0

iPhone Locator is working well for me (thank you !). I currently have it monitoring 1 iPhone and i normally keep it muted. Whenever i open a door to the house, I unmute it for 10 minutes so it can update presence with no noticeable drain on my battery. In order to make sure i don’t miss an entry/exit i have triggers setup for a scene that does the unmute including door open/close, lock/unlock, alarm armed/disarmed, etc. – some of which i am sure occur within moments of each other at times.

Yesterday i had a luup restart and it looks like a deadlock with IL when likely > 1 of these triggered nearly at the same time.

Have you seen anything like this where a deadlock happens if IL is unmuted by a scene multiple times almost at once?

I can add logic to my scene to make sure it does not unmute if it just unmuted (if that is indeed causing the problem) but i wanted to flag this for you in case there is something going on underneath that is worth checking out. In particular in case this could be impacting others or if it might get worse one i add the other two iPhone accounts i need to add.

(Disclaimer: I am no Lua expert so my read of my logs could be entirely wrong and the deadlock might be related to something else entirely – and therefore i would be sorry for bothering you :wink:

I can PM you the log if it is helpful? I have also turned on debugging and verbose logging since the luup restart and will be able to send another better log if it happens again. Thanks.

[quote=“mda, post:1, topic:185761”]@amg0

iPhone Locator is working well for me (thank you !). I currently have it monitoring 1 iPhone and i normally keep it muted. Whenever i open a door to the house, I unmute it for 10 minutes so it can update presence with no noticeable drain on my battery. In order to make sure i don’t miss an entry/exit i have triggers setup for a scene that does the unmute including door open/close, lock/unlock, alarm armed/disarmed, etc. – some of which i am sure occur within moments of each other at times.

Yesterday i had a luup restart and it looks like a deadlock with IL when likely > 1 of these triggered nearly at the same time.

Have you seen anything like this where a deadlock happens if IL is unmuted by a scene multiple times almost at once?

I can add logic to my scene to make sure it does not unmute if it just unmuted (if that is indeed causing the problem) but i wanted to flag this for you in case there is something going on underneath that is worth checking out. In particular in case this could be impacting others or if it might get worse one i add the other two iPhone accounts i need to add.

(Disclaimer: I am no Lua expert so my read of my logs could be entirely wrong and the deadlock might be related to something else entirely – and therefore i would be sorry for bothering you :wink:

I can PM you the log if it is helpful? I have also turned on debugging and verbose logging since the luup restart and will be able to send another better log if it happens again. Thanks.[/quote]
Yes please send le the logs, this sounds interesting. You say it happens when several actions UnMute are happening together or close? I need to check but maybe it overloads vera, could be that I am not using Job properly and use Run instead. I think vera has a watch dog preventing RUN to take too much time while JOB does work asynchronous. It is just an idea I need to check ! tHx

Thanks. I am away from my vera traveling so I should be able to get the logs to you Friday (sorry for the delay).

ok here what I propose. when you can you capture the logs based on your current version. then you can also try this version ( attached ) where I have tried 2 things

  • use instead of in the I_xxx file so that the SetMute() method is managed asynchronously
  • in the SetMute() method, when the user unmutes, I was resuming the refresh engine of the IphoneLocator. Now, the same but I do it in using a timer so that the refresh starts in a seperate thread

if this works then we will know it was a a watchdog/action too long kind of issue.

You should NEVER make a web request in a RUN action.