Ivy Zhuang created an issue: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5517



## Summary

When running the smpmrsp01 test, it returns fatal code 30 
(INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL) on the 
`test_mrsp_deadlock_error( ctx )` function. The BSPs that I saw this bug on are 
aarch64/zynqmp_qemu and sparc/leon3, from RTEMS 7 and RTEMS Tools 15.2.0.

Based on the test information, the deadlock error test function is expected to 
pass, but some debugging has led to me to find that this error is raised 
because the thread_dispatch_disable_level of the main task is 3 during 
`rtems_task_delete` on line 962 when it should be 1. The 
thread_dispatch_disable_level is checked in `_Thread_Dispatch_direct()` which 
then returns the error.

I added some print statements to the test to see the 
thread_dispatch_disable_level at different points and this is what I got:

```
thread_dispatch_disable_level before rtems_task_delete: 0

thread_dispatch_disable_level on fatal error: 3
```

Right now, I'm unsure as to what would be causing the 
thread_dispatch_disable_level to change to 3 unexpectedly.

## Steps to reproduce

I built both BSPs with these configurations:

```
BUILD_TESTS = True
BUILD_SAMPLES = True
RTEMS_DEBUG = True
RTEMS_SMP = True
```

And then ran smpmrsp01.exe using rtems-run:

`rtems-run --rtems-bsp=zynqmp_qemu /path/to/testsuite/smptest/smpmrsp01.exe`

and

`rtems-run --rtems-bsp=leon3-sis /path/to/testsuite/smptest/smpmrsp01.exe`

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5517
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to