masayuki2009 commented on PR #8951:
URL: https://github.com/apache/nuttx/pull/8951#issuecomment-1495585959

   >It is strange. I just rebuilt the code and can't reproduce the crash. I 
will do more experiments.
   
   @pkarashchenko 
   I tried this PR with 
   
   ```
   --- a/boards/arm/cxd56xx/spresense/configs/smp/defconfig
   +++ b/boards/arm/cxd56xx/spresense/configs/smp/defconfig
   @@ -40,12 +40,14 @@ CONFIG_NSH_ARCHINIT=y
    CONFIG_NSH_BUILTIN_APPS=y
    CONFIG_NSH_READLINE=y
    CONFIG_PREALLOC_TIMERS=4
   +CONFIG_PRIORITY_INHERITANCE=y
    CONFIG_RAM_SIZE=1572864
    CONFIG_RAM_START=0x0d000000
    CONFIG_READLINE_CMD_HISTORY=y
    CONFIG_RR_INTERVAL=200
    CONFIG_RTC=y
    CONFIG_RTC_DRIVER=y
   +CONFIG_SEM_PREALLOCHOLDERS=0
    CONFIG_SMP=y
    CONFIG_SMP_NCPUS=2
    CONFIG_SPI=y
   
   $ arm-none-eabi-gcc --version
   arm-none-eabi-gcc (Arm GNU Toolchain 12.2.MPACBTI-Rel1 (Build 
arm-12-mpacbti.34)) 12.2.1 20230214
   Copyright (C) 2022 Free Software Foundation, Inc.
   This is free software; see the source for copying conditions.  There is NO
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   ```
   
   And the ostest passed without any errors.
   
   ```
   NuttShell (NSH) NuttX-3.6.1
   nsh> uname -a
   NuttX 3.6.1 7b6a424c6d-dirty Apr  4 2023 17:35:14 arm spresense
   nsh> ps
     PID GROUP CPU PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK          
 STACK COMMAND
       0     0   0   0 FIFO     Kthread N-- Assigned           0000000000000000 
001000 CPU0 IDLE
       1     1   1   0 FIFO     Kthread N-- Running            0000000000000000 
001000 CPU1 IDLE
       3     3 --- 200 RR       Task    --- Waiting  MQ empty  0000000000000000 
000976 cxd56_pm_task
       4     4   0 100 RR       Task    --- Running            0000000000000000 
002000 spresense_main
   nsh> free
                      total       used       free    largest  nused  nfree
           Umem:    1392840      15744    1377096    1374864     77      3
   nsh> ostest
   stdio_test: write fd=1
   stdio_test: Standard I/O Check: printf
   stdio_test: write fd=2
   ...
   user_main: priority inheritance test
   priority_inheritance: Started
   priority_inheritance: Starting lowpri_thread-1 (of 1) at 1
   priority_inheritance: Set lowpri_thread-1 priority to 1
   priority_inheritance: Waiting...
   lowpri_thread-1: Started
   lowpri_thread-1: initial priority: 1
   lowpri_thread-1: Waiting for the midle pri task to run
       g_middlestate:  0
       g_highstate[0]: 0
       I still have a count on the semaphore
   lowpri_thread-1: Waiting for the midle pri task to run
       g_middlestate:  0
       g_highstate[0]: 0
       I still have a count on the semaphore
   priority_inheritance: Starting medpri_thread at 99
   priority_inheritance: Set medpri_thread priority to 99
   priority_inheritance: Waiting...
   medpri_thread: Started ... I won't let go of the CPU!
   lowpri_thread-1: Sem count: 0, No. highpri thread: 0
   lowpri_thread-1: SUCCESS priority before sem_post: 1
   lowpri_thread-1: SUCCESS final priority: 1
   lowpri_thread-1: Okay... I'm done!
   priority_inheritance: Starting highpri_thread-1 (of 1) at 255
   priority_inheritance: Set highpri_thread-1 priority to 255
   priority_inheritance: Waiting for highpri_thread-1 to complete
   highpri_thread-1: Started
   highpri_thread-1: Calling sem_wait()
   highpri_thread-1: SUCCESS midpri_thread is still running!
   highpri_thread-1: Okay... I'm done!
   priority_inheritance: Waiting for medpri_thread to complete
   medpri_thread: Okay... I'm done!
   priority_inheritance: Waiting for lowpri_thread-1 to complete
   priority_inheritance: Restoration Test:
   priority_inheritance: Task0 initial priority is:200
   priority_inheritance: Task1 initial priority is:210
   priority_inheritance: Waiting for Task-0 to complete
   priority_inheritance: Task2 initial priority is:220
   priority_inheritance: Task0 Started, waiting 0 uS to take count
   priority_inheritance: Task1 Started, waiting 10000 uS to take count
   priority_inheritance: Task2 Started, waiting 20000 uS to take count
   priority_inheritance: Task0 Posted
   priority_inheritance: Task0 priority was:200 is:200
   priority_inheritance: Waiting for Task-1 to complete
   priority_inheritance: Task2 Posted
   priority_inheritance: Task2 priority was:220 is:220
   priority_inheritance: Task1 Posted
   priority_inheritance: Task1 priority was:210 is:210
   priority_inheritance: Waiting for Task-2 to complete
   priority_inheritance: PASSED Priority were correctly restored.
   priority_inheritance: Finished
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena      1540c8   1540c8
   ordblks        11       12
   mxordblk   143ed8   143ed8
   uordblks     8520     a828
   fordblks   14bba8   1498a0
   
   user_main: vfork() test
   vfork_test: Child 94 ran successfully
   
   Final memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena      1540c8   1540c8
   ordblks         4       12
   mxordblk   14b720   143ed8
   uordblks     74e8     c028
   fordblks   14cbe0   1480a0
   user_main: Exiting
   ostest_main: Exiting with status 0
   ```
   


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

Reply via email to