← index #6741Issue #6568
Duplicate · high · value 0.602
QUERY · ISSUE

lfs2: crash in lfs2_pair_cmp

openby tveopened 2020-12-29updated 2021-03-11
extmod

I'm getting sometimes persistent crashes on an esp32 running master post v1.13. It happens when closing a just-written file. I'm not sure what to do about it yet, posting here in case others bump into the same thing.
The backtrace is:

PC: 0x401c1a7f: lfs2_pair_cmp at /home/src/esp32/mpy-1.13/micropython/ports/esp32/../../lib/littlefs/lfs2.c:267
BT-0: 0x401c1a7c: lfs2_pair_cmp at /home/src/esp32/mpy-1.13/micropython/ports/esp32/../../lib/littlefs/lfs2.c:266
BT-1: 0x400ff4c2: lfs2_dir_commit at /home/src/esp32/mpy-1.13/micropython/ports/esp32/../../lib/littlefs/lfs2.c:1829 (discriminator 1)
BT-2: 0x400fff69: lfs2_file_rawsync at /home/src/esp32/mpy-1.13/micropython/ports/esp32/../../lib/littlefs/lfs2.c:2841
BT-3: 0x400fff91: lfs2_file_rawclose at /home/src/esp32/mpy-1.13/micropython/ports/esp32/../../lib/littlefs/lfs2.c:2622
BT-4: 0x401007c1: lfs2_file_close at /home/src/esp32/mpy-1.13/micropython/ports/esp32/../../lib/littlefs/lfs2.c:5091
BT-5: 0x400f5e40: mp_vfs_lfs2_file_ioctl at /home/src/esp32/mpy-1.13/micropython/ports/esp32/../../extmod/vfs_lfsx_file.c:190
BT-6: 0x400e9add: mp_stream_close at /home/src/esp32/mpy-1.13/micropython/ports/esp32/../../py/stream.c:422
BT-7: 0x400e387a: fun_builtin_1_call at /home/src/esp32/mpy-1.13/micropython/ports/esp32/../../py/objfun.c:71
BT-8: 0x400df8cd: mp_call_function_n_kw at /home/src/esp32/mpy-1.13/micropython/ports/esp32/../../py/runtime.c:650
BT-9: 0x400df9fa: mp_call_method_n_kw at /home/src/esp32/mpy-1.13/micropython/ports/esp32/../../py/runtime.c:666
BT-10: 0x400ed4e9: mp_execute_bytecode at /home/src/esp32/mpy-1.13/micropython/ports/esp32/../../py/vm.c:1085

The exception is (LoadProhibited). Exception was unhandled. and the exception address is 0x17f8

CANDIDATE · ISSUE

ESP32: littlefs - Guru MEditation Error - Reboot - lfs2_pair_cmp at lfs2.c

closedby stragaopened 2020-10-24updated 2022-09-13
port-esp32

MicroPython v1.13-103-gb137d064e-dirty on 2020-10-23; ANY with ESP32

If use littlefs: reboot.
But the same code with fatfs works fine.

Code Run in thread asyncio and a lot read-write files from flash.


Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x401d8123 PS : 0x00060730 A0 : 0x80101972 A1 : 0x3ffd7e10
0x401d8123: lfs2_pair_cmp at lfs2.c:?

A2 : 0xe613b061 A3 : 0x3f82d3b8 A4 : 0x00000000 A5 : 0x3f82c858
A6 : 0x00000001 A7 : 0x00001ba2 A8 : 0x00000001 A9 : 0x00000001
A10 : 0xec4fa8bb A11 : 0x00000001 A12 : 0x13b05968 A13 : 0x00000224
A14 : 0x00000001 A15 : 0x00000522 SAR : 0x0000000c EXCCAUSE: 0x0000001c
EXCVADDR: 0xe613b061 LBEG : 0x40094624 LEND : 0x40094652 LCOUNT : 0x00000000
0x40094624: memcpy at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memcpy.S:168

0x40094652: memcpy at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memcpy.S:201

ELF file SHA256: 0000000000000000

