<div dir="ltr">Hi,<br><div><br></div><div>Can someone please help me figure out why I am getting the _ARMV4_Exception_data_abort_default? </div><div><br></div><div>I have attached the gdb script (Provided by Mr. Huber) that I used with this email. I have also printed the commands I have used to run gdb and qemu.</div><div><br></div><div>I have provided my view on this exception and the link to PR with my changes at the end.  </div><div><br></div><div>qemu executed with the command:</div><div>--------------------------------------------------------------------------------------------------------------------------<br></div><div> ./qemu-system-arm -net none -nographic -M realview-pbx-a9 -m 256M -kernel ~/quick-start/build/b3-realview/arm-rtems5/c/realview_pbx_a9_qemu/testsuites/smptests/smpstrongapa01.exe -smp 3 -S -s<br></div><div><br></div><div>--------------------------------------------------------------------------------------------------------------------------</div><div><br></div><div>GDB commands used:</div><div>--------------------------------------------------------------------------------------------------------------------------<br></div><div><br></div><div> ~/quick-start/rtems/5/bin$ ./arm-rtems5-gdb --command=arm.gdb ~/quick-start/build/b3-realview/arm-rtems5/c/realview_pbx_a9_qemu/testsuites/smptests/smpstrongapa01.exe<br></div><div></div><div>.</div><div>.</div><div>.</div><div>Loading section .fini_array, size 0x4 lma 0x121184<br>Loading section .rtemsroset, size 0x74 lma 0x121188<br>Loading section .data, size 0x530 lma 0x200000<br>Start address 0x00100040, load size 136967<br>Transfer rate: 26751 KB/sec, 1778 bytes/write.<br>(gdb) continue<br>Continuing.<br><br>Thread 1 hit Breakpoint 2, _ARMV4_Exception_data_abort_default () at /home/richi/quick-start/src/rtems/c/src/../../cpukit/score/cpu/arm/armv4-exception-default.S:70<br>70              sub     sp, #MORE_CONTEXT_SIZE<br>(gdb) bt<br>#0  _ARMV4_Exception_data_abort_default () at /home/richi/quick-start/src/rtems/c/src/../../cpukit/score/cpu/arm/armv4-exception-default.S:70<br>#1  0x00118c64 in _Scheduler_strong_APA_Get_lowest_scheduled (context=0x200620 <_Configuration_Scheduler_strong_APA_dflt>, filter_base=0x201910 <_RTEMS_tasks_Objects+600>) at /home/richi/quick-start/src/rtems/c/src/../../cpukit/score/src/schedulerstrongapa.c:318<br>Backtrace stopped: previous frame inner to this frame (corrupt stack?)<br>(gdb) reset<br>Loading section .start, size 0x8e0 lma 0x100000<br>Loading section .text, size 0x1f00c lma 0x100900<br>Loading section .init, size 0xc lma 0x11f90c<br>Loading section .fini, size 0xc lma 0x11f918<br>Loading section .rodata, size 0x184b lma 0x11f928<br>Loading section .ARM.exidx, size 0x8 lma 0x121174<br>Loading section .eh_frame, size 0x4 lma 0x12117c<br>Loading section .init_array, size 0x4 lma 0x121180<br>Loading section .fini_array, size 0x4 lma 0x121184<br>Loading section .rtemsroset, size 0x74 lma 0x121188<br>Loading section .data, size 0x530 lma 0x200000<br>Start address 0x00100040, load size 136967<br>Transfer rate: 8359 KB/sec, 1778 bytes/write.<br>(gdb) b _Scheduler_strong_APA_Get_lowest_scheduled<br>Breakpoint 7 at 0x118bee: file /home/richi/quick-start/src/rtems/c/src/../../cpukit/score/src/schedulerstrongapa.c, line 287.<br>(gdb) continue<br>Continuing.<br><br>Thread 1 hit Breakpoint 7, _Scheduler_strong_APA_Get_lowest_scheduled (context=0x200620 <_Configuration_Scheduler_strong_APA_dflt>, filter_base=0x201910 <_RTEMS_tasks_Objects+600>) at /home/richi/quick-start/src/rtems/c/src/../../cpukit/score/src/schedulerstrongapa.c:287<br>287     front = 0;<br>(gdb) ni<br>0x00118bf0     287       front = 0;<br>(gdb) <br>289        rear = -1;  <br>(gdb) <br>0x00118bf6    289       rear = -1;  <br>(gdb) <br>291     self = _Scheduler_strong_APA_Get_self( context );<br>(gdb) <br>0x00118bfa        291       self = _Scheduler_strong_APA_Get_self( context );<br>(gdb) <br>0x00118bfe        291       self = _Scheduler_strong_APA_Get_self( context );<br>(gdb) <br>293         visited = self->visited->visited;<br>(gdb) <br>0x00118c02  293       visited = self->visited->visited;<br>(gdb) <br>0x00118c04  293       visited = self->visited->visited;<br>(gdb) <br>294   queue = self->queue->Cpu;<br>(gdb) <br>0x00118c08  294       queue = self->queue->Cpu;<br>(gdb) <br>0x00118c0a  294       queue = self->queue->Cpu;<br>(gdb) <br>295   caller = self->caller->caller;<br>(gdb) <br>0x00118c0e     295       caller = self->caller->caller;<br>(gdb) <br>0x00118c10     295       caller = self->caller->caller;<br>(gdb) <br>297      filter_priority = _Scheduler_Node_get_priority( filter_base );<br>(gdb) <br>0x00118c14   297       filter_priority = _Scheduler_Node_get_priority( filter_base );<br>(gdb) <br>0x00118c18   297       filter_priority = _Scheduler_Node_get_priority( filter_base );<br>(gdb) <br>298    filter_priority = SCHEDULER_PRIORITY_PURIFY( filter_priority );   <br>(gdb) <br>0x00118c20      298       filter_priority = SCHEDULER_PRIORITY_PURIFY( filter_priority );   <br>(gdb) <br>0x00118c24      298       filter_priority = SCHEDULER_PRIORITY_PURIFY( filter_priority );   <br>(gdb) <br>0x00118c28      298       filter_priority = SCHEDULER_PRIORITY_PURIFY( filter_priority );   <br>(gdb) <br>0x00118c2c      298       filter_priority = SCHEDULER_PRIORITY_PURIFY( filter_priority );   <br>(gdb) <br>0x00118c30      298       filter_priority = SCHEDULER_PRIORITY_PURIFY( filter_priority );   <br>(gdb) <br>300       ret = NULL; //To remove compiler warning. <br>(gdb) <br>0x00118c36       300       ret = NULL; //To remove compiler warning. <br>(gdb) <br>304        filter_node = _Scheduler_strong_APA_Node_downcast( filter_base );<br>(gdb) <br>0x00118c3a        304       filter_node = _Scheduler_strong_APA_Node_downcast( filter_base );<br>(gdb) <br>0x00118c3e        304       filter_node = _Scheduler_strong_APA_Node_downcast( filter_base );<br>(gdb) <br>306         max_priority_num = 0;//Max (Lowest) priority encountered so far.<br>(gdb) <br>0x00118c44 306       max_priority_num = 0;//Max (Lowest) priority encountered so far.<br>(gdb) <br>312          cpu_max = _SMP_Get_processor_maximum();<br>(gdb) <br>0x00118c4c  312       cpu_max = _SMP_Get_processor_maximum();<br>(gdb) <br>314   for ( cpu_index = 0 ; cpu_index < cpu_max ; ++cpu_index ) { <br>(gdb) <br>0x00118c50  314       for ( cpu_index = 0 ; cpu_index < cpu_max ; ++cpu_index ) { <br>(gdb) <br>0x00118c52  314       for ( cpu_index = 0 ; cpu_index < cpu_max ; ++cpu_index ) { <br>(gdb) <br>0x00118cb2  314       for ( cpu_index = 0 ; cpu_index < cpu_max ; ++cpu_index ) { <br>(gdb) <br>0x00118cb4  314       for ( cpu_index = 0 ; cpu_index < cpu_max ; ++cpu_index ) { <br>(gdb) <br>0x00118cb6  314       for ( cpu_index = 0 ; cpu_index < cpu_max ; ++cpu_index ) { <br>(gdb) <br>0x00118cb8  314       for ( cpu_index = 0 ; cpu_index < cpu_max ; ++cpu_index ) { <br>(gdb) <br>315     visited[ cpu_index ] = false;<br>(gdb) <br>0x00118c56 315         visited[ cpu_index ] = false;<br>(gdb) <br>0x00118c58 315         visited[ cpu_index ] = false;<br>(gdb) <br>0x00118c5a 315         visited[ cpu_index ] = false;<br>(gdb) <br>0x00118c5c 315         visited[ cpu_index ] = false;<br>(gdb) <br><br>Thread 1 hit Breakpoint 2, _ARMV4_Exception_data_abort_default () at /home/richi/quick-start/src/rtems/c/src/../../cpukit/score/cpu/arm/armv4-exception-default.S:70<br>70         sub     sp, #MORE_CONTEXT_SIZE<br>(gdb) <br>71              stmdb   sp!, {r0-r12}<br>(gdb) <br></div><div><div>--------------------------------------------------------------------------------------------------------------------------<br></div><div></div></div><div><div><br></div><div>The exception occurs just after the visited array gets (or tries to get) initialized.</div><div>I believe this could be because :</div><div><br></div><div>1) I might not have defined the variable properly <a href="https://github.com/richidubey/rtems/pull/7/files#diff-9a1c6e240a276a856e99c45d87f1a02f">here</a> between lines 260 to 262 . I do not understand how this configuration definition works in this case, i.e. for SCHEDULER_STRONG_APA_CONTEXT_NAME( name  ) or for #define RTEMS_SCHEDULER_STRONG_APA( name, prio_count ). I would appreciate it if someone could explain to me how this works.</div><div><br></div><div>2) Of <a href="https://github.com/richidubey/rtems/pull/4/files#r461843786">this</a> comment by Dr. Bloom. which I still don't know how to address. Someone, please help me out with this as well.</div><div><br></div><div>Please find the Pull Request at: <a href="https://github.com/richidubey/rtems/pull/7">https://github.com/richidubey/rtems/pull/7</a> </div><div><br></div><div>Thanks,</div><div>Richi.</div><div></div></div></div>