JeffreyUrban / MaixPy

MicroPython for K210 RISC-V, let's play with edge AI easier
https://maixpy.sipeed.com
Other
2 stars 0 forks source link

MicroPython v1.16+: sys_exit called by core 1 with 0x539 #1

Open JeffreyUrban opened 2 years ago

JeffreyUrban commented 2 years ago

Describe the bug After upgrading MicroPython to v1.16, upon boot, core 1 generates a core dump. See branch update-mp-v1.16 commit e2938e1. Did not generate the core dump with MicroPython v1.15 (see tag v1.15).

To Reproduce Steps to reproduce the behavior: Flash 'Maix Bit with mic' board Connect via serial Press reset button

Expected behavior Expected boot without error.

Actual behaviour Boots with core dump from core 1, but REPL remains responsive.

Screenshots

[MAIXPY] Pll0:freq:832000000
[MAIXPY] Pll1:freq:398666666
[MAIXPY] Pll2:freq:45066666
[MAIXPY] cpu:freq:416000000
[MAIXPY] kpu:freq:398666666
[MAIXPY] Flash:0xc8:0x17
[MaixPy] gc heap=0x80309b40-0x80389b40(524288)
core dump: [MsixPyn dnlt end
use 0x0000000000000004, EPC 0x000000008000af68
reg[00](zero ) = 0xee9f6e92e58d0c41, reg[01](ra   ) = 0x000000008000af48
reg[02](sp   ) = 0x00000000802eaa50, reg[03](gp   ) = 0x000000008020ea58
reg[04](tp   ) = 0x00000000802dad80, reg[05](t0   ) = 0x0000000000006000
reg[06](t1   ) = 0x0000000000000000, reg[07](t2   ) = 0x0000000000000000
reg[08](s0/fp) = 0x0000000000000002, reg[09](s1   ) = 0x0000000000000001
reg[10](a0   ) = 0x000000008020e2b8, reg[11](a1   ) = 0x00000000000000a2
reg[12](a2   ) = 0x0000000000000006, reg[13](a3   ) = 0x0000000000006472
reg[14](a4   ) = 0x0000000000000064, reg[15](a5   ) = 0x0000000000000008
reg[16](a6   ) = 0x0000000000000004, reg[17](a7   ) = 0x0000000000000000
reg[18](s2   ) = 0x0000000000000000, reg[19](s3   ) = 0x0000000080143dc0
reg[20](s4   ) = 0x0000000000000000, reg[21](s5   ) = 0x0000000000000000
reg[22](s6   ) = 0x0000000000000000, reg[23](s7   ) = 0x0000000000000000
reg[24](s8   ) = 0x0000000000000000, reg[25](s9   ) = 0x0000000000000000
reg[26](s10  ) = 0x0000000000000000, reg[27](s11  ) = 0x0000000000000000
reg[28](t3   ) = 0x0000000000000000, reg[29](t4   ) = 0x0000000000000000
reg[30](t5   ) = 0x0000000000000000, reg[31](t6   ) = 0x0000000000000000
freg[00](ft0 ) = 0x0000000000000000(), freg[00]() = 0x000000008012f130()
freg[02](ft2 ) = 0x0000000000000000(), freg[00]() = 0x000000008012f140()
freg[04](ft4 ) = 0x0000000000000000(), freg[00]() = 0x000000008012f150()
freg[06](ft6 ) = 0x1560b3ed00000000(), freg[-536870912]() = 0x000000008012f160()
freg[08](fs0 ) = 0xcc93218200000000(), freg[1073741824]() = 0x000000008012f188()
freg[10](fa0 ) = 0x0000000000000000(), freg[00]() = 0x000000008012f1b8()
freg[12](fa2 ) = 0x4c970c7700000000(), freg[536870912]() = 0x000000008012f1e0()
freg[14](fa4 ) = 0x76d07aba00000000(), freg[-1610612736]() = 0x000000008012f1f0()
freg[16](fa6 ) = 0x70e481b100000000(), freg[1610612736]() = 0x000000008012f200()
freg[18](fs2 ) = 0x1f67d2ff00000000(), freg[00]() = 0x000000008012f228()
freg[20](fs4 ) = 0xac6e7a6200000000(), freg[1073741824]() = 0x000000008012f238()
freg[22](fs6 ) = 0x451f4f9600000000(), freg[-536870912]() = 0x000000008012f248()
freg[24](fs8 ) = 0x2d092c7200000000(), freg[1073741824]() = 0x000000008012f258()
freg[26](fs10) = 0x1ab57dd200000000(), freg[-536870912]() = 0x000000008012f268()
freg[28](ft8 ) = 0xd578c75400000000(), freg[-536870912]() = 0x000000008012f290()
freg[30](ft10) = 0x505a82ec00000000(), freg[-1073741824]() = 0x000000008012f2a0()
W (323504244) SYSCALL: sys_exit called by core 1 with 0x539

 __  __              _____  __   __  _____   __     __
|  \/  |     /\     |_   _| \ \ / / |  __ \  \ \   / /
| \  / |    /  \      | |    \ V /  | |__) |  \ \_/ /
| |\/| |   / /\ \     | |     > <   |  ___/    \   /
| |  | |  / ____ \   _| |_   / . \  | |         | |
|_|  |_| /_/    \_\ |_____| /_/ \_\ |_|         |_|

Official Site : https://www.sipeed.com
Wiki          : https://maixpy.sipeed.com

MicroPython eef22406c-dirty on 2022-01-26; Sipeed_M1 with kendryte-k210
Type "help()" for more information.
>>>

Please complete the following information

JeffreyUrban commented 2 years ago

Same issue with MicroPython v1.17. See branch update-mp-v1.17 commit ebe58ac.

JeffreyUrban commented 2 years ago

Same issue with MicroPython v1.18. See branch update-mp-v1.18 commit c2bf31c.

JeffreyUrban commented 2 years ago

As a workaround, removed the no-op core 1 task, and this removed the core 1 dump with MicroPython versions 1.16, 1.17, 1.18 (all versions affected). See branch update-mp-v1.16 commit f0897da. See branch update-mp-v1.17 commit ebe58ac. See branch update-mp-v1.18 commit 68a0afc.

Keeping open: Should fix this, so that core 1 is available for use.