ipipe-4.19 on arm64: Stack overflow when compiled with gcc 12
Hi all,
when trying to find a platform/image that is able to build and test all of our Xenomai branches and kernel combinations for driving the CI infrastructure I hit the following problem:
When compiling ipipe-4.19 using gcc 12 the arm64 testboard (hikey) crashes with a kernel panic due to a stack overflow.
The logs are available here:
(Searching for "Kernel panic" might help)
- https://lava.xenomai.org/scheduler/job/5069 (stable/v3.1.x)
- https://lava.xenomai.org/scheduler/job/5072 (stable/v3.2.x)
Is that something that should work / should be supported or should we define supported compiler versions (per Xenomai/Kernel combination) as well? I hoped I could avoid adding even more complexity into the CI build/test matrix.
Waiting for your comments...
Best regards,
Florian
Quoted 15 lines · Florian
Hi all,
when trying to find a platform/image that is able to build and test all of our Xenomai branches and kernel combinations for driving the CI infrastructure I hit the following problem:
When compiling ipipe-4.19 using gcc 12 the arm64 testboard (hikey) crashes with a kernel panic due to a stack overflow.
The logs are available here:
(Searching for "Kernel panic" might help)- https://lava.xenomai.org/scheduler/job/5069 (stable/v3.1.x)
- https://lava.xenomai.org/scheduler/job/5072 (stable/v3.2.x)
Quoted 7 lines
Is that something that should work / should be supported or should we define supported compiler versions (per Xenomai/Kernel combination) as well? I hoped I could avoid adding even more complexity into the CI build/test matrix.
Waiting for your comments...
Already checked if something happened in 4.19 or some slightly newer LTS kernel related to "gcc 12" that we just did not pick up with the I-pipe branches so far?
Jan
Quoted 21 lines · Jan Kiszka
Quoted 20 lines · Florian
Hi all,
when trying to find a platform/image that is able to build and test all of our Xenomai branches and kernel combinations for driving the CI infrastructure I hit the following problem:
When compiling ipipe-4.19 using gcc 12 the arm64 testboard (hikey) crashes with a kernel panic due to a stack overflow.
The logs are available here:
(Searching for "Kernel panic" might help)- https://lava.xenomai.org/scheduler/job/5069 (stable/v3.1.x)
- https://lava.xenomai.org/scheduler/job/5072 (stable/v3.2.x)Is that something that should work / should be supported or should we define supported compiler versions (per Xenomai/Kernel combination) as well? I hoped I could avoid adding even more complexity into the CI build/test matrix.
Quoted 6 lines
Quoted 2 lines
Waiting for your comments...
Already checked if something happened in 4.19 or some slightly newer LTS kernel related to "gcc 12" that we just did not pick up with the I-pipe branches so far?
I did a very short investigation. Most of gcc 12 related stuff was silencing new warnings. Especially in the area of array boundary checks.
The gcc changelog [1] mentions a new feature called ShadowCallStack which can be used on AArch64 (the only arch the problem seems reproducible) only. Main user of that new feature is the Linux kernel. It seems Linux >= 5.8 might enable that feature if available. As older ipipe kernels are affected as well, I guess it's not the source of our problem.
Have you checked the logs mentioned above? Seems we have a loop around handle_arch_irq_pipelined.
Florian
[1] https://gcc.gnu.org/gcc-12/changes.html
Quoted 2 lines
Jan