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

    microWebSrv2

    Scheduled Pinned Locked Moved Comments & Feedback
    11 Posts 5 Posters 328 Views 5 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.
    • J Offline
      jczic
      last edited by

      Hello all,
      I released a fully new version (v2.0) of my web server here : https://github.com/jczic/MicroWebSrv2.
      Open source MIT, fully asynchronous, more robust, more fast and more efficient on Pycom modules.
      It is delivered with a good documentation.
      Thank you for your support and feedback. ☺️

      JC`zic

      1 Reply Last reply Reply Quote 8
      • P Offline
        pigamonte
        last edited by

        MicroWebSrv2 its not running well on wipy. After refreshing the home page a few times wipy will crash with guru meditation error. I tried it with v1.20.2.r4.

        1 Reply Last reply Reply Quote 0
        • G Offline
          Gijs
          last edited by

          @pigamonte Perhaps you could take the problem up with them, or check their Github issues for similar problems. Seeing as this topic is over a year old, you might not get a response from them.

          If you believe the issue is related to the pycom firmware, could you have a look at this page (https://docs.pycom.io/advance/coredump/) and see if you can decode the coredumps. Let me know what you get, and if it is the same everytime

          Best,
          Gijs

          P 1 Reply Last reply Reply Quote 0
          • P Offline
            pigamonte @Gijs
            last edited by

            @Gijs The dumps are different every time. Here are 3 for example.

            Core 0 register dump:: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
            PC      : 0x4014ff7b  PS      : 0x00060e30  A0      : 0x8014b079  A1      : 0x3ffb4210
            A2      : 0xb6000000  A3      : 0x00000018  A4      : 0x3ffb4548  A5      : 0x3ffcc558
            A6      : 0xbfbcff6c  A7      : 0x3ffde18c  A8      : 0x8014ff60  A9      : 0x3ffb41d0
            A10     : 0x3fbc2b6c  A11     : 0x3ffc0e38  A12     : 0x3ffc0460  A13     : 0x00000000
            A14     : 0x00000001  A15     : 0x0000019c  SAR     : 0x00000010  EXCCAUSE: 0x0000001c  
            EXCVADDR: 0x8014b079  LBEG    : 0x400919b4  LEND    : 0x400919bf  LCOUNT  : 0x00000000
            
            ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000
            
            Backtrace: 0x4014ff7b:0x3ffb4210 0x4014b076:0x3ffb4290
            
            Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
            Memory dump at 0x40175d1c: 2af6f4a0 0083d41c 070518a2
            Core 0 register dump:
            PC      : 0x40175d21  PS      : 0x00060e30  A0      : 0x80175d83  A1      : 0x3ffbaed0
            A2      : 0x0000000e  A3      : 0xfffffff2  A4      : 0x00000000  A5      : 0x00000000
            A6      : 0x3ffb9f74  A7      : 0x00000001  A8      : 0x3fbc24fc  A9      : 0x3fbc13bc
            A10     : 0x00000001  A11     : 0x00000000  A12     : 0xffffffff  A13     : 0x00000001
            A14     : 0x000000fe  A15     : 0x00000000  SAR     : 0x00000019  EXCCAUSE: 0x00000000
            EXCVADDR: 0x00000000  LBEG    : 0x40092834  LEND    : 0x40092862  LCOUNT  : 0xffffffff
            
            ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000
            
            Backtrace: 0x40175d21:0x3ffbaed0 0x40175d80:0x3ffbaef0 0x4017f7f8:0x3ffbaf10 0x4016fe1d:0x3ffbaf30
            
            Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.
            Core 0 register dump:
            PC      : 0x4011fe4c  PS      : 0x00060a30  A0      : 0x8011fd80  A1      : 0x3ffb41a0
            A2      : 0x3fbc1ea8  A3      : 0x3ffe2cd4  A4      : 0x00000000  A5      : 0x3ffb4214
            A6      : 0x777749d2  A7      : 0x777749d2  A8      : 0x3ffe2d4e  A9      : 0x3fbc1ea8
            A10     : 0x0000003c  A11     : 0x000007c6  A12     : 0x00000001  A13     : 0x000007c5
            A14     : 0x3ffe2d04  A15     : 0x00000000  SAR     : 0x00000010  EXCCAUSE: 0x0000001d
            EXCVADDR: 0x00000005  LBEG    : 0x40092834  LEND    : 0x40092862  LCOUNT  : 0xffffffff
            
            ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000
            
            Backtrace: 0x4011fe4c:0x3ffb41a0 0x4011fd7d:0x3ffb41c0 0x4012c876:0x3ffb41f0 0x4014b02d:0x3ffb4290
            
            P 1 Reply Last reply Reply Quote 1
            • P Offline
              peterp @pigamonte
              last edited by

              @pigamonte could you share your python code?

              P 1 Reply Last reply Reply Quote 0
              • G Offline
                Gijs
                last edited by

                I have decoded the backtraces using the Pybytes firmware version of the Wipy (1.20.2.r4), in order, we get:

                wdevProcessRxSucDataAll
                ??:?
                ppTask
                ??:?
                

                ,

                pbuf_header_impl
                /home/peter/docs/pycom-esp-idf/components/lwip/lwip/src/core/pbuf.c:1331
                pbuf_header
                /home/peter/docs/pycom-esp-idf/components/lwip/lwip/src/core/pbuf.c:1331
                ethernet_input
                /home/peter/docs/pycom-esp-idf/components/lwip/lwip/src/netif/ethernet.c:176
                tcpip_thread
                /home/peter/docs/pycom-esp-idf/components/lwip/lwip/src/api/tcpip.c:483
                

                and

                ieee80211_crypto_decap
                ??:?
                ieee80211_crypto_encap
                ??:?
                ieee80211_output_process
                ??:?
                ppTask
                ??:?
                

                There seems to be no commonality between the three unfortunately, and two of them are related to the esp-idf part, which is outside the pycom firmware. Do you perhaps have any more that we could look at?

                Note that coredumps could also be related to transients on the power supply and memory allocation. I dont know anything about the size of your program, but if we're reaching the memory limit, the StoreProhibited error could be related to that.

                1 Reply Last reply Reply Quote 0
                • P Offline
                  pigamonte @peterp
                  last edited by

                  @peterp Please download from here . I changed one line in the index.html inside the head tag in order to reproduce easily.

                  <meta http-equiv="Refresh" content="4; url=/index.html" />
                  

                  The head tag will look like this

                  <head>
                          <meta charset="UTF-8" />
                          <title>MicroWebSrv2</title>
                          <link rel="stylesheet" href="style.css" />
                          <meta http-equiv="Refresh" content="4; url=/index.html" />
                      </head>
                  

                  The hardware setup is just the wipy on the pycom Expansion board powered via USB.

                  To see it fail, connect your device to the default access point on the wipy, then open a browser at 192.168.4.1 and wait a few moments.

                  L P 2 Replies Last reply Reply Quote 0
                  • L Offline
                    livius @pigamonte
                    last edited by

                    @pigamonte
                    I am little surprised that it run now without frozen modules :)
                    Previous versions require to froze code to optimize memory usage

                    think about people first, then computers

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      peterp @pigamonte
                      last edited by peterp

                      @pigamonte Ok, I let this run for a while (230 GET's). No problem so far. How quickly do you get a crash? How stable is the reproduction? Does it happen regularly, or is it very random? Do you think that Access Point is critical for the reproduction? Or can you also reproduce the problem with Station mode? It would be easier for me to let it run a long time if I could use station mode.

                      Edit: Also, which FW are you using? And please post the output of

                              import pycom
                              print('heartbeat', pycom.heartbeat_on_boot())
                              print('lte', pycom.lte_modem_en_on_boot())
                              print('pybytes', pycom.pybytes_on_boot())
                              print('smart_config', pycom.smart_config_on_boot())
                              print('wdt', pycom.wdt_on_boot())
                              print('wifi', pycom.wifi_on_boot())
                      

                      Did you notice any difference between WiPy's if you have multiple? Some crash (more often) than others?

                      P 1 Reply Last reply Reply Quote 0
                      • P Offline
                        pigamonte @peterp
                        last edited by

                        @peterp, Thanks for testing. I set my test up again to see how you got yours to work for 230+ gets. It appears the problem isn't linked to MicroWebSrv2 at all.

                        I erased the wipy and reloaded fw 1.20.2.r4. Then, without loading any code or making any configuration, I connect to the default access point. Within a minute or two the wipy crashes. My PC must be sending some traffic that causes the crash.

                        Here are more dumps as requested by @Gijs

                        Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
                        Memory dump at 0x4017b314: 00000099 03064000 80145070
                        Core 0 register dump:
                        PC      : 0x4017b319  PS      : 0x00060a30  A0      : 0x8017f804  A1      : 0x3ffbaee0
                        A2      : 0x3fbc1674  A3      : 0x3ffdfa8c  A4      : 0x00000004  A5      : 0xffffffff
                        A6      : 0x3fbc1622  A7      : 0x00000045  A8      : 0x80175d83  A9      : 0x3ffbaed0
                        A10     : 0x00000000  A11     : 0x0001003c  A12     : 0x00000000  A13     : 0x00000000
                        A14     : 0x3ffb9f88  A15     : 0x00000001  SAR     : 0x00000019  EXCCAUSE: 0x00000000
                        EXCVADDR: 0x00000000  LBEG    : 0x40092834  LEND    : 0x40092862  LCOUNT  : 0xffffffff
                        
                        ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000
                        
                        Backtrace: 0x4017b319:0x3ffbaee0 0x4017f801:0x3ffbaf10 0x4016fe1d:0x3ffbaf30
                        
                        Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
                        Core 0 register dump:
                        PC      : 0x4011fd46  PS      : 0x00060c30  A0      : 0x00000011  A1      : 0x3ffb41c0
                        A2      : 0x3fbc195c  A3      : 0x00000000  A4      : 0x00000001  A5      : 0x00000001
                        A6      : 0x00000000  A7      : 0x00000008  A8      : 0x00124040  A9      : 0x3ffb41c0
                        A10     : 0x3ffb420e  A11     : 0x3ffe28f4  A12     : 0x00000004  A13     : 0x3ffb4214
                        A14     : 0x777749d2  A15     : 0x777749d2  SAR     : 0x00000010  EXCCAUSE: 0x0000001c
                        EXCVADDR: 0x00000026  LBEG    : 0x40092834  LEND    : 0x40092862  LCOUNT  : 0xffffffff
                        
                        ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000
                        
                        Backtrace: 0x4011fd46:0x3ffb41c0 0x0000000e:0x3ffb41f0 0x4014b02d:0x3ffb4290
                        
                        Guru Meditation Error: Core  0 panic'ed (InstrFetchProhibited). Exception was unhandled.
                        Core 0 register dump:
                        PC      : 0xc1250358  PS      : 0x00060c30  A0      : 0xc1250358  A1      : 0x3ffb4210
                        A2      : 0x00000001  A3      : 0x00000000  A4      : 0x3ffb4518  A5      : 0x3ffcc558
                        A6      : 0x77a00000  A7      : 0x3ffb4518  A8      : 0x40087d1c  A9      : 0x0003ff00
                        A10     : 0x00000000  A11     : 0x00000000  A12     : 0x00000000  A13     : 0x3ffc0d4c
                        A14     : 0x000000fe  A15     : 0x00000001  SAR     : 0x0000001c  EXCCAUSE: 0x00000014
                        EXCVADDR: 0xc1250358  LBEG    : 0x40092834  LEND    : 0x40092862  LCOUNT  : 0xffffffff
                        
                        ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000
                        
                        Backtrace: 0x41250358:0x3ffb4210 0x41250355:0x3ffb4290
                        
                        Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
                        Core 0 register dump:
                        PC      : 0x4014ff7b  PS      : 0x00060e30  A0      : 0x8014b079  A1      : 0x3ffb4210
                        A2      : 0x00000079  A3      : 0x00000018  A4      : 0x3ffb450c  A5      : 0x3ffcc558
                        A6      : 0x3fbc1e74  A7      : 0x3ffb4588  A8      : 0x8014ff60  A9      : 0x3fbc1ea4
                        A10     : 0x3fbc1e74  A11     : 0x3ffc0e38  A12     : 0x3ffc0460  A13     : 0x0000001c
                        A14     : 0x00000001  A15     : 0x0000009d  SAR     : 0x00000019  EXCCAUSE: 0x0000001c
                        EXCVADDR: 0x8014b079  LBEG    : 0x400919b4  LEND    : 0x400919bf  LCOUNT  : 0x00000000
                        
                        ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000
                        
                        Backtrace: 0x4014ff7b:0x3ffb4210 0x4014b076:0x3ffb4290
                        
                        P 1 Reply Last reply Reply Quote 0
                        • P Offline
                          peterp @pigamonte
                          last edited by

                          @pigamonte I took two wipy's and let them run over night. Both in station mode connected to same wifi as the laptop. both running microWebSrv2 example and Firefox browser on my laptop requesting the websites repeatedly using a browser extension (Tab Reloader) to refresh every 5 seconds. Neither Wipy core dumped. They served 3000+ GET's each until approx 21:15, which means probably 2h or so of runtime until both of them stopped with an uncaught micropython exception. Probably running out of memory

                          Unhandled exception in thread started by <bound_method>
                          Traceback (most recent call last):
                            File "MicroWebSrv2/libs/XAsyncSockets.py", line 141, in _processWaitEvents
                            File "MicroWebSrv2/libs/XAsyncSockets.py", line 125, in _processWaitEvents
                            File "MicroWebSrv2/libs/XAsyncSockets.py", line 88, in _socketListAdd
                          MemoryError: memory allocation failed, allocating 16384 bytes
                          
                          • How exactly are you erasing/flashing? With the Firmware Updater application https://docs.pycom.io/updatefirmware/device/ ? Makefile? Self compiled? Please elaborate
                          • Please show the ...on_boot settings as per my last post
                          • How do you supply power to the Wipy? USB from laptop? Anything else connected?
                          • Do you have multiple Wipy's and Expansion boards to try? How many? Is the behaviour different?
                          • Is it a Wipy2 or Wipy3 (printed on the bottom)
                          • Can you try other usb ports/ cables/ power supplies?
                          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