nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

[BUG] nsh and SmartFS file system are not SMP-proof

Open UAV-Pilot opened this issue 1 year ago • 3 comments

Description / Steps to reproduce the issue

  1. On Pi Pico W board with Pi Pico SDK 2.0, setup a system with working flash SmartFS file system and without SMP, e.g., ./tools/configure.sh -l raspberrypi-pico-w:nsh-flash

  2. verify that the following file creation, deletion and smart_test command work cd /flash echo Hello_NuttX > test2.txt cat test2.txt smart_test -w 2 /flash/test2.txt rm test2.txt

  3. enable SMP and run ps or other command to verify that SMP is working ref: https://blog.mark-stevens.co.uk/2023/06/adding-smp-to-nuttx-on-the-raspberry-pi-picow/

  4. try to re-run commands in step 2) notice that when executing file creation or deletion or smart_test command, nsh hangs. If there is a USB nsh and a telnet nsh, then both nsh hang.

Not sure if there is any other part of NuttX OS that is also not SMP-proof.

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Windows 11 WSL2 Ubuntu 22.04.2

NuttX Version

NuttX 12.7.0-RC0 0976258-dirty Oct 4 2024 22:58:36 arm rasp

Issue Architecture

[Arch: arm]

Issue Area

[Area: OS Components]

Verification

  • [X] I have verified before submitting the report.

UAV-Pilot avatar Oct 06 '24 23:10 UAV-Pilot

could you test on littlefs? so we can know whether is specific to smartfs.

xiaoxiang781216 avatar Oct 07 '24 07:10 xiaoxiang781216

Created a related bug: https://github.com/apache/nuttx/issues/13882 (Flash file system creation process does not take configured parameters on Pi Pico #13882), don't know how to create a working littlefs. Note that in menuconfig, selecting RP2040_FLASH_FILE_SYSTEM (Configure a read/write filesystem on unused flash memory) will automatically select SmartFS.

UAV-Pilot avatar Oct 07 '24 18:10 UAV-Pilot

@UAV-Pilot updates?

jerpelea avatar Oct 10 '24 17:10 jerpelea