masayuki2009 commented on pull request #5539:
URL: https://github.com/apache/incubator-nuttx/pull/5539#issuecomment-1044011423


   @GUIDINGLI 
   I noticed that we can reproduce the memory corruption issue with 
sabre-6quad:netnsh_smp (QEMU)
   
   ```
   $ ~/opensource/QEMU/qemu-5.2/build/qemu-system-arm -net nic -net 
user,hostfwd=tcp:127.0.0.1:10023-10.0.2.15:23,hostfwd=tcp:127.0.0.1:10021-10.0.2.15:21,hostfwd=tcp:127.0.0.1:15001-10.0.2.15:5001
 -M sabrelite -smp 4 -kernel ./nuttx -nographic
   
   ABCDGHIJKNOPQ
   
   NuttShell (NSH) NuttX-3.6.1
   nsh> nfsmount 43.31.77.50 /mnt/nfs /exports-nuttx 
   nsh> md5 -f /mnt/nfs/audio/xxx.wav 
   [   37.200000] [CPU1] up_assert: Assertion failed CPU1 at 
file:inode/fs_files.c line: 75 task: Telnet daemon
   [   37.200000] [CPU1] arm_registerdump: R0: 00000001 R1: 00000000 R2: 
00000000  R3: 00000000
   [   37.210000] [CPU1] arm_registerdump: R4: 108608a0 R5: 10853500 R6: 
1086091c  R7: 10861380
   [   37.210000] [CPU1] arm_registerdump: R8: 00000000 SB: 00000018 SL: 
00000000  FP: 00000001
   [   37.210000] [CPU1] arm_registerdump: IP: 00000001 SP: 10861380 LR: 
10809ac0  PC: 1080a22c
   [   37.210000] [CPU1] arm_registerdump: CPSR: 60000053
   [   37.210000] [CPU1] arm_dump_stack: IRQ Stack:
   [   37.210000] [CPU1] arm_dump_stack: sp:     10861380
   [   37.210000] [CPU1] arm_dump_stack:   base: 10853d10
   [   37.210000] [CPU1] arm_dump_stack:   size: 00000800
   [   37.210000] [CPU1] arm_dump_stack: ERROR: IRQ Stack pointer is not within 
the stack
   [   37.220000] [CPU1] arm_dump_stack: User Stack:
   [   37.220000] [CPU1] arm_dump_stack: sp:     10861380
   [   37.220000] [CPU1] arm_dump_stack:   base: 10860d30
   [   37.220000] [CPU1] arm_dump_stack:   size: 000007d8
   [   37.220000] [CPU1] arm_stackdump: 10861380: 00000001 10809ac0 1080a22c 
108088d0 00000000 10864a30 10860a50 00000000
   [   37.220000] [CPU1] arm_stackdump: 108613a0: 00000001 10806788 10864a30 
1081c3e0 00000000 10860a50 00000000 10864a30
   [   37.220000] [CPU1] arm_stackdump: 108613c0: 00000000 1081c6f8 00000000 
00000000 00000000 10860c20 108649f0 10864880
   [   37.220000] [CPU1] arm_stackdump: 108613e0: 10864a30 00000000 108608a0 
10846a6d 00000064 00000800 10846a61 10803898
   [   37.230000] [CPU1] arm_stackdump: 10861400: 00000000 10864880 00000000 
00000000 10846a6d 10802cd4 10864880 10846a6d
   [   37.230000] [CPU1] arm_stackdump: 10861420: 10846a6d 10864880 00000064 
00000000 00000000 1081d8ac 00000000 10802bc4
   [   37.230000] [CPU1] arm_stackdump: 10861440: 00000800 1080ac8c 00000000 
00000000 10860880 00000003 1081c998 00000000
   [   37.230000] [CPU1] arm_stackdump: 10861460: 10802c14 10802c0c 00000800 
1080ac8c 00000000 1080ac8c 10860880 10802c24
   [   37.230000] [CPU1] arm_stackdump: 10861480: 00000000 00000064 10860880 
1080b078 00000000 deadbeef deadbeef 00000000
   [   37.230000] [CPU1] arm_stackdump: 108614a0: 00000001 00000010 6ad60002 
0202000a 00000000 00000000 00000000 7665642f
   [   37.240000] [CPU1] arm_stackdump: 108614c0: 6c65742f 3074656e deadbe00 
deadbeef deadbeef 1080ae94 00000002 10860d08
   [   37.240000] [CPU1] arm_stackdump: 108614e0: 00000000 00000000 00000000 
00000000 00000000 10806ab0 00000000 10803234
   [   37.240000] [CPU1] arm_showtasks:    PID    PRI      USED     STACK   
FILLED    COMMAND
   [   37.240000] [CPU1] arm_showtasks:   ----   ----       128      2048     
6.2%    irq
   [   37.240000] [CPU1] arm_dump_task:      0      0       480      1000    
48.0%    CPU0 IDLE
   [   37.240000] [CPU1] arm_dump_task:      1      0       208      1000    
20.8%    CPU1 IDLE
   [   37.240000] [CPU1] arm_dump_task:      2      0       208      1000    
20.8%    CPU2 IDLE
   [   37.240000] [CPU1] arm_dump_task:      3      0       208      1000    
20.8%    CPU3 IDLE
   [   37.240000] [CPU1] arm_dump_task:      4    224       160      2016     
7.9%    hpwork
   [   37.240000] [CPU1] arm_dump_task:      5    100       520      2016    
25.7%    lpwork
   [   37.240000] [CPU1] arm_dump_task:      6    100      1640      3048    
53.8%    nsh_main
   [   37.240000] [CPU1] arm_dump_task:      7    100       824      2008    
41.0%    Telnet daemon
   [   37.240000] [CPU1] arm_dump_task:      8    100       336      1000    
33.6%    telnet_io
   ```
   
   ```
   Trying 127.0.0.1...
   Connected to localhost.
   Escape character is '^]'.
   
   NuttShell (NSH) NuttX-3.6.1
   nsh> uname -a
   NuttX  3.6.1 3aef1a7012 Feb 18 2022 15:39:53 arm sabre-6quad
   nsh> cat /proc/uptime
        36.29
   nsh> ps
     PID GROUP CPU PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK   STACK  
 USED  FILLED COMMAND
       0     0   0   0 FIFO     Kthread N-- Running            00000000 001000 
000480  48.0%  CPU0 IDLE
       1     1   1   0 FIFO     Kthread N-- Assigned           00000000 001000 
000208  20.8%  CPU1 IDLE
       2     2   2   0 FIFO     Kthread N-- Assigned           00000000 001000 
000208  20.8%  CPU2 IDLE
       3     3   3   0 FIFO     Kthread N-- Running            00000000 001000 
000208  20.8%  CPU3 IDLE
       4     4 --- 224 RR       Kthread --- Waiting  Semaphore 00000000 002016 
000160   7.9%  hpwork 0x10855d4c
       5     5   0 100 RR       Kthread --- Running            00000000 002016 
000520  25.7%  lpwork 0x10855d58
       6     6 --- 100 RR       Task    --- Waiting  Semaphore 00000000 003048 
001640  53.8%  nsh_main
       7     7 --- 100 RR       Task    --- Waiting  Semaphore 00000000 002008 
000592  29.4%  Telnet daemon 0x10860880
       8     8 --- 100 RR       Kthread --- Waiting  Semaphore 00000000 001000 
000336  33.6%  telnet_io
      28    28   2 100 RR       Task    --- Running            00000000 002024 
001176  58.1%  Telnet session
   nsh> free
                      total       used       free    largest  nused  nfree
           Umem: 1064972960      36112 1064936848 1064936816     93      2
   nsh> ifconfig
   eth0 Link encap:Ethernet HWaddr 00:e0:de:ad:be:ef at UP
        inet addr:10.0.2.15 DRaddr:10.0.2.2 Mask:255.255.255.0
   
                IPv4   TCP   UDP  ICMP
   Received     55dc  55dc  0000  0000
   Dropped      0000  0000  0000  0000
     IPv4        VHL: 0000   Frg: 0000
     Checksum   0000  0000  0000  ----
     TCP         ACK: 0000   SYN: 0000
                 RST: 0000  0000
     Type       0000  ----  ----  0000
   Sent         a4d9  a4d9  0000  0000
     Rexmit     ----  0005  ----  ----
   nsh> exit
   Connection closed by foreign host.
   Trying 127.0.0.1...
   Connected to localhost.
   Escape character is '^]'.
   Connection closed by foreign host.
   Traceback (most recent call last):
     File "./expect_nuttx_telnetd_test.py", line 12, in <module>
       child.expect('nsh> ')
     File 
"/home/ishikawa/.local/lib/python3.6/site-packages/pexpect/spawnbase.py", line 
344, in expect
       timeout, searchwindowsize, async_)
     File 
"/home/ishikawa/.local/lib/python3.6/site-packages/pexpect/spawnbase.py", line 
372, in expect_list
       return exp.expect_loop(timeout)
     File 
"/home/ishikawa/.local/lib/python3.6/site-packages/pexpect/expect.py", line 
179, in expect_loop
       return self.eof(e)
     File 
"/home/ishikawa/.local/lib/python3.6/site-packages/pexpect/expect.py", line 
122, in eof
       raise exc
   ```


-- 
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