[PATCH] validation: Check stack of interrupted context

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Sep 21 14:56:38 UTC 2023


Hello Kinsey,

I added a test case for

https://devel.rtems.org/ticket/4955

which started as a sparc-specific bug. The test case should also work on 
aarch64. In uniprocessor configurations, it is fine:

qemu-system-aarch64 -no-reboot -nographic -serial mon:stdio -machine 
xlnx-zcu102 -m 4096 -kernel 
build/aarch64/xilinx_zynqmp_lp64_qemu/testsuites/validation/ts-validation-intr.exe 


*** BEGIN OF TEST TestsuitesValidationIntr ***
*** TEST VERSION: 6.0.0.34e16f56b64a9a0a696775f4ac699780fc518306
*** TEST STATE: EXPECTED_PASS
*** TEST BUILD:
*** TEST TOOLS: 13.2.0 20230727 (RTEMS 6, RSB 
02252b96835f1edc7a582e2309ee2f5b46764d64, Newlib a021448)
A:TestsuitesValidationIntr
S:Platform:RTEMS
S:Compiler:13.2.0 20230727 (RTEMS 6, RSB 
02252b96835f1edc7a582e2309ee2f5b46764d64, Newlib a021448)
S:Version:6.0.0.34e16f56b64a9a0a696775f4ac699780fc518306
S:BSP:xilinx_zynqmp_lp64_qemu
S:BuildLabel:DEFAULT
S:TargetHash:SHA256:huGRj7kHeBWgSJolmeboNSyCgeX2U62J9RiNQ18YPFc=
S:RTEMS_DEBUG:0
S:RTEMS_MULTIPROCESSING:0
S:RTEMS_POSIX_API:0
S:RTEMS_PROFILING:0
S:RTEMS_SMP:0
B:ScoreIsrValIsr
E:ScoreIsrValIsr:N:1:F:0:D:0.000397
B:RtemsIntrReqVectorIsEnabled
E:RtemsIntrReqVectorIsEnabled:N:958:F:0:D:0.001529
B:RtemsIntrReqVectorEnable
E:RtemsIntrReqVectorEnable:N:12834:F:0:D:0.014386
B:RtemsIntrReqVectorDisable
E:RtemsIntrReqVectorDisable:N:12858:F:0:D:0.013536
B:RtemsIntrReqSetAffinity
E:RtemsIntrReqSetAffinity:N:4060:F:0:D:0.002265
B:RtemsIntrReqRaiseOn
E:RtemsIntrReqRaiseOn:N:6754:F:0:D:0.009210
B:RtemsIntrReqRaise
E:RtemsIntrReqRaise:N:6750:F:0:D:0.009304
B:RtemsIntrReqIsPending
E:RtemsIntrReqIsPending:N:5358:F:0:D:0.008721
B:RtemsIntrReqHandlerIterate
E:RtemsIntrReqHandlerIterate:N:31:F:0:D:0.000753
B:RtemsIntrReqGetAttributes
E:RtemsIntrReqGetAttributes:N:552:F:0:D:0.000547
B:RtemsIntrReqGetAffinity
E:RtemsIntrReqGetAffinity:N:1195:F:0:D:0.000923
B:RtemsIntrReqEntryRemove
E:RtemsIntrReqEntryRemove:N:4486:F:0:D:0.006436
B:RtemsIntrReqEntryInstall
E:RtemsIntrReqEntryInstall:N:13528:F:0:D:0.018137
B:RtemsIntrReqClear
E:RtemsIntrReqClear:N:12834:F:0:D:0.011950
B:BspReqInterruptHandlerDispatchUnchecked
E:BspReqInterruptHandlerDispatchUnchecked:N:13:F:0:D:0.000520
Z:TestsuitesValidationIntr:C:15:N:82212:F:0:D:0.103215
Y:ReportHash:SHA256:9MhLl5LJSiL-O5P8y5BXelnhD38UNTvwHZ5QX_X-kTU=

*** END OF TEST TestsuitesValidationIntr ***


[ RTEMS shutdown ]
RTEMS version: 6.0.0.34e16f56b64a9a0a696775f4ac699780fc518306
RTEMS tools: 13.2.0 20230727 (RTEMS 6, RSB 
02252b96835f1edc7a582e2309ee2f5b46764d64, Newlib a021448)
executing thread ID: 0x0a010001
executing thread name: RUN

In SMP configurations, there is a crash:

qemu-system-aarch64 -no-reboot -nographic -serial mon:stdio -machine 
xlnx-zcu102 -m 4096 -kernel 
build/aarch64/xilinx_zynqmp_lp64_qemu_smp/testsuites/validation/ts-validation-intr.exe

Thread 1 hit Breakpoint 1, _Terminate 
(the_source=the_source at entry=INTERNAL_ERROR_CORE, 
the_error=the_error at entry=31) at 
/home/EB/sebastian_h/src/rtems/cpukit/score/src/interr.c:55
55        _User_extensions_Fatal( the_source, the_error );
(gdb) bt
#0  _Terminate (the_source=the_source at entry=INTERNAL_ERROR_CORE, 
the_error=the_error at entry=31) at 
/home/EB/sebastian_h/src/rtems/cpukit/score/src/interr.c:55
#1  0x0000000040027ab4 in _Internal_error 
(core_error=core_error at entry=INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT) 
at /home/EB/sebastian_h/src/rtems/cpukit/score/src/interr.c:63
#2  0x00000000400285d8 in _Thread_Do_dispatch (cpu_self=0x40101980 
<_Per_CPU_Information>, level=960) at 
/home/EB/sebastian_h/src/rtems/cpukit/score/src/threaddispatch.c:290
#3  0x000000004002878c in _Thread_Handler () at 
/home/EB/sebastian_h/src/rtems/cpukit/score/src/threadhandler.c:147
#4  0x00000000400286d0 in ?? ()

I don't know the architecture good enough to debug this test case. It 
would be good if you could have a look at it since this crash could 
indicate a generic bug in the SMP startup.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list