Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Recommended Posts

Posted

Please login or register to see this code.

 

I'm not sure if this is 5.172.23 or earlier, but I don't want to downgrade to test....

If the QA above is saved as encrypted, .fqax, and installed again, there is a reasonable high probability that it starts 2 lua environment for the deviceId.
The output looks like

Please login or register to see this code.

So it seems to be 2 lua processes or environments started, as they don't share the lua global 'A'
The behavior is not consistent. Seven installations of the QA resulted in 2 having this "double instance" behavior.
However, some other forum members have also noticed this with their encrypted QAs.

 

I have seen this very sporadic in the past with older firmwares and unencrypted QAs, but it has been impossible to reproduce. 
 

----- speculation mode on -----

My investigation at that time steered me towards believing that it had something to do with installation of large files, a possibly resource low box, and a possible race condition when starting the Lua/QA process, resulting in doubles...

Maybe decryption, taking some time, makes the race condition more prominent?
---- speculation mode off -----

Anyway, here I got it twice in seven attempts, with a minimal QA, so I thought it's worth reporting ;-) 

 

  • Like 1
Posted

I can confirm strange things going on with the beta firmware combined with encrypted quickapp install files.
 

I have two install files from exact the same code and on the beta one keeps doubling the childs and the other not. On the stable version both install files work fine, no doubles. 
 

(5.170.16 versus 5.172.23)

  • Like 2
Posted

I had this problem with unencrypted QA’s. I first thought it was a log view glitch, but reading this it looks like a bug?

  • Like 1
Posted

My situation is that when I update a currently running QA (a large one, with multiple files) on HC3 version 5.170.16 using the fibemu run task mechanism, the result is that TWO QuickApps seem to be running but sharing a single UI. The logic and variables appear to be duplicated and work independently (as far as I can tell), while the UI remains the same. This becomes very noticeable when observing the frequency of interface updates.

Of course, only one device is shown in the device list...

I can't be absolutely sure, but I believe this is 100% reproducible - it happens every time. When I copy and paste code - this not happens.

I already mentioned this on the Forum, but it didn't attract any interest.

  • Topic Author
  • Posted
    32 minutes ago, Łukasz997 said:

    I can't be absolutely sure, but I believe this is 100% reproducible - it happens every time. When I copy and paste code - this not happens.

    If you save the QA, post it to me and I install it, it's not certain that it would have this behavior. @Neo Andersson have had this issue with customers' QAs. However, it was not reproducible for me.
    This lead me to think it's not just the QA code, but it also depends on the state of the HC3 box in general. CPU load, memory, etc.. which lead me to think of some kind of race condition when starting up QA processes. Ex. when things run smooth, stuff happens in predictable steps and no synchronization seems necessary, but when the system is loaded, stuff may happen in a slightly different order due to timing and the lack of an overall synchronization creates a "

    Please login or register to see this link.

    ". It's a common source of bugs in process based systems. ..and they can be notoriously difficult to track down...

     

    But in this case it's kind of a serious bug. For a simple QA updating some UI it may not be a huge problem, but for QAs controlling external systems, having two competing processes is not fun...
    Also, when I have the double processes as of above, if I delete the QA, it does disappear from the UI (and /devices/<deviceId>) but one processes continue to run producing the log output, but this time only one loop...

    The only way to get rid of the "ghost process" is to restart the HC3.

    Posted

    I have an encrypted install file of the Tibber Monitor quickapp, that ALWAYS doubles the childs on the beta version, it starts twice on init, but works fine on the stable version.

     

    A second encrypted install file, with exactly the same source code, doesn't has that behaviour, works fine on both beta and stable versions. 

    Posted
    1 godzinę temu, jgab napisał:

    If you save the QA, post it to me and I install it, it's not certain that it would have this behavior.

    I will do it, but give me some time - I have to reinstall fibemu. Alternatively I can try it with new hc3emu - I hope that mechanism is very similar.

     

    2 godziny temu, jgab napisał:

    The only way to get rid of the "ghost process" is to restart the HC3.

     

    My experience is the same - the 'ghost' can't be stopped other that by restart.

    Posted

    We will check it out, already tried to reproduce quickly but without luck.
    So it is possible that it is something more specific/random. 

    Posted

    I have two encrypted quickapp install files with the same code. One doubles in the beta, the other not. Both no doubles in the stable version. If you want them, I can send them. 

    Posted

    Please send them, it should help :)

    Posted

    So, we found out what is the cause and FYI, we are living with this for several versions now (both 5.170 and 5.160 was also affected) - there is a race condition there and depending on current system load it may happen in rare cases.

    I will keep you posted about the progress :)
     

    • Like 3
    • Thanks 2
    Posted

    Fix is done, it was quicker that expected.
    It will be included in upcoming 5.180 GA version of the hub :)

    • Thanks 3

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...