Lopy freezes after 6 - 12 hours



  • Hello everyone,

    i'm having some trouble with a lopy 4, it runs like expected for 6 -12 hours and suddenly freezes, no heartbeat anymore.
    Pushing the reset button brings it back to life.
    Here's some example code:

        wdt = WDT(timeout=4000) 
        while True:
    
         wdt.feed()
         foobar.read() 
        #foobar.read just reads serial data, send's data via raw-lora and writes data from lora 
           #back to serial. 
         gc.collect()
         machine.idle()
         print("main loop")
         time.sleep(1)
    

    Can someone explain why the watchdog doesn't work as expected or any idea why the lopy4 is acting up?

    Ps: Firmware is latest stable.



  • @crumble said in Lopy freezes after 6 - 12 hours:

    I do not understand why pycom does not declare the 1.20 branch as stable. It fixed so many errors for me that I like to see it as the stable branch. Maybe they want to deploy it together with some cloud changes. But 23 will be the better number for this ;)

    Features are still being worked on and improved. Even more stability cant hurt :D



  • @crumble

    stable does not mean the absence of error ;)

    I know, it's just frustrating because there is no real debubbing interface, but I will not throw in the towel so fast ;)

    Thanks again for your help!



  • @morpheus

    Something like that should not happen in a stable version.

    stable does not mean the absence of error ;)
    The problem is the used microcontroler. The ESP32 is young. So there are a lot of issues in hard- and software. Pycom just inherits these errors. To ensure the same behaviour, they cannot exchange the basic libraries in a stable branch. Changes in this area will have effects on the timings. If you have found an early slot to init the pytrack, you don't want to search for a new one when a small python error has been fixed.

    The amount of known error is really small ... compared to intel. But on intel machines you run really seldom into them. The ESP32 has some basic problems, which seems not to be fixed completly by the OS. I assume that most of my i2c problems can be blamed on the MC and the IDF.

    I do not understand why pycom does not declare the 1.20 branch as stable. It fixed so many errors for me that I like to see it as the stable branch. Maybe they want to deploy it together with some cloud changes. But 23 will be the better number for this ;)



  • @crumble your tip safed the day, i changed to unstable and the uptime now is >72h.
    Something like that should not happen in a stable version.



  • @crumble thanks, I will try out a the dev-branche today and give feedback tomorrow.
    Interesting detail, the error seems related with the activ watchdog and "higher" (20 bytes every 10 seconds) throughput on the serial interface.
    A older testdevice without a watchdog and less communication made it through two weeks without any issues.



  • The watchdog will work only, if you run into a python problem. If the OS fails with a Guru Meditation or you run into an ESP32 error, only an external watchdog will help.

    You can try the latest unstable version. On my task this version is much more stable than 1.18.x. Pycom updated esp idf which fixed a lot of stuff related to threads and timers.


Log in to reply
 

Pycom on Twitter