zephyr: Zephyr kernel deadlocks in thread metric benchmark for SMP=2

Describe the bug

When running thread metric benchmarking tests: https://github.com/azure-rtos/threadx/tree/master/utility/benchmarks/thread_metric ported to Zephyr, we observe kernel behavior which looks like an internal synchronization deadlock for two test cases. Attached are zipped code and screen-shots from debug session.

To Reproduce The failing test cases are selected when in tm_api.h one of two #defines is true

#define TM_PREEMPT (1) or #define TM_IRQ_PREEMPT (1)

Our hardware platform is based on Xilinx SOC (ARM Arch64). We replicated the problem with kernel version 3.3.99 at Xilinx ZCU102 evaluation board with ATF boot for two cores (SMP=2).

Expected behavior No deadlock when scheduling task

Impact showstopper for our application

Logs and console output Attached are zipped code and screen-shots from debug session.

Environment (please complete the following information): – west build: building application [1/124] Generating include/generated/version.h – Zephyr version: 3.3.99 - build: e00e895ec275 Windows build

Additional context We replicated the problem with kernel version 3.3.99 at Xilinx ZCU102 evaluation board with ATF boot for two cores (SMP=2).

TM_PE_crash.pdf

zephyr_tm_bug_v1.pdf

tm.zip

@abb-bartekf

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Update: I am working on a better solution than what was originally posted in #59400 to allow thread suspension on SMP.