[BUG] qemu riscv64 bootup hang
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 230
Description
In the lastest code in master branch, bootup qemu riscv hang. **The issue disappear if adding some sinfo log in nx_start function.**
lijinliang1@pc0: /work/nuttx$ cmake -B build -DBOARD_CONFIG=rv-virt:nsh64 -GNinja
-- Initializing NuttX
Select HOST_LINUX=y
-- CMake: 3.22.3
-- Ninja: 1.10.0
-- Board: rv-virt
-- Config: nsh64
-- Appdir: /home/lijinliang1/work/nuttx-apps
-- The C compiler identification is GNU 12.2.1
-- The CXX compiler identification is GNU 12.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /home/lijinliang1/ssdk/prebuilts/riscv64-unknown-elf-toolsuite-15.9.0-2023.03.0/bin/riscv64-unknown-elf-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lijinliang1/work/nuttx/build
lijinliang1@pc0:/work/nuttx$ cmake --build build
[1300/1300] Generating System.map
lijinliang1@pc0:/work/nuttx$ qemu-system-riscv64 -M virt -cpu rv64 -bios none -kernel build/nuttx -nographic
ABC
$ qemu-system-riscv64 --version
QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.30)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
HostOS: Ubuntu 20.04.6 2024.02.24 LTS (Cubic 2024-02-24 15:25 )
**Debug it with gdb cannot work**

### On which OS does this issue occur?
[OS: Linux]
### What is the version of your OS?
Ubuntu 20.04.6 2024.02.24 LTS (Cubic 2024-02-24 15:25
### NuttX Version
master
### Issue Architecture
[Arch: risc-v]
### Issue Area
[Area: Kernel]
### Host information
Ubuntu 20.04.6 2024.02.24 LTS (Cubic 2024-02-24 15:25
### Verification
- [x] I have verified before submitting the report.
Contributor guide
Research direction
Reproduce the hang with the rv-virt:nsh64 configuration using the documented CMake, Ninja, and qemu-system-riscv64 commands. Start at the nx_start function and compare boot behavior with and without the added sinfo logging; done means QEMU completes boot and reaches the expected NuttX shell without the logging workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100