[PATCH] validation: Check stack of interrupted context

Kinsey Moore kinsey.moore at oarcorp.com
Thu Sep 21 14:59:43 UTC 2023


On Thu, Sep 21, 2023 at 9:56 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> 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.
>

Ok, thanks! I'll take a look and see what I can find.

Kinsey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20230921/3a42828a/attachment.htm>


More information about the devel mailing list