FreeRTOS watchdog timeout - esp32

Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
Core 1 register dump:
PC : 0x4008c936 PS : 0x00060735 A0 : 0x8008b8ae A1 : 0x3ffbf25c
A2 : 0x3ffba74c A3 : 0x3ffb97b8 A4 : 0x00000004 A5 : 0x00060723
A6 : 0x00060723 A7 : 0x00000001 A8 : 0x3ffb97b8 A9 : 0x00000019
A10 : 0x3ffb97b8 A11 : 0x00000019 A12 : 0x3ffc2f24 A13 : 0x00060723
A14 : 0x007bf418 A15 : 0x003fffff SAR : 0x00000010 EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x4008491d LEND : 0x40084925 LCOUNT : 0x00000027
Core 1 was running in ISR context:
EPC1 : 0x400e2af7 EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x00000000
Backtrace: 0x4008c933:0x3ffbf25c |<-CORRUPTED
#0 0x4008c933:0x3ffbf25c in vListInsert at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/list.c:183
Core 0 register dump:
PC : 0x4008cad3 PS : 0x00060035 A0 : 0x8008b4d7 A1 : 0x3ffbeb3c
A2 : 0x3ffbf418 A3 : 0xb33fffff A4 : 0x0000abab A5 : 0x00060023
A6 : 0x00060021 A7 : 0x0000cdcd A8 : 0x0000abab A9 : 0xffffffff
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x3ffc2d34 A13 : 0x00000007
A14 : 0x007bf418 A15 : 0x003fffff SAR : 0x0000001a EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x4008cad0:0x3ffbeb3c |<-CORRUPTED
#0 0x4008cad0:0x3ffbeb3c in compare_and_set_native at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_hw_support/include/soc/compare_set.h:25
(inlined by) spinlock_acquire at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_hw_support/include/soc/spinlock.h:103
(inlined by) xPortEnterCriticalTimeout at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/port/xtensa/port.c:288
ELF file SHA256: 90689eca1e9c1ace
Alguém sabe o que pode estar a acontecer no esp32 para gerar este erro? Se alguém estiver disposto, posso disponibilizar o código.
Já verifiquei e não é nenhum tipo de erro a nível do hardware.

I came across this issue a couple of times. Sorry, my Portuguese is not perfect but I'll try to help in English.
This happens when we are trying to allocate more memory inside a function than we allowed it initially.
For example:
void task1(void *params)
{
char buffer[3000];
memset(buffer, 'm', 3000);
}
void app_main()
{
xTaskCreate(task1, "task1", 2048, NULL, 1, NULL);
}
Notice that xTaskCreate allows only 2048 bytes(This differs from vanilla freeRtos which uses word as the unit) but we are trying to use 3000 bytes
I hope this helps, if you can share a portion of the code that works with the memory, I can look more into it.

Related

Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled

I am trying to run 6 tasks parallel and all the tasks run for infinite time. But when the task starts running this error comes:
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x400868b4 PS : 0x00060033 A0 : 0x80085442 A1 : 0x3ffb0b50
0x400868b4: xTaskIncrementTick at C:/Users/preet/esp/esp-idf/components/freertos/tasks.c:3157
A2 : 0x00000001 A3 : 0x80059301 A4 : 0x00000000 A5 : 0x00000132
A6 : 0x00000003 A7 : 0x00060023 A8 : 0x00000000 A9 : 0x3ffb0b30
A10 : 0x3ffb26b8 A11 : 0x00000003 A12 : 0x00060b20 A13 : 0x00060b23
A14 : 0x3ffb6300 A15 : 0x3ffb53fc SAR : 0x00000016 EXCCAUSE: 0x0000001c
EXCVADDR: 0x80059309 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace:0x400868b1:0x3ffb0b500x4008543f:0x3ffb0b70 0x40085199:0x3ffb0b90 0x400826e9:0x3ffb0ba0 0x400e4b6b:0x3ffb6210 0x400d18ef:0x3ffb6230 0x40086462:0x3ffb6250 0x40087991:0x3ffb6270
0x400868b1: xTaskIncrementTick at C:/Users/preet/esp/esp-idf/components/freertos/tasks.c:3156
0x4008543f: xPortSysTickHandler at C:/Users/preet/esp/esp-idf/components/freertos/port/port_systick.c:167
0x40085199: _frxt_timer_int at C:/Users/preet/esp/esp-idf/components/freertos/port/xtensa/portasm.S:329
0x400826e9: _xt_lowint1 at C:/Users/preet/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111
0x400e4b6b: cpu_ll_waiti at C:/Users/preet/esp/esp-idf/components/hal/esp32/include/hal/cpu_ll.h:183
(inlined by) esp_pm_impl_waiti at C:/Users/preet/esp/esp-idf/components/esp_pm/pm_impl.c:837
0x400d18ef: esp_vApplicationIdleHook at C:/Users/preet/esp/esp-idf/components/esp_system/freertos_hooks.c:63
0x40086462: prvIdleTask at C:/Users/preet/esp/esp-idf/components/freertos/tasks.c:3973 (discriminator 1)
0x40087991: vPortTaskWrapper at C:/Users/preet/esp/esp-idf/components/freertos/port/xtensa/port.c:131
ELF file SHA256: 142fe637d0302132
Rebooting...

