radek-pesina opened a new issue, #9046:
URL: https://github.com/apache/nuttx/issues/9046

   Hi,
   I'm encountering an issue on both our target HW and also reproducible in 
QEMU build where after a handful of echo writes to file an assert fails.  If 
assertions are turned off then typically a page fault is encountered.  
On-target I encountered this when performing echo to file on a SD/eMMC card 
running littlefs, then found it occurs even when writing to null, including in 
an emulated environment, suggesting there is a more fundamental problem at hand 
not related to the SD/eMMC driver or LittleFS filesystem.
   
   * Nuttx GIT version: f4683713327aaeab0656e3ea83814b44267bdc4a
   * Built with commands:
      $ make distclean -j16
      $ ./tools/configure.sh rv-virt:knsh32
      $ make -j16 
      $ make export -j16
      $ make import -j16  
   * Executed with command: 
      $ qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -smp 8 
-bios none -kernel nuttx -nographic -serial mon:stdio
   
   Terminal output (NOTE: the number of echo's required varies - depending on 
build configuration it can take around 100 or as little as a dozen):
   
   
   
   ```
   nsh> echo "Testing1234567890abcdefghijklmnopqrstuvwxyz0987654321" > /dev/null
   nsh> echo "Testing1234567890abcdefghijklmnopqrstuvwxyz0987654321" > /dev/null
   nsh> echo "Testing1234567890abcdefghijklmnopqrstuvwxyz0987654321" > /dev/null
   nsh> echo "Testing1234567890abcdefghijklmnopqrstuvwxyz0987654321" > /dev/null
   nsh> echo "Testing1234567890abcdefghijklmnopqrstuvwxyz0987654321" > /dev/null
   nsh> echo "Testing1234567890abcdefghijklmnopqrstuvwxyz0987654321" > /dev/null
   nsh> echo "Testing1234567890abcdefghijklmnopqrstuvwxyz0987654321" > /dev/null
   nsh> echo "Testing1234567890abcdefghijklmnopqrstuvwxyz0987654321" > /dev/null
   nsh> echo "Testing1234567890abcdefghijklmnopqrstuvwxyz0987654321" > /dev/null
   nsh> echo "Testing1234567890abcdefghijklmnopqrstuvwxyz0987654321" > /dev/null
   nsh> echo "Testing1234567890abcdefghijklmnopqrstuvwxyz0987654321" > /dev/null
   nsh> echo "Testing1234567890abcdefghijklmnopqrstuvwxyz0987654321" > /dev/null
   [   11.056000] _assert: Current Version: NuttX  10.2.0 c637c2c85c Apr 20 
2023 10:31:24 risc-v
   [   11.063000] _assert: Assertion failed : at file: mm_heap/mm_free.c:136 
task: nxposix_spawn_proxy 0x800141b8
   [   11.070000] up_dump_register: EPC: 0000000080015ff2
   [   11.074000] up_dump_register: A0: 0000000000000000 A1: 0000000080201600 
A2: 0000000010000000 A3: 0000000080019748
   [   11.077000] up_dump_register: A4: 000000000000000a A5: 0000000000000000 
A6: 0000000000000009 A7: 000000000000006c
   [   11.079000] up_dump_register: T0: 000000000000002d T1: 0000000000000068 
T2: 0000000000000030 T3: 0000000000000009
   [   11.082000] up_dump_register: T4: 000000000000002a T5: 000000000000002e 
T6: 00000000000001ff
   [   11.085000] up_dump_register: S0: 0000000080209950 S1: 0000000000000001 
S2: 0000000080201758 S3: 0000000080019a08
   [   11.088000] up_dump_register: S4: 0000000080017c68 S5: 0000000000000088 
S6: 0000000000000000 S7: 0000000000000000
   [   11.092000] up_dump_register: S8: 0000000000000000 S9: 0000000000000000 
S10: 0000000000000000 S11: 0000000000000000
   [   11.095000] up_dump_register: SP: 000000008020c200 FP: 0000000080209950 
TP: 0000000000000000 RA: 0000000080015ff2
   [   11.098000] dump_stack: IRQ Stack:
   [   11.099000] dump_stack: sp:     0x8020c210
   [   11.100000] dump_stack:   base: 0x80200270
   [   11.101000] dump_stack:   size: 00002048
   [   11.102000] dump_stack: ERROR: IRQ Stack pointer is not within the stack
   [   11.104000] dump_stack: User Stack:
   [   11.105000] dump_stack: sp:     0x8020c210
   [   11.106000] dump_stack:   base: 0x8020c060
   [   11.107000] dump_stack:   size: 00000928
   [   11.108000] stack_dump: 0x8020c200: 80209950 00000000 800116a2 00000000 
80206c00 00000000 80006ac4 00000000
   [   11.111000] stack_dump: 0x8020c220: 000003a0 00000000 8020c060 00000000 
80209f68 00000000 7474754e 00000058
   [   11.114000] stack_dump: 0x8020c240: 80209f68 00000000 8001535c 00000000 
80206c00 00000000 00000000 00000000
   [   11.116000] stack_dump: 0x8020c260: 000041ff 00000000 00000000 2e303100 
00302e32 00000000 fffffffc ffffffff
   [   11.119000] stack_dump: 0x8020c280: 3663ff83 32633733 63353863 72704120 
20303220 33323032 3a303120 323a3133
   [   11.121000] stack_dump: 0x8020c2a0: c0200034 00000000 8020a810 00000000 
80206c00 73697200 00762d63 00000000
   [   11.124000] stack_dump: 0x8020c2c0: c02029b8 00000000 fffffffc ffffffff 
ffffff83 ffffffff c0200530 00000000
   [   11.126000] stack_dump: 0x8020c2e0: c02029b8 00000000 c0200888 00000000 
c0202918 00000000 80206c00 00000000
   [   11.128000] stack_dump: 0x8020c300: 8020a810 00000000 8000697c 00000000 
8020a810 00000000 800083ce 00000000
   [   11.129000] stack_dump: 0x8020c320: c0202918 00000000 fffffffe ffffffff 
8020a810 00000000 80010148 00000000
   [   11.131000] stack_dump: 0x8020c340: 00000000 00000000 00000000 00000000 
80209f08 00000000 00000000 00000000
   [   11.133000] stack_dump: 0x8020c360: 00000000 00000000 c02029b8 00000000 
c0202908 00000000 c0200888 00000000
   [   11.135000] stack_dump: 0x8020c380: c0202918 00000000 8001418a 00000000 
00000003 00000000 c0200530 00000000
   [   11.138000] stack_dump: 0x8020c3a0: 00000000 00000000 00000000 00000000 
00000000 00000000 00000000 00000000
   [   11.141000] stack_dump: 0x8020c3c0: 00000000 00000000 00000000 00000000 
80201708 00000000 800141fe 00000000
   [   11.143000] stack_dump: 0x8020c3e0: 00000000 00000000 80003b44 00000000 
00000000 00000000 00000000 00000000
   [   11.145000] dump_stack: Kernel Stack:
   [   11.146000] dump_stack: sp:     0x8020c210
   [   11.147000] dump_stack:   base: 0
   [   11.147000] dump_stack:   size: 00003072
   [   11.148000] dump_stack: ERROR: Kernel Stack pointer is not within the 
stack
   [   11.150000] show_tasks:    PID GROUP PRI POLICY   TYPE    NPX STATE   
EVENT      SIGMASK  STACKBASE  STACKSIZE      USED   FILLED    COMMAND
   [   11.153000] show_tasks:   ----   --- --- -------- ------- --- ------- 
---------- -------- 0x80200270      2048      2040    99.6%!   irq
   [   11.156000] dump_task:       0     0   0 FIFO     Kthread N-- Ready       
       0000000000000000 0x80206030      3024      1504    49.7%    Idle Task
   [   11.156000] dump_task:       1     1 100 RR       Kthread --- Waiting 
Semaphore  0000000000000000 0x8020a060      1952       408    20.9%    lpwork 
0x80201388
   [   11.156000] dump_task:       2     2 100 RR       Task    --- Waiting 
Semaphore  0000000000000000 0xc0202060      2976      1560    52.4%    
/system/bin/init
   [   11.156000] dump_task:      47    47 100 RR       Kthread --- Running     
       0000000000000000 0x8020c060       928       928   100.0%!   
nxposix_spawn_proxy �o �
   ```
   
   
   
   Any ideas? Please let me know if you require any further information.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to