flagxor / ueforth

Apache License 2.0
96 stars 26 forks source link

httpd doesn't run as a task #16

Open p1er opened 2 years ago

p1er commented 2 years ago

httpd does not run as a task, throwing a LoadProhibited exception:

ESP32forth v7.0.6.15 - rev 74125fc19e0ce05838c7
ESP32-D0WDQ5   240 MHz   2 cores   4194304 bytes flash
     System Heap: 201620 free + 346224 used = 547844 total (36% free)
                  98152 bytes max contiguous
Forth dictionary: 80956 free + 26692 used = 107648 total (75% free)
3 x Forth stacks: 2048 bytes each
 ok
--> wifi WIFI_MODE_STA wifi.mode z" guest" z" password" wifi.begin 4000 ms wifi.status
 ok
3 --> web-interface
 ok
3 --> : webs 80 server ;
 ok
3 --> ' webs 1500 300 task wui
 ok
3 --> wui start-task
 ok
3 --> Listening on port 80 
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x400d2ca7  PS      : 0x00060c30  A0      : 0x800d301c  A1      : 0x3ffb1de0  
A2      : 0xffffffff  A3      : 0x3ffe67e4  A4      : 0x3ffe4388  A5      : 0x00000000  
A6      : 0x3ffe67d4  A7      : 0x3fff0898  A8      : 0x800d19de  A9      : 0x3ffe6748  
A10     : 0xffffffff  A11     : 0x00000000  A12     : 0x400d2ca3  A13     : 0x3ffc5ca8  
A14     : 0x3ffc5cbc  A15     : 0x00000000  SAR     : 0x0000000b  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff  

ELF file SHA256: 0000000000000000

Backtrace: 0x400d2ca7:0x3ffb1de0 0x400d3019:0x3ffb1f90 0x400d9519:0x3ffb1fb0 0x4008b71a:0x3ffb1fd0

Rebooting...

When you run the exception through the ESP exception decoder you get this:

Decoding 8 results
0x400d2ca7: forth_run(int*) at /tmp/ESP32forth/ESP32forth.ino line 1210
0x400d2ca3: forth_run(int*) at /tmp/ESP32forth/ESP32forth.ino line 1210
0x400d2ca7: forth_run(int*) at /tmp/ESP32forth/ESP32forth.ino line 1210
0x400d3019: loop() at /tmp/ESP32forth/ESP32forth.ino line 2706
0x400d9519: loopTask(void*) at /tmp/.arduino15/packages/esp32/hardware/esp32/1.0.6/cores/esp32/main.cpp line 23
0x4008b71a: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 355 (discriminator 1)
emelcher commented 1 week ago

Similar problem here:

ESP32forth v7.0.7.20 - rev c5ac9b0df06e4b3afd46ca1b5d00aa6fcc8f1750
ESP32-C3   160 MHz   1 cores   4194304 bytes flash
     System Heap: 63920 free + 288476 used = 352396 total (18% free)
                  40948 bytes max contiguous
Forth dictionary: 156756 free + 34672 used = 191428 total (81% free)
3 x Forth stacks: 2048 bytes each
 ok
-->  wifi WIFI_MODE_STA wifi.mode z" xxxx" z" yyyy" wifi.begin 4000 ms wifi.status
 ok
3 --> web-interface
 ok
3 --> : webs 80 server ;
 ok
3 --> ' webs 1500 300 task wui
 ok
3 --> wui start-task
 ok
3 --> Listening on port 80 
Guru Meditation Error: Core  0 panic'ed (Load access fault). Exception was unhandled.

Core  0 register dump:
MEPC    : 0x42004e06  RA      : 0x42000408  SP      : 0x3fca0350  GP      : 0x3fc8f600  
TP      : 0x3fc76e20  T0      : 0x4038d972  T1      : 0x50c00000  T2      : 0x00000000  
S0/FP   : 0x3fca9b04  S1      : 0x3c0d1000  A0      : 0x00000000  A1      : 0x00000000  
A2      : 0x00000000  A3      : 0x3fcabdc4  A4      : 0x000000cd  A5      : 0x000000c9  
A6      : 0xfa000000  A7      : 0x00000003  S2      : 0x3c0d1000  S3      : 0x3c0d1000  
S4      : 0x00000000  S5      : 0x00000000  S6      : 0x00000000  S7      : 0x00000000  
S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000  
T3      : 0x00000020  T4      : 0x00000001  T5      : 0x0000000d  T6      : 0x00000000  
MSTATUS : 0x00001881  MTVEC   : 0x40380001  MCAUSE  : 0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5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fca04b0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fca04d0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fca04f0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x4038a172 0x40388b58 0x3fca0580 0x3fc8f600
3fca0510: 0x4038ac18 0x40389146 0x3fca0590 0x3fc8f600 0x3fc76e20 0x4038d972 0x4038a63a 0x00000000
3fca0530: 0x3fcd0da8 0x00000000 0x00000001 0xffffffff 0x1325cc10 0x3fca0778 0x3fc98ebc 0x600c2000
3fca0550: 0x4200d342 0x4200bdd8 0x3fca05d0 0x4038a564 0x3fc76e20 0x4038d972 0x4038a63a 0x00000000
3fca0570: 0x4200bdc8 0x00000001 0x3fcd0da8 0x403885f8 0x00000000 0x00000000 0x3fcd0da8 0x40388b16
3fca0590: 0xfa000000 0x00000003 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x1d028844
3fca05b0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca05d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x3fc99000 0x3fca08dc 0x42004f32
3fca05f0: 0x00000020 0x00000001 0x4200bdc8 0x4200cc8c 0x00000000 0x00000000 0x00000000 0x4038abaa
3fca0610: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fca0630: 0x42000408 0x3fca9b04 0x3fc99000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca0650: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x3fca0350 0x00000000 0x00000000
3fca0670: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca0690: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca06b0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca06d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca06f0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca0710: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca0730: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

ELF file SHA256: 3745893792375f37

Rebooting...