MAMP PRO crashes on launch (Monterey 12.0.1)

Not sure if it's the fault of the new system since I have seen others successfully run mamp pro from MacRumors.
And I have tried to give full disk access via system preference, also, I ran sudo /Applications/MAMP/bin/startApache.sh in the terminal with no luck to fix.
From the problem report EXC_BAD_ACCESS (SIGBUS), I guess it's something about memory or index problem?
I don't know how to fix this problem, please help me,
here's the full crash report:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: MAMP PRO [51611]
Path: /Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO
Identifier: de.appsolute.mamppro
Version: 6.6 (33836)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2021-10-26 12:26:16.4555 +0800
OS Version: macOS 12.0.1 (21A559)
Report Version: 12
Bridge OS Version: 3.0 (14Y908)
Anonymous UUID: 2F9EDB7E-C40F-322A-A424-13F4D70BBC05
Sleep/Wake UUID: DF0A7272-42C0-43BE-A25D-C5F5AB3C5DF6
Time Awake Since Boot: 6500 seconds
Time Since Wake: 4085 seconds
System Integrity Protection: disabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007ff8465e2450
Exception Codes: 0x0000000000000002, 0x00007ff8465e2450
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process: exc handler [51611]
VM Region Info: 0x7ff8465e2450 is in 0x7ff8465e18a0-0x7ff84661bbd0; bytes after start: 2992 bytes before end: 235391
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
unused shlib __TEXT 7ff8465e1898-7ff8465e18a0 [ 8] r--/rw- SM=COW ... this process
---> __DATA_CONST 7ff8465e18a0-7ff84661bbd0 [ 233K] r--/rw- SM=COW ...aunchServices
__DATA_CONST 7ff84661bbd0-7ff846658a48 [ 244K] r--/rw- SM=COW .../A/MetalTools
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libConfigurer64.dylib 0x10d79faf8 0x10d77a000 + 154360
1 ??? 0x7ff8890bc518 ???
2 libConfigurer64.dylib 0x10d79f96d 0x10d77a000 + 153965
3 dyld 0x111648759 invocation function for block in dyld4::APIs::_dyld_register_func_for_add_image(void (*)(mach_header const*, long)) + 175
4 dyld 0x111630649 dyld4::RuntimeState::withLoadersReadLock(void () block_pointer) + 41
5 dyld 0x11164865a dyld4::APIs::_dyld_register_func_for_add_image(void (*)(mach_header const*, long)) + 116
6 libConfigurer64.dylib 0x10d7a87d3 0x10d77a000 + 190419
7 libobjc.A.dylib 0x7ff806767c6e load_images + 1546
8 dyld 0x11163541c dyld4::RuntimeState::notifyObjCInit(dyld4::Loader const*) + 170
9 dyld 0x11163abfd dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 167
10 dyld 0x11163abeb dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 149
11 dyld 0x11163abeb dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 149
12 dyld 0x11163acac dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 108
13 dyld 0x11164e32e dyld4::APIs::runAllInitializersForMain() + 222
14 dyld 0x11162c358 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3438
15 dyld 0x11162b4b4 start + 388
Thread 1:
0 libsystem_pthread.dylib 0x7ff8068cc00c start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x7ff8068cc00c start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x000000010d79e91b rbx: 0x0000000000000176 rcx: 0x00007ff8465e18a0 rdx: 0xffffffffffffffff
rdi: 0x00007ff88b9b1a60 rsi: 0x0000600002c4866f rbp: 0x00007ff7b35f90a0 rsp: 0x00007ff7b35f9030
r8: 0x0000000000000000 r9: 0x0000000000000990 r10: 0x0000000000000005 r11: 0x0000000000000005
r12: 0x00007ff806e1a510 r13: 0x0000000000000000 r14: 0x00007ff88b9b1a51 r15: 0x00006000008481e0
rip: 0x000000010d79faf8 rfl: 0x0000000000010246 cr2: 0x00007ff8465e2450
Logical CPU: 6
Error Code: 0x00000006 (no mapping for user data write)
Trap Number: 14
Thread 0 instruction stream:
e1 48 8b 45 b8 48 8b 40-10 48 85 c0 4c 8b 65 c8 .H.E.H.#.H..L.e.
4c 8b 7d a8 48 8b 5d c0-41 bd 00 00 00 80 75 a6 L.}.H.].A.....u.
eb 4c 4b 8b 44 ef 10 48-85 c0 74 23 48 8b 4d d0 .LK.D..H..t#H.M.
48 8b 55 c0 48 8b 0c d1-4b 3b 4c ef 08 4c 8b 65 H.U.H...K;L..L.e
c8 74 10 48 89 08 48 8b-45 b8 4c 8b 38 eb 04 4c .t.H..H.E.L.8..L
8b 65 c8 4b 8b 44 ef 08-48 8b 4d d0 48 8b 5d c0 .e.K.D..H.M.H.].
[48]89 04 d9 4c 8b 7d a8-41 bd 00 00 00 80 ff c3 H...L.}.A....... <==
49 8b 44 24 28 48 c1 e8-03 48 39 d8 0f 87 e4 fe I.D$(H...H9.....
ff ff 48 83 c4 48 5b 41-5c 41 5d 41 5e 41 5f 5d ..H..H[A\A]A^A_]
c3 55 48 89 e5 48 89 f2-48 89 fe 48 8b 3d ae d5 .UH..H..H..H.=..
08 00 5d e9 a3 fc ff ff-55 48 89 e5 41 57 41 56 ..].....UH..AWAV
41 55 41 54 53 48 81 ec-b8 11 00 00 48 89 bd 30 AUATSH......H..0
Binary Images:
0x10d77a000 - 0x10d829fff libConfigurer64.dylib (*) <ae387cc4-9425-3323-ac9f-ba486703833b> /Applications/MAMP PRO.app/Contents/Resources/libConfigurer64.dylib
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
0x111626000 - 0x111691fff dyld (*) <1a6ae033-9438-33c0-8077-988fd885250a> /usr/lib/dyld
0x7ff80675e000 - 0x7ff806797fff libobjc.A.dylib (*) <7cfcdc89-2bee-3784-b7af-c676f60fe211> /usr/lib/libobjc.A.dylib
0x7ff8068ca000 - 0x7ff8068d5fff libsystem_pthread.dylib (*) <29a2750e-f31b-3630-8761-242a6bc3e99e> /usr/lib/system/libsystem_pthread.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)
Writable regions: Total=634.4M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=634.4M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 256K 1
Kernel Alloc Once 8K 1
MALLOC 240.1M 38
MALLOC guard page 16K 4
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
STACK GUARD 56.0M 3
Stack 9232K 3
VM_ALLOCATE 8K 2
__DATA 31.0M 457
__DATA_CONST 27.9M 298
__DATA_DIRTY 1535K 193
__FONT_DATA 4K 1
__LINKEDIT 641.2M 10
__OBJC_RO 81.5M 1
__OBJC_RW 3120K 2
__TEXT 471.8M 501
__UNICODE 588K 1
dyld private memory 1024K 1
mapped file 28.3M 2
shared memory 44K 4
=========== ======= =======
TOTAL 1.9G 1524
TOTAL, minus reserved VM space 1.6G 1524
-----------
Full Report
-----------
{"app_name":"MAMP PRO","timestamp":"2021-10-26 12:26:16.00 +0800","app_version":"6.6","slice_uuid":"5878e976-c589-3c37-a57d-1944c5b9a8f5","build_version":"33836","platform":1,"bundleID":"de.appsolute.mamppro","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.0.1 (21A559)","incident_id":"360E81F0-70F6-4779-A485-FE8587745FEF","name":"MAMP PRO"}
{
"uptime" : 6500,
"procLaunch" : "2021-10-26 12:26:16.2837 +0800",
"procRole" : "Background",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "MacBookPro14,3",
"procStartAbsTime" : 6564479054579,
"coalitionID" : 1333,
"osVersion" : {
"train" : "macOS 12.0.1",
"build" : "21A559",
"releaseType" : "User"
},
"captureTime" : "2021-10-26 12:26:16.4555 +0800",
"incident" : "360E81F0-70F6-4779-A485-FE8587745FEF",
"bug_type" : "309",
"pid" : 51611,
"procExitAbsTime" : 6564650188612,
"cpuType" : "X86-64",
"procName" : "MAMP PRO",
"procPath" : "\/Applications\/MAMP PRO.app\/Contents\/MacOS\/MAMP PRO",
"bundleInfo" : {"CFBundleShortVersionString":"6.6","CFBundleVersion":"33836","CFBundleIdentifier":"de.appsolute.mamppro"},
"storeInfo" : {"deviceIdentifierForVendor":"4883B9B5-EDFA-5C8A-88FB-B55B61A3932A","thirdParty":true},
"parentProc" : "launchd",
"parentPid" : 1,
"coalitionName" : "de.appsolute.mamppro",
"crashReporterKey" : "2F9EDB7E-C40F-322A-A424-13F4D70BBC05",
"wakeTime" : 4085,
"bridgeVersion" : {"build":"14Y908","train":"3.0"},
"sleepWakeUUID" : "DF0A7272-42C0-43BE-A25D-C5F5AB3C5DF6",
"sip" : "disabled",
"vmRegionInfo" : "0x7ff8465e2450 is in 0x7ff8465e18a0-0x7ff84661bbd0; bytes after start: 2992 bytes before end: 235391\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n unused shlib __TEXT 7ff8465e1898-7ff8465e18a0 [ 8] r--\/rw- SM=COW ... this process\n---> __DATA_CONST 7ff8465e18a0-7ff84661bbd0 [ 233K] r--\/rw- SM=COW ...aunchServices\n __DATA_CONST 7ff84661bbd0-7ff846658a48 [ 244K] r--\/rw- SM=COW ...\/A\/MetalTools",
"isCorpse" : 1,
"exception" : {"codes":"0x0000000000000002, 0x00007ff8465e2450","rawCodes":[2,140704309191760],"type":"EXC_BAD_ACCESS","signal":"SIGBUS","subtype":"KERN_PROTECTION_FAILURE at 0x00007ff8465e2450"},
"termination" : {"flags":0,"code":10,"namespace":"SIGNAL","indicator":"Bus error: 10","byProc":"exc handler","byPid":51611},
"vmregioninfo" : "0x7ff8465e2450 is in 0x7ff8465e18a0-0x7ff84661bbd0; bytes after start: 2992 bytes before end: 235391\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n unused shlib __TEXT 7ff8465e1898-7ff8465e18a0 [ 8] r--\/rw- SM=COW ... this process\n---> __DATA_CONST 7ff8465e18a0-7ff84661bbd0 [ 233K] r--\/rw- SM=COW ...aunchServices\n __DATA_CONST 7ff84661bbd0-7ff846658a48 [ 244K] r--\/rw- SM=COW ...\/A\/MetalTools",
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":187807,"instructionState":{"instructionStream":{"bytes":[225,72,139,69,184,72,139,64,16,72,133,192,76,139,101,200,76,139,125,168,72,139,93,192,65,189,0,0,0,128,117,166,235,76,75,139,68,239,16,72,133,192,116,35,72,139,77,208,72,139,85,192,72,139,12,209,75,59,76,239,8,76,139,101,200,116,16,72,137,8,72,139,69,184,76,139,56,235,4,76,139,101,200,75,139,68,239,8,72,139,77,208,72,139,93,192,72,137,4,217,76,139,125,168,65,189,0,0,0,128,255,195,73,139,68,36,40,72,193,232,3,72,57,216,15,135,228,254,255,255,72,131,196,72,91,65,92,65,93,65,94,65,95,93,195,85,72,137,229,72,137,242,72,137,254,72,139,61,174,213,8,0,93,233,163,252,255,255,85,72,137,229,65,87,65,86,65,85,65,84,83,72,129,236,184,17,0,0,72,137,189,48],"offset":96}},"threadState":{"r13":{"value":0},"rax":{"value":4521060635},"rflags":{"value":66118},"cpu":{"value":6},"r14":{"value":140705470814801},"rsi":{"value":105553162700399},"r8":{"value":0},"cr2":{"value":140704309191760},"rdx":{"value":18446744073709551615},"r10":{"value":5},"r9":{"value":2448},"r15":{"value":105553124950496},"rbx":{"value":374},"trap":{"value":14,"description":"(no mapping for user data write)"},"err":{"value":6},"r11":{"value":5},"rip":{"value":4521065208,"matchesCrashFrame":1},"rbp":{"value":140701843034272},"rsp":{"value":140701843034160},"r12":{"value":140703244068112},"rcx":{"value":140704309188768},"flavor":"x86_THREAD_STATE","rdi":{"value":140705470814816}},"queue":"com.apple.main-thread","frames":[{"imageOffset":154360,"imageIndex":0},{"imageOffset":140705427866904,"imageIndex":1},{"imageOffset":153965,"imageIndex":0},{"imageOffset":141145,"symbol":"invocation function for block in dyld4::APIs::_dyld_register_func_for_add_image(void (*)(mach_header const*, long))","symbolLocation":175,"imageIndex":2},{"imageOffset":42569,"symbol":"dyld4::RuntimeState::withLoadersReadLock(void () block_pointer)","symbolLocation":41,"imageIndex":2},{"imageOffset":140890,"symbol":"dyld4::APIs::_dyld_register_func_for_add_image(void (*)(mach_header const*, long))","symbolLocation":116,"imageIndex":2},{"imageOffset":190419,"imageIndex":0},{"imageOffset":40046,"symbol":"load_images","symbolLocation":1546,"imageIndex":3},{"imageOffset":62492,"symbol":"dyld4::RuntimeState::notifyObjCInit(dyld4::Loader const*)","symbolLocation":170,"imageIndex":2},{"imageOffset":84989,"symbol":"dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const","symbolLocation":167,"imageIndex":2},{"imageOffset":84971,"symbol":"dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const","symbolLocation":149,"imageIndex":2},{"imageOffset":84971,"symbol":"dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const","symbolLocation":149,"imageIndex":2},{"imageOffset":85164,"symbol":"dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const","symbolLocation":108,"imageIndex":2},{"imageOffset":164654,"symbol":"dyld4::APIs::runAllInitializersForMain()","symbolLocation":222,"imageIndex":2},{"imageOffset":25432,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)","symbolLocation":3438,"imageIndex":2},{"imageOffset":21684,"symbol":"start","symbolLocation":388,"imageIndex":2}]},{"id":187837,"frames":[{"imageOffset":8204,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]},{"id":187838,"frames":[{"imageOffset":8204,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]}],
"usedImages" : [
{
"source" : "P",
"arch" : "x86_64",
"base" : 4520910848,
"size" : 720896,
"uuid" : "ae387cc4-9425-3323-ac9f-ba486703833b",
"path" : "\/Applications\/MAMP PRO.app\/Contents\/Resources\/libConfigurer64.dylib",
"name" : "libConfigurer64.dylib"
},
{
"size" : 0,
"source" : "A",
"base" : 0,
"uuid" : "00000000-0000-0000-0000-000000000000"
},
{
"source" : "P",
"arch" : "x86_64",
"base" : 4586627072,
"size" : 442368,
"uuid" : "1a6ae033-9438-33c0-8077-988fd885250a",
"path" : "\/usr\/lib\/dyld",
"name" : "dyld"
},
{
"source" : "P",
"arch" : "x86_64h",
"base" : 140703237005312,
"size" : 237568,
"uuid" : "7cfcdc89-2bee-3784-b7af-c676f60fe211",
"path" : "\/usr\/lib\/libobjc.A.dylib",
"name" : "libobjc.A.dylib"
},
{
"source" : "P",
"arch" : "x86_64",
"base" : 140703238496256,
"size" : 49152,
"uuid" : "29a2750e-f31b-3630-8761-242a6bc3e99e",
"path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
"name" : "libsystem_pthread.dylib"
}
],
"sharedCache" : {
"base" : 140703235268608,
"size" : 15213641728,
"uuid" : "3d05845f-3f65-358f-9ebf-2236e772ac01"
},
"vmSummary" : "ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)\nWritable regions: Total=634.4M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=634.4M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nActivity Tracing 256K 1 \nKernel Alloc Once 8K 1 \nMALLOC 240.1M 38 \nMALLOC guard page 16K 4 \nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nSTACK GUARD 56.0M 3 \nStack 9232K 3 \nVM_ALLOCATE 8K 2 \n__DATA 31.0M 457 \n__DATA_CONST 27.9M 298 \n__DATA_DIRTY 1535K 193 \n__FONT_DATA 4K 1 \n__LINKEDIT 641.2M 10 \n__OBJC_RO 81.5M 1 \n__OBJC_RW 3120K 2 \n__TEXT 471.8M 501 \n__UNICODE 588K 1 \ndyld private memory 1024K 1 \nmapped file 28.3M 2 \nshared memory 44K 4 \n=========== ======= ======= \nTOTAL 1.9G 1524 \nTOTAL, minus reserved VM space 1.6G 1524 \n",
"legacyInfo" : {
"threadTriggered" : {
"queue" : "com.apple.main-thread"
}
},
"trialInfo" : {
"rollouts" : [
{
"rolloutId" : "607844aa04477260f58a8077",
"factorPackIds" : {
"SIRI_MORPHUN_ASSETS" : "60ef663fa2f864203caf575c"
},
"deploymentId" : 250000055
},
{
"rolloutId" : "60da5e84ab0ca017dace9abf",
"factorPackIds" : {
},
"deploymentId" : 250000007
},
{
"rolloutId" : "60356660bbe37970735c5624",
"factorPackIds" : {
},
"deploymentId" : 250000013
},
{
"rolloutId" : "602ad4dac86151000cf27e46",
"factorPackIds" : {
"SIRI_DICTATION_ASSETS" : "6164895c201f677a9a4cb9e7"
},
"deploymentId" : 250000232
},
{
"rolloutId" : "5fc94383418129005b4e9ae0",
"factorPackIds" : {
},
"deploymentId" : 250000144
},
{
"rolloutId" : "5ffde50ce2aacd000d47a95f",
"factorPackIds" : {
},
"deploymentId" : 250000063
},
{
"rolloutId" : "601d9415f79519000ccd4b69",
"factorPackIds" : {
"SIRI_TEXT_TO_SPEECH" : "61704b7f20024a1072784bb1"
},
"deploymentId" : 250000291
}
],
"experiments" : [
]
}
}
Model: MacBookPro14,3, BootROM 447.40.12.0.0, 4 processors, Quad-Core Intel Core i7, 3.1 GHz, 16 GB, SMC 2.45f5
Graphics: Intel HD Graphics 630, Intel HD Graphics 630, Built-In
Display: Color LCD, 2880 x 1800 Retina, Main, MirrorOff, Online
Graphics: Radeon Pro 560, Radeon Pro 560, PCIe, 4 GB
Memory Module: BANK 0/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x80CE, 0x4B3445424533303445422D45474347202020
Memory Module: BANK 1/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x80CE, 0x4B3445424533303445422D45474347202020
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x173), Broadcom BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1710.2)
AirPort:
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB30Bus
USB Device: Apple T1 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.5
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.5
I downloaded a new version of MAMP from this site - https://appstorrent.ru/269-mamp-pro.html
turned off the ISP. Instruction here - https://appstorrent.ru/510-sip.html
And MAMP started working (MacBook Pro m1. Monterey)
I face a similar issue, though I was not using pro. I could not even launch MAMP at all without a crash and error report like yours. My report was a little different, the reason was EXC_BAD_ACCESS (SIGSEGV)
I was able to determine the issue was MAMP trying to launch using nginx instead of apache. I opened the Applications > MAMP > conf folder and deleted the nginx folder and was then able to launch MAMP. Before starting the server I switched from nginx to apache, and it has worked since.
Actually, the PRO feature of mamp isn't necessary for my personal use, but still I felt like building my host from scratch.
For those who don't want to spend time on this, try XAMPP
After some research, these are what I learned:
macOS has PHP and httpd(AKA apache) pre-installed
if you want to install the latest version you need brew installed
DIY an httpd.conf file needs some Googles, if you are not familiar with the computer and just want things to get to work, try XMAPP then.

