461911662 commented on issue #16868: URL: https://github.com/apache/nuttx/issues/16868#issuecomment-3212659786
> [@461911662](https://github.com/461911662) could you please translate to English, all the communication here are in English by default ok~ **The detailed steps are as follows:** ./tools/configure.sh -a ./vendor/boss/app/boss1-app qemu-armv7a:smp make menuconfig qemu-system-arm -cpu cortex-a7 -smp 4 -nographic -machine virt,virtualization=off,gic-version=2 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx **The system failed to start. The error message is as follows:** [CPU0] psci_detect: Detected PSCI v0.2 [CPU0] nx_start: Entry [CPU0] uart_register: Registering /dev/console [CPU0] uart_register: Registering /dev/ttyS1 [CPU0] work_start_highpri: Starting high-priority kernel worker thread(s) [CPU0] nxtask_activate: hpwork pid=4,TCB=0x40130318 [CPU0] nxtask_activate: AppBringUp pid=5,TCB=0x401313f0 [CPU3] nx_idle_trampoline: CPU3: Beginning Idle Loop [CPU2] nx_idle_trampoline: CPU2: Beginning Idle Loop [CPU1] nx_idle_trampoline: CPU1: Beginning Idle Loop [CPU0] nx_start_application: Starting init thread [CPU0] task_spawn: name=nsh_main entry=0x4010cfec file_actions=0 attr=0x4013248c argv=0x40132488 [CPU0] nxtask_activate: nsh_main pid=6,TCB=0x401324f0 [CPU1] qemu-system-arm: terminating on signal 2 **The added configuration is as follows:** make savedefconfig make -f tools/Makefile.host ./tools/cmpconfig defconfig ./boards/arm/qemu/qemu-armv7a/configs/smp/defconfig file1: CONFIG_BOARD_LATE_INITIALIZE=y file2: file1: CONFIG_DEBUG_SCHED=y file2: file1: CONFIG_DEBUG_SCHED_INFO=y file2: file1: file2: CONFIG_EXAMPLES_HELLO=y file1: file2: CONFIG_TESTING_GETPRIME=y file1: file2: CONFIG_TESTING_OSTEST=y **In addition, I want syslog to complete the printing of information and have added a new patch. The patch is as follows:** git diff diff --git a/libs/libc/syslog/lib_syslog.c b/libs/libc/syslog/lib_syslog.c index 5cdb73c145..0cc1667ede 100644 --- a/libs/libc/syslog/lib_syslog.c +++ b/libs/libc/syslog/lib_syslog.c @@ -91,14 +91,21 @@ void vsyslog(int priority, FAR const IPTR char *fmt, va_list ap) +#include <nuttx/spinlock.h> +static volatile spinlock_t g_syslog_lock = SP_UNLOCKED; void syslog(int priority, FAR const IPTR char *fmt, ...) { va_list ap; +#ifdef CONFIG_SPINLOCK + spin_lock(&g_syslog_lock); +#endif /* Let vsyslog do the work */ va_start(ap, fmt); vsyslog(priority, fmt, ap); va_end(ap); +#ifdef CONFIG_SPINLOCK + spin_unlock(&g_syslog_lock); +#endif **After switching to a non-SMP configuration, executing the following command will not cause the system to freeze** make menuconfig make savedefconfig ./tools/cmpconfig defconfig ./boards/arm/qemu/qemu-armv7a/configs/smp/defconfig file1: CONFIG_BOARD_LATE_INITIALIZE=y file2: file1: CONFIG_DEBUG_SCHED=y file2: file1: CONFIG_DEBUG_SCHED_INFO=y file2: file1: file2: CONFIG_EXAMPLES_HELLO=y file1: file2: CONFIG_SMP=y file1: CONFIG_SPINLOCK=y file2: file1: file2: CONFIG_TESTING_GETPRIME=y file1: file2: CONFIG_TESTING_OSTEST=y make nuttx -j4 **execute the qemu** qemu-system-arm -cpu cortex-a7 -nographic -machine virt,virtualization=off,gic-version=2 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx **get normal ouput** psci_detect: Detected PSCI v0.2 nx_start: Entry uart_register: Registering /dev/console uart_register: Registering /dev/ttyS1 work_start_highpri: Starting high-priority kernel worker thread(s) nxtask_activate: hpwork pid=1,TCB=0x40129310 nxtask_activate: AppBringUp pid=2,TCB=0x4012a3e0 nx_start_application: Starting init thread task_spawn: name=nsh_main entry=0x4010adc4 file_actions=0 attr=0x4012b474 argv=0x4012b470 nxtask_activate: nsh_main pid=3,TCB=0x4012b4d8 nxtask_exit: AppBringUp pid=2,TCB=0x4012a3e0 lib_cxx_initialize: _sinit: 0x40121000 _einit: 0x40121000 NuttShell (NSH) nsh> nx_start: CPU0: Beginning Idle Loop nsh> nsh> nsh> qemu-system-arm: terminating on signal 2 **the questions** i don't know the reason, can you help me? -- 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org