Need help debugging sp16.exe

Richi Dubey richidubey at gmail.com
Thu Oct 8 15:38:02 UTC 2020


Hi,

I have been trying to debug sp16 for the last few days. I am using the new
Strong APA scheduler we worked on during this GSoC. The scheduler fails
only for the following tests:

 sp02.exe
 sp16.exe
 sp30.exe
 sp31.exe
 sp37.exe
 sp42.exe
 spfatal29.exe
 tm24.exe

On executing sp16.exe, I get the following output:

*** BEGIN OF TEST SP 16 ***
*** TEST VERSION: 5.0.0.61ccb9c05dcd695114541960aa6bfc1315f30514-modified
*** TEST STATE: EXPECTED_PASS
*** TEST BUILD: RTEMS_NETWORKING RTEMS_POSIX_API RTEMS_SMP
*** TEST TOOLS: 7.5.0 20191114 (RTEMS 5, RSB 5 (0b7e87143b76), Newlib
fbaa096)
TA1 - rtems_region_ident - rnid => 32010001
TA1 - rtems_region_get_segment - wait on 1000 byte segment from region 2
TA1 - got segment from region 2 - 0x00000040
TA1 - rtems_region_get_segment - wait on 3K segment from region 3
TA1 - got segment from region 3 - 0x00000080
TA1 - rtems_region_get_segment - get 3080 byte segment from region 1 -
NO_WAIT
TA1 - got segment from region 1 - 0x00000040
TA1 - rtems_task_wake_after - yield processor
TA2 - rtems_region_get_segment - wait on 2K segment from region 1
TA1 - rtems_region_return_segment - return segment to region 1 - 0x00000040
TA1 - rtems_region_get_segment - wait 10 seconds for 3K segment from region
1
TA2 - got segment from region 1 - 0x00000040
TA2 - rtems_region_return_segment - return segment to region 1 - 0x00000040
TA2 - rtems_task_set_priority - make self highest priority task
TA2 - rtems_region_get_segment - wait on 3750 byte segment
TA1 - got segment from region 1 - 0x00000040
TA1 - rtems_region_return_segment - return segment to region 2 - 0x00000040
TA2 - got segment from region 2 - 0x00000040
TA2 - rtems_region_return_segment - return segment to region 2 - 0x00000040
TA2 - rtems_task_exit
TA1 - rtems_task_wake_after - yield processor
TA3 - rtems_region_get_segment - wait on 3750 byte segment from region 2
TA3 - got segment from region 2 - 0x00000040
TA3 - rtems_region_get_segment - wait on 2K segment from region 3
TA1 - rtems_task_delete - delete TA3
TA1 - rtems_task_wake_after - yield processor
TA4 - rtems_region_get_segment - wait on 1.5K segment from region 1
TA5 - rtems_region_get_segment - wait on 1.5K segment from region 1
TA1 - rtems_region_return_segment - return segment to region 1 - 0x00000040
TA1 - rtems_task_wake_after - yield processor
TA4 - got and returned 0x00000040
TA5 - got and returned 0x000006c0
TA1 - rtems_region_get_segment - wait 10 seconds for 3K segment from region
1
TA1 - got segment from region 1 - 0x00000040
TA1 - rtems_task_wake_after - yield processor
TA4 - rtems_region_get_segment - wait on 3K segment from region 1
TA5 - rtems_region_get_segment - wait on 3K segment from region 1
TA1 - rtems_task_delete - delete TA4
TA1 - rtems_region_return_segment - return segment to region 1 - 0x00000040
TA1 - rtems_task_wake_after - yield processor
TA5 - got segment from region 1 - 0x00000040
TA5 - rtems_region_return_segment - return segment to region 1 - 0x00000040
TA5 - rtems_task_exit

and it doesn't progress further from here. It gets stuck in some kind of
loop. While debugging with gdb, I realized the loop is:

Clock_isr (arg=0x0) at
/home/richi/quick-start/src/rtems/bsps/arm/include/../../shared/dev/clock/clockimpl.h:155
155          _Thread_Heir == _Thread_Executing && _Thread_Executing->is_idle
(gdb)
0x001042fa 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x001042fc 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x001042fe 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)

0x00104302 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x00104304 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x00104306 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x0010430a 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
154        while (
(gdb)
0x0010430e 154        while (
(gdb)
155          _Thread_Heir == _Thread_Executing && _Thread_Executing->is_idle
(gdb)
0x00104314 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x00104316 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x00104318 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x0010431c 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x0010431e 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x00104322 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x00104324 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
159          _Timecounter_Acquire(&lock_context);
(gdb)
0x001042d2 159          _Timecounter_Acquire(&lock_context);
(gdb)
0x001042d4 159          _Timecounter_Acquire(&lock_context);
(gdb)
0x001042d8 159          _Timecounter_Acquire(&lock_context);
(gdb)
0x001042dc 159          _Timecounter_Acquire(&lock_context);
(gdb)
162            (*tc->tc_get_timecount)(tc),
(gdb)
0x001042e2 162            (*tc->tc_get_timecount)(tc),
(gdb)
160          _Timecounter_Tick_simple(
(gdb)
0x001042e6 160          _Timecounter_Tick_simple(
(gdb)
0x001042e8 160          _Timecounter_Tick_simple(
(gdb)
0x001042ea 160          _Timecounter_Tick_simple(
(gdb)
0x001042ee 160          _Timecounter_Tick_simple(
(gdb)
0x001042f0 160          _Timecounter_Tick_simple(
(gdb)
0x001042f2 160          _Timecounter_Tick_simple(
(gdb)

155          _Thread_Heir == _Thread_Executing && _Thread_Executing->is_idle
(gdb)

0x001042fa 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x001042fc 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x001042fe 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)

0x00104302 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x00104304 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x00104306 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x0010430a 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
154        while (
(gdb)
0x0010430e 154        while (
(gdb)
155          _Thread_Heir == _Thread_Executing && _Thread_Executing->is_idle
(gdb)
0x00104314 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x00104316 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x00104318 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x0010431c 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x0010431e 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x00104322 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
0x00104324 155          _Thread_Heir == _Thread_Executing &&
_Thread_Executing->is_idle
(gdb)
159          _Timecounter_Acquire(&lock_context);
(gdb)
0x001042d2 159          _Timecounter_Acquire(&lock_context);
(gdb)
0x001042d4 159          _Timecounter_Acquire(&lock_context);
(gdb)
0x001042d8 159          _Timecounter_Acquire(&lock_context);
(gdb)
0x001042dc 159          _Timecounter_Acquire(&lock_context);
(gdb)

162            (*tc->tc_get_timecount)(tc),
(gdb)
0x001042e2 162            (*tc->tc_get_timecount)(tc),


and so on...

I cannot figure out what is wrong. Like Dr. Sherill suggested in a
different .exe debug earlier, I set breakpoints and checked values of
variables passed to the function and it all looks okay. I am quite sure
this is because of the scheduler.

How do I progress further? Please let me know.

Thanks,
Richi.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201008/f1a85862/attachment.html>


More information about the devel mailing list