ESP32 Stack canary watchpoint triggered. Why?

I have a program that can encrypt and decrypt a text with Boneh-Franklin encryption. This works great on a PC, but for some reason causes a constant reboot on ESP32 with the following error message:
setup2
setup2.2
setup2.3
Guru Meditation Error: Core 1 panic'ed (Unhandled debug exception)
Debug exception reason: Stack canary watchpoint triggered (loopTask)
Core 1 register dump:
PC : 0x40083774 PS : 0x00060b36 A0 : 0x3ffb0120 A1 : 0x3ffb0060
A2 : 0x68efa751 A3 : 0x3ffb0938 A4 : 0x3ffb0720 A5 : 0xfb879c5c
A6 : 0x61b36b71 A7 : 0x0006970f A8 : 0x01709af4 A9 : 0x01709af4
A10 : 0xfaa5dfed A11 : 0x01a3ff3b A12 : 0x76651dec A13 : 0x00000001
A14 : 0x00000000 A15 : 0x04adbe74 SAR : 0x0000001e EXCCAUSE: 0x00000001
EXCVADDR: 0x00000000 LBEG : 0x400f1cc5 LEND : 0x400f1cc9 LCOUNT : 0x00000000
ELF file SHA256: 0000000000000000
I use an Arduino ESP32 environment, CONFIG_ARDUINO_LOOP_STACK_SIZE is set to 8192 in main.cpp, 8k stack should be enough to run it. It works perfectly on PC, it’s a mystery to me why not on ESP32. Can anyone help? I absolutely ran out of ideas.
For the Boneh-Franklin implementation I used this library: https://github.com/miracl/core
My own code is ~200 lines, I have uploaded it to Google Drive: https://drive.google.com/file/d/1EY0mGC2UiVNhE68b5Q0VB9JIY2Owbpxg/view?usp=sharing
Looking at the code, it isn't unreasonable that the stack will require more than 8192 bytes as a lot of big objects are allocated on the stack, both in your code and in the library, e.g.:
loop()
csprng RNG – 128 bytes
ECP2 pPublic – 264 bytes
ECP2 cipherPointU – 264 bytes
ECP privateKey – 132 bytes
encrypt(...)
ECP pointQId – 132 bytes
char[] dst – 256 bytes
BIG l – 40 bytes
FP12 theta – 532 bytes
PAIR_fexp()
FP2 X – 88 bytes
BIG x – 40 bytes
FP a, b – 2 * 44 = 88 bytes
FP12 t0, y0, y1, y2, y3 – 5 * 532 = 2660 bytes
Increase your stack size. It will likely help.
I got to this page by googling my own troubles so thought I would add my solution here
I experienced this error recently and by using a series of Serial.println's was able to trace to an infinite loop created in the code