Backtrace: 0x401d8120:0x3ffd7e10 0x4010196f:0x3ffd7e30 0x401020fe:0x3ffd7ee0 0x40102125:0x3ffd7f20 0x400f6e32:0x3ffd7f40 0x400ea505:0x3ffd7f60 0x400f6da5:0x3ffd7f90 0x400e4042:0x3ffd7fb0 0x400dfd7d:0x3ffd7fe0 0x400dfeb9:0x3ffd8000 0x400ed6f5:0x3ffd8020 0x400e4104:0x3ffd80c0 0x400dfd7d:0x3ffd80f0 0x400dfeb9:0x3ffd8110 0x400ede93:0x3ffd8130 0x400e4104:0x3ffd81d0 0x400dfd7d:0x3ffd8250 0x400e25e0:0x3ffd8270 0x400e25fd:0x3ffd82c0 0x400dfd7d:0x3ffd82e0 0x400e04d4:0x3ffd8300 0x400ede4d:0x3ffd8360 0x400e4104:0x3ffd8400 0x400dfd7d:0x3ffd8430 0x400e04d4:0x3ffd8450 0x400edee1:0x3ffd84b0 0x400e4447:0x3ffd8550 0x400dffe1:0x3ffd8570 0x400ee09d:0x3ffd85b0 0x400e4447:0x3ffd8650 0x400dffe1:0x3ffd8670 0x400ee09d:0x3ffd86b0 0x400e4447:0x3ffd8750 0x400e44b9:0x3ffd8770 0x400e4528:0x3ffd87a0 0x400e3fad:0x3ffd87c0 0x400dfd7d:0x3ffd87e0 0x400dfeb9:0x3ffd8800 0x400ede93:0x3ffd8820 0x400e4104:0x3ffd88c0 0x400dfd7d:0x3ffd88f0 0x400ede0d:0x3ffd8910 0x400e4104:0x3ffd89b0 0x400dfd7d:0x3ffd8a10 0x400ecec8:0x3ffd8a30 0x400fbf79:0x3ffd8ac0 0x4009690d:0x3ffd8ae0
0x401d8120: lfs2_pair_cmp at lfs2.c:?

0x4010196f: lfs2_dir_commit at lfs2.c:?

0x401020fe: lfs2_file_sync at ??:?

0x40102125: lfs2_file_close at ??:?

0x400f6e32: mp_vfs_lfs2_file_ioctl at vfs_lfs.c:?

0x400ea505: mp_stream_close at ??:?

0x400f6da5: mp_vfs_lfs2_file___exit__ at vfs_lfs.c:?

0x400e4042: fun_builtin_var_call at objfun.c:?

0x400dfd7d: mp_call_function_n_kw at ??:?

0x400dfeb9: mp_call_method_n_kw at ??:?

0x400ed6f5: mp_execute_bytecode at ??:?

0x400e4104: fun_bc_call at objfun.c:?

0x400dfd7d: mp_call_function_n_kw at ??:?

0x400dfeb9: mp_call_method_n_kw at ??:?

0x400ede93: mp_execute_bytecode at ??:?

0x400e4104: fun_bc_call at objfun.c:?

0x400dfd7d: mp_call_function_n_kw at ??:?

0x400e25e0: mp_call_method_self_n_kw at ??:?

0x400e25fd: bound_meth_call at objboundmeth.c:?

0x400dfd7d: mp_call_function_n_kw at ??:?

0x400e04d4: mp_call_method_n_kw_var at ??:?

0x400ede4d: mp_execute_bytecode at ??:?

0x400e4104: fun_bc_call at objfun.c:?

0x400dfd7d: mp_call_function_n_kw at ??:?

0x400e04d4: mp_call_method_n_kw_var at ??:?

0x400edee1: mp_execute_bytecode at ??:?

0x400e4447: mp_obj_gen_resume at ??:?

0x400dffe1: mp_resume at ??:?

0x400ee09d: mp_execute_bytecode at ??:?

0x400e4447: mp_obj_gen_resume at ??:?

0x400dffe1: mp_resume at ??:?

0x400ee09d: mp_execute_bytecode at ??:?

0x400e4447: mp_obj_gen_resume at ??:?

0x400e44b9: gen_resume_and_raise at objgenerator.c:?

0x400e4528: gen_instance_send at objgenerator.c:?

0x400e3fad: fun_builtin_2_call at objfun.c:?

0x400dfd7d: mp_call_function_n_kw at ??:?

0x400dfeb9: mp_call_method_n_kw at ??:?

0x400ede93: mp_execute_bytecode at ??:?

0x400e4104: fun_bc_call at objfun.c:?

0x400dfd7d: mp_call_function_n_kw at ??:?

0x400ede0d: mp_execute_bytecode at ??:?

0x400e4104: fun_bc_call at objfun.c:?

0x400dfd7d: mp_call_function_n_kw at ??:?

0x400ecec8: thread_entry at modthread.c:?

0x400fbf79: freertos_entry at mpthreadport.c:?

0x4009690d: vPortTaskWrapper at port.c:?

Rebooting...

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied