You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/05/25 02:14:13 UTC

[GitHub] [incubator-nuttx-apps] masayuki2009 commented on pull request #1168: ostest:priority_inheritance Added priority restoration test

masayuki2009 commented on PR #1168:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1168#issuecomment-1136638837

   I noticed that `qemu-intel64:ostest` causes a deadlock.
   
   ```
   SeaBIOS (version rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org)
   
   
   iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+0FF907F0+0FEF07F0 CA00
                                                                                  
   
   
   Booting from Hard Disk...
   Boot failed: could not read the boot disk
   
   Booting from Floppy...
   Boot failed: could not read the boot disk
   
   Booting from DVD/CD...
   stdio_test: write fd=1
   stdio_test: Standard I/O Check: printf
   stdio_test: write fd=2
   ostest_main: putenv(Variable1=BadValue3)
   ostest_main: setenv(Variable1, GoodValue1, TRUE)
   ostest_main: setenv(Variable2, BadValue1, FALSE)
   ostest_main: setenv(Variable2, GoodValue2, TRUE)
   ostest_main: setenv(Variable3, Variable3, FALSE)
   ostest_main: setenv(Variable3, Variable3, FALSE)
   show_variable: Variable=Variable1 has value=GoodValue1
   show_variable: Variable=Variable2 has value=GoodValue2
   show_variable: Variable=Variable3 has value=GoodValue3
   ostest_main: Started user_main at PID=2
   
   ...
   
   user_main: priority inheritance test
   priority_inheritance: Started
   priority_inheritance: Starting lowpri_thread-1 (of 3) at 1
   priority_inheritance: Set lowpri_thread-1 priority to 1
   priority_inheritance: Starting lowpri_thread-2 (of 3) at 1
   priority_inheritance: Set lowpri_thread-2 priority to 1
   priority_inheritance: Starting lowpri_thread-3 (of 3) at 1
   priority_inheritance: Set lowpri_thread-3 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
       g_highstate[1]: 0
       g_highstate[2]: 0
       I still have a count on the semaphore
   lowpri_thread-2: Started
   lowpri_thread-2: initial priority: 1
   lowpri_thread-2: Waiting for the midle pri task to run
       g_middlestate:  0
       g_highstate[0]: 0
       g_highstate[1]: 0
       g_highstate[2]: 0
       I still have a count on the semaphore
   lowpri_thread-3: Started
   lowpri_thread-3: initial priority: 1
   lowpri_thread-3: Waiting for the midle pri task to run
       g_middlestate:  0
       g_highstate[0]: 0
       g_highstate[1]: 0
       g_highstate[2]: 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
       g_highstate[1]: 0
       g_highstate[2]: 0
       I still have a count on the semaphore
   lowpri_thread-2: Waiting for the midle pri task to run
       g_middlestate:  0
       g_highstate[0]: 0
       g_highstate[1]: 0
       g_highstate[2]: 0
       I still have a count on the semaphore
   lowpri_thread-3: Waiting for the midle pri task to run
       g_middlestate:  0
       g_highstate[0]: 0
       g_highstate[1]: 0
       g_highstate[2]: 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!
   priority_inheritance: Starting highpri_thread-1 (of 3) at 255
   priority_inheritance: Set highpri_thread-1 priority to 255
   highpri_thread-1: Started
   priority_inheritance: Starting highpri_thread-2 (of 3) at 255
   priority_inheritance: Set highpri_thread-2 priority to 254
   highpri_thread-2: Started
   priority_inheritance: Starting highpri_thread-3 (of 3) at 255
   priority_inheritance: Set highpri_thread-3 priority to 253
   highpri_thread-3: Started
   priority_inheritance: Waiting for highpri_thread-1 to complete
   highpri_thread-1: Calling sem_wait()
   lowpri_thread-3: Sem count: -1, No. highpri thread: 1
   highpri_thread-1: SUCCESS midpri_thread is still running!
   highpri_thread-1: Okay... I'm done!
   priority_inheritance: Waiting for highpri_thread-2 to complete
   highpri_thread-2: Calling sem_wait()
   highpri_thread-2: SUCCESS midpri_thread is still running!
   highpri_thread-2: Okay... I'm done!
   priority_inheritance: Waiting for highpri_thread-3 to complete
   highpri_thread-3: Calling sem_wait()
   highpri_thread-3: SUCCESS midpri_thread is still running!
   highpri_thread-3: 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
   lowpri_thread-2: Sem count: 1, No. highpri thread: 0
   lowpri_thread-2: SUCCESS the middle priority task has already exitted!
                  g_middlestate:  3 sem count=1
                  g_highstate[0]: 3
                  g_highstate[1]: 3
                  g_highstate[2]: 3
   lowpri_thread-2: SUCCESS priority before sem_post: 1
   lowpri_thread-2: SUCCESS final priority: 1
   lowpri_thread-2: Okay... I'm done!
   lowpri_thread-1: Sem count: 2, No. highpri thread: 0
   lowpri_thread-1: SUCCESS the middle priority task has already exitted!
                  g_middlestate:  3 sem count=2
                  g_highstate[0]: 3
                  g_highstate[1]: 3
                  g_highstate[2]: 3
   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: Waiting for lowpri_thread-2 to complete
   priority_inheritance: Waiting for lowpri_thread-3 to complete
   lowpri_thread-3: SUCCESS priority before sem_post: 255
   lowpri_thread-3: SUCCESS final priority: 1
   lowpri_thread-3: Okay... I'm done!
   priority_inheritance: Restoration Test:
   
   ```


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org