Why do I get the Debug exception reason: Stack canary watchpoint triggered (main)?

I'm writing a program for esp32-wroom-32 using esp-idf-v3.0.
I'm trying to add logs, which will be saved in fatfs.
After some logs I get:
21:54:21.306 -> Debug exception reason: Stack canary watchpoint triggered (main)
21:54:21.306 -> Register dump:
21:54:21.306 -> PC : 0x40089827 PS : 0x00060b36 A0 : 0x40082179 A1 : 0x3ffd3860
21:54:21.340 -> A2 : 0x3ff40000 A3 : 0x00000033 A4 : 0x00000033 A5 : 0x00000000
21:54:21.340 -> A6 : 0x00000024 A7 : 0xff000000 A8 : 0xe37fc000 A9 : 0x0000007e
21:54:21.340 -> A10 : 0x00000000 A11 : 0xffffffff A12 : 0x00000004 A13 : 0x00000001
21:54:21.340 -> A14 : 0x00000005 A15 : 0x00000000 SAR : 0x00000004 EXCCAUSE: 0x00000001
21:54:21.340 -> EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffff6
Why does it happen to main?
FreeRTOS task stack depth
This is quite likely caused by a stack overflow in your FreeRTOS task.
Increase the stack depth
The first thing I would do is increase the depth of the stack for your FreeRTOS task. E.g., if you created your task with a stack size of configMINIMAL_STACK_SIZE, this might be as low as 768 bytes - which is not adequate for a lot of common requirements.
How much to increase the stack depth by?
It is not easy to answer this, but - in this case - it may be adequate to simply increase it until you no longer have stack overflows. If you are concerned about not needlessly wasting memory, FreeRTOS includes a mechanism to let you know how close a task has come to overflowing its stack.
Buffers and canaries
A canary is just a marker at the end of a buffer - which is checked periodically. If it is changed from its default value, it means that the program has attempted to write beyond the end of the buffer - i.e. there has been a buffer overflow.
Detection of stack overflow using canaries is enabled in ESP IDF by changing two options in configuration (under Component Config -> FreeRTOS section):
'Check for stack overflow' -> 'using canary bytes'
'Set a debug watchpoint as a stack overflow check' -> enabled
If you disable the second option, you will instead get a Guru Meditation error - a LoadProhibited exception - in the case of a stack overflow.
xTaskCreate() and stack depth
Bear in mind that the version of xTaskCreate() in the ESP IDF differs from that in the original FreeRTOS. In the original FreeRTOS, the stack depth is specified in words. In the ESP IDF, it's specified in bytes. A very important distinction!

MIF File content automatically changes after initializing ROM with the file

I am working on single cycle risc processor. I am using altera LPM wizard ROM 1 port for instruction memory. The ROM is initialized by mif file. The content of the file is given below
WIDTH=16;
DEPTH=256;
ADDRESS_RADIX=HEX;
DATA_RADIX=HEX;
CONTENT BEGIN
-- default value
[00..FF] : 00;
-- instructions
00 : 2401; -- ADI R1, R0, x01
01 : 2802; -- ADI R2, R0, x02
02 : 2C03; -- ADI R3, R0, x03
03 : 3011; -- ADI R4, R0, x11
04 : 1648; -- ADD R5, R4, R4
05 : 1AC8; -- ADD R6, R5, R4
06 : C0C1; -- ST R1, R4
07 : C151; -- ST R2, R5
08 : C1E1; -- ST R3, R6
09 : 80FF; -- BZ R0, -1
END;
After I complete the initialization process the contents of mif file automatically changes to
-- Clearbox generated Memory Initialization File (.mif)
WIDTH=16;
DEPTH=256;
ADDRESS_RADIX=HEX;
DATA_RADIX=HEX;
CONTENT BEGIN
000 : FFF0;
001 : FFF1;
002 : FFF2;
003 : FFF3;
004 : FFF4;
005 : FFF5;
-------------
-------------
0fd : FFFD;
0fe : FFFE;
0ff : FFFF;
END;
I have no idea what is happening so please help..I am just learning VHDL programming
This is not a VHDL problem! But IMO, VHDL gives you a better answer. Replace this "LPM Wizard ROM" with a plain VHDL constant array, initialised (in VHDL) to the values you want.
package InstMem is
type Instruction is std_logic_vector(15 downto 0);
type ProgMem_Array is array 0 to 255 of Instruction;
constant Progmem : Progmem_Array := (
00 => 16#2401#, -- ADI R1, R0, x01
01 => 16#2802#, -- ADI R2, R0, x02
02 => 16#2C03#, -- ADI R3, R0, x03
others => (others => 0) );
end package InstMem;
Persuading your assembler or a Python script to write this VHDL package is trivial...

Resources