armink / FlashDB

An ultra-lightweight database that supports key-value and time series data | 一款支持 KV 数据和时序数据的超轻量级数据库

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Yukselzngn opened this issue · comments

Hello,

When I use the sample code for ESP32, I get the following error:

I (342) main_task: Calling app_main()
FlashDB ESP32 SPI Flash Demo
[I/FAL] Flash Abstraction Layer (V0.5.99) initialize success.
[FlashDB][kv][env][fdb_kvdb1] (../components/dbsrc/fdb_kvdb.c:1741) The oldest addr is @0x00000000
[FlashDB][kv][env][fdb_kvdb1] (../components/dbsrc/fdb_kvdb.c:1755) KVDB size is 16384 bytes.
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.

Core 0 register dump:
PC : 0x400d76f3 PS : 0x00060630 A0 : 0x800d55a8 A1 : 0x3ffb4f70
0x400d76f3: _fdb_flash_read at /home/yuksel/Desktop/edp_db/build/../components/dbsrc/fdb_utils.c:265

A2 : 0xffffffff A3 : 0x0000001b A4 : 0x3ffb4f90 A5 : 0x00000020
A6 : 0xffffffaa A7 : 0x00000008 A8 : 0x800d7704 A9 : 0x3ffb4f50
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x3ffb4f90 A13 : 0x00000020
A14 : 0x00000000 A15 : 0x00000001 SAR : 0x00000018 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000018 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000
0x4000c2e0: memcpy in ROM

0x4000c2f6: memcpy in ROM<

When I examined the code, I noticed that the program crashed in this function in the fal_flash_esp32_port.c file. When I comment out the esp_partition_read function, the code does not crash, but it works incorrectly.

static int read(long offset, uint8_t *buf, size_t size)
{
esp_err_t ret;
LOCK();
//ret=0;
ret = esp_partition_read(partition, offset, buf, size);
UNLOCK();
return ret;
}

OUTPUT:

I (342) main_task: Calling app_main()
FlashDB ESP32 SPI Flash Demo
[I/FAL] Flash Abstraction Layer (V0.5.99) initialize success.
[FlashDB][kv][env][fdb_kvdb1] (../components/dbsrc/fdb_kvdb.c:1741) The oldest addr is @0x00000000
[FlashDB][kv][env][fdb_kvdb1] (../components/dbsrc/fdb_kvdb.c:1755) KVDB size is 16384 bytes.
[FlashDB][kv][env][fdb_kvdb1] (../components/dbsrc/fdb_kvdb.c:1532) Sector header info is incorrect. Auto format this sector (0x00000000).
[FlashDB][kv][env][fdb_kvdb1] (../components/dbsrc/fdb_kvdb.c:1532) Sector header info is incorrect. Auto format this sector (0x00001000).
[FlashDB][kv][env][fdb_kvdb1] (../components/dbsrc/fdb_kvdb.c:1532) Sector header info is incorrect. Auto format this sector (0x00002000).
[FlashDB][kv][env][fdb_kvdb1] (../components/dbsrc/fdb_kvdb.c:1532) Sector header info is incorrect. Auto format this sector (0x00003000).
[FlashDB][kv][env][fdb_kvdb1] All sector header is incorrect. Set it to default.
[FlashDB] FlashDB V2.0.0 is initialize success.
[FlashDB] You can get the latest version on https://github.com/armink/FlashDB .
[FlashDB][sample][kvdb][basic] ==================== kvdb_basic_sample ====================
[FlashDB][sample][kvdb][basic] get the 'boot_count' failed
[FlashDB][sample][kvdb][basic] set the 'boot_count' value to 1
[FlashDB][sample][kvdb][basic] ===========================================================
[FlashDB][sample][kvdb][string] ==================== kvdb_type_string_sample ====================
[FlashDB][sample][kvdb][string] create the 'temp' string KV, value is: 36C
[FlashDB][sample][kvdb][string] set 'temp' value to 38C
[FlashDB][kv][env][fdb_kvdb1] (../components/dbsrc/fdb_kvdb.c:921) Not found 'temp' in KV.
[FlashDB][sample][kvdb][string] delete the 'temp' finish
[FlashDB][sample][kvdb][string] ===========================================================
[FlashDB][sample][kvdb][blob] ==================== kvdb_type_blob_sample ====================
[FlashDB][sample][kvdb][blob] create the 'temp' blob KV, value is: 36
[FlashDB][sample][kvdb][blob] set 'temp' value to 38
[FlashDB][kv][env][fdb_kvdb1] (../components/dbsrc/fdb_kvdb.c:921) Not found 'temp' in KV.
[FlashDB][sample][kvdb][blob] delete the 'temp' finish
[FlashDB][sample][kvdb][blob] ===========================================================
[FlashDB][tsl][log][fdb_tsdb1] Sector (0x00000000) header info is incorrect.
[FlashDB][tsl][log][fdb_tsdb1] All sector format finished.
[FlashDB][tsl][log][fdb_tsdb1] (../components/dbsrc/fdb_tsdb.c:947) TSDB (log) oldest sectors is 0x00000000, current using sector is 0x00000000.
[FlashDB][sample][tsdb] ==================== tsdb_sample ====================
[FlashDB][sample][tsdb] append the new status.temp (36) and status.humi (85)
[E/FAL] (fal_partition_write:453) Partition write error! Partition address out of bound.
[FlashDB][sample][tsdb] append the new status.temp (38) and status.humi (90)
[FlashDB][sample][tsdb] query count is: 0
[FlashDB][sample][tsdb] ===========================================================
Restarting in 1000 seconds...
Restarting in 999 seconds...
Restarting in 998 seconds...
Restarting in 997 seconds...

I would really appreciate if you can help.