deadlock in pthread implementation on SMP platforms #36652
Labels
area: POSIX
POSIX API Library
area: SMP
Symmetric multiprocessing
bug
The issue is a bug, or the PR is fixing a bug
priority: high
High impact/importance bug
Milestone
I've bumped into deadlock with pthread when
pthread_join
never exit even after thread we wait finished.Initially I've found with issue on HSDK board (ARC HS 4 cores) with real payload application, but I was able to reproduce it with simple test case on 4 cores nSIM ARC HS simulation board.
Here is test case - we never return from second
pthread_join
in level_2_thread. When we check CPUs - all the cores are inarch_cpu_idle
.I can reproduce this issue only on 4 cores configuration - for some reason the test works fine on 2 cores configuration.
NOTE: to reproduce it on other platform you probably need to play with k_busy_wait value.
NOTE: to reproduce it on 4 cores nsim you need to set
instrs_per_pass=10
instead ofinstrs_per_pass=512
in boards/arc/nsim/support/mdb_hs_smp.argsI'm currently debugging this issue.
The text was updated successfully, but these errors were encountered: