Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Random Core Panic with Lora Socket send/recv, device doesnt restart - try with CONFIG_ESP32_PANIC_SILENT_REBOOT

    Scheduled Pinned Locked Moved Issues & Bugs
    4 Posts 2 Posters 405 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      ps47
      last edited by

      Dear Pycom Forum

      We are running Pycom Firmware LoPy4-1.20.1.r1 with frozen modules.
      Randomly our Device crashes with attached core panic when multiple threats are using the lora socket send/recv.
      Apart from the crash, it would be no problem, if the device would restart. But it doesn't.
      All threats and actions are locked.
      Only manually taking of the power helps.

      I read that core panics should always restart. per default following option is true.
      CONFIG_ESP32_PANIC_PRINT_REBOOT

      I was thinking that because the core panic print breaks somehow in the middle, the esp32 can't recover, and in the core panic handler is a problem, which cause that reboot part is not triggered.

      I had the idea to disable the print, that the reboot is directly triggered by disabling CONFIG_ESP32_PANIC_PRINT_REBOOT
      but enabling

      CONFIG_ESP32_PANIC_SILENT_REBOOT
      

      After searching around I changed the values with no effect in
      pycom-micropython-sigfox/esp32/sdkconfig.h

      after I found out that the
      pycom-micropython-sigfox is using the pycom-esp-idf/wifi/scan reference.
      So I changed there the sdkconfig and runned "make all"

      When building the firmware with, also no change. Core panic is still printed.

      make BOARD=LOPY4 FS=LFS release
      

      I saw that the .a reference files are not updated in
      pycom-micropython-sigfox/esp32/

      when trying to run the copy over script get_idf_libs.py , i get a path missmatch.

      ascals-MacBook-Pro:esp32 pascalschaefer$ python get_idf_libs.py --idflibs ~/development/pycom-esp-idf/examples/wifi/scan/build
      Couldn't Copy IDF libs defaulting to Local Lib Folders!
      Traceback (most recent call last):
        File "get_idf_libs.py", line 26, in main
          shutil.copy(src + '/bootloader/bootloader_support/libbootloader_support.a', dsttmpbl)
        File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shutil.py", line 245, in copy
          copyfile(src, dst, follow_symlinks=follow_symlinks)
        File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shutil.py", line 120, in copyfile
          with open(src, 'rb') as fsrc:
      FileNotFoundError: [Errno 2] No such file or directory: '/Users/pascalschaefer/development/pycom-esp-idf/examples/wifi/scan/build/bootloader/bootloader_support/libbootloader_support.a'
      

      The File is actually in

      /wifi/scan/build/bootloader_support/libbootloader_support.a
      

      I am a bit confused.
      Does somebody know how it is intended to copy over the full modified esp32 build into the pycom folder. that the following esp32 configuration value changes, and maybe the device restarts ? Does the sdkconfig.h also needs to be changed?

      CONFIG_ESP32_PANIC_SILENT_REBOOT
      

      Many thanks in advance

      TRACE [LORA] > sending 7 bytes: b'040200188afb5d'
      Guru Meditation Error: Core  1 panic'ed (Cache disabled but cached memory region accessed)
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      ....
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      .
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
      Memory dump at 0x40200744: bad00bad bad00bad bad00bad
      Guru Meditation Error: Core�```
      P 1 Reply Last reply Reply Quote 0
      • P Offline
        ps47 @ps47
        last edited by

        I have found out that following make addition would do it.

        COPY_IDF_LIB=1
        

        but still, when I have build the "pycom-esp-idf/example/wifi/scan" following files i don't have in the build directory of pycom-esp-idf/example/wifi/scan/build and they exists but without the '/bootloader' praefix.

            shutil.copy(src + '/bootloader/bootloader_support/libbootloader_support.a', dst)
            shutil.copy(src + '/bootloader/log/liblog.a', dst)
            shutil.copy(src + '/bootloader/micro-ecc/libmicro-ecc.a', dst)
            shutil.copy(src + '/bootloader/soc/libsoc.a', dst)
            shutil.copy(src + '/bootloader/spi_flash/libspi_flash.a', dst)
        
        1 Reply Last reply Reply Quote 0
        • A Offline
          andreas
          last edited by

          Hi there,

          we just wanted to drop a note here that we also started investigating these core panics on [1]. It might help others coming along here to follow the conversation.

          With kind regards,
          Andreas.

          [1] https://community.hiveeyes.org/t/investigating-core-panics-on-the-lopy4/2878

          1 Reply Last reply Reply Quote 0
          • A Offline
            andreas
            last edited by andreas

            Dear community,

            updating to the recent 1.20.2.rc3 release seems to help here, see also [1].

            @ps47 said:

            I tried the new build LoPy4-1.20.2.rc3-0.8.0-vanilla-squirrel.tar.gz and not any “bad00bad bad00bad bad00bad” Core Panic happened till now.

            Thanks @husigeza and the whole Pycom team for mitigating this issue!

            With kind regards,
            Andreas.

            [1] https://community.hiveeyes.org/t/investigating-core-panics-on-the-lopy4/2878/29

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom