Auto Reboot After Kernel Panic on S32G3 Board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Auto Reboot After Kernel Panic on S32G3 Board

1,584 Views
yashasdu
Contributor I


Dear NXP Support Team,

I am currently working on configuring my S32G3 board to automatically restart after a kernel panic. However, despite making the necessary changes in the sysctl.conf file and triggering a reboot, the board is not performing the automatic restart as expected. It shows the message "Rebooting in 10 seconds.." but does not actually reboot.
Here are the steps I have taken so far:
I added the following lines to the sysctl.conf file:


kernel.panic = 10
kernel.panic_on_oops = 1

I then applied the changes using the following command:

root@s32g399acgm:~# sysctl -p
net.ipv4.tcp_syncookies = 1
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
kernel.panic_on_oops = 1
kernel.panic = 10

I triggered a kernel panic using the following command:"echo c > /proc/sysrq-trigger"
The kernel panic was successfully triggered, as indicated by the messages in the console:

[ 6108.154229] sysrq: Trigger a crash
[ 6108.157221] Kernel panic - not syncing: sysrq triggered crash
[ 6108.162944] SMP: stopping secondary CPUs
[ 6108.166858] Kernel Offset: disabled
[ 6108.170322] CPU features: 0x1,00000008,00020000,1000420b
[ 6108.175618] Memory Limit: none
[ 6108.178658] Rebooting in 10 seconds..

However, the board did not reboot automatically.

I have reviewed the documentation and community forums but could not find a solution that works for my specific issue. I would appreciate any guidance or suggestions you can provide to help me achieve the automatic restart after a kernel panic on the S32G3 board.
Thank you for your assistance.

Best regards,
Yashas D U

0 Kudos
Reply
8 Replies

1,407 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @yashasdu 

Sorry for the late response.

Since I cannot reproduce the issue from my side, after recent days investigation, a few suggestions provided for your further debugging on the custom board.

1. Comparing with legacy reboot and panic reboot, there are not much code differences from kernel perspective, the main difference is that no do_kernel_restart_prepare() is called via the panic reboot flow.

2. While the execution flow left the kernel and switched to the TFA, the actual operation for both legacy boot and panic boot is the "destructive reset", there are no differences of the two operation from the low level.

3. Not sure if there are completely no issues of your legacy reboot tests,  further checking your reset schematic may also be a option for further debugging on the issue.

I feel sorry that I am not able to provide directly debugging support on the issue since it cannot be reproduced with RDB3, apologize for your inconvenience.

 

BR

Chenyin

 

0 Kudos
Reply

1,510 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @yashasdu 

Thanks for your confirmation.

Sorry that I cannot reproduce it on my RDB3 since it only exists on custom board, may I know if legacy reboot operation could be performed correctly on your custom board?

 

BR

Chenyin

0 Kudos
Reply

1,508 Views
yashasdu
Contributor I
Hi @chenyin_h
yes, legacy reboot works in the custom board
0 Kudos
Reply

1,543 Views
yashasdu
Contributor I

Hi @chenyin_h , sorry for miscommunication, i am actually using a custom s32g3 board with bsp 42 and i am facing this issue, the auto reboot is working in the rdb3

0 Kudos
Reply

1,547 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @yashasdu 

Thanks for you reply.

Would you mind also sharing us the BSP version used?  Any modifications made on the kernel source/configuration?

 

BR

Chenyin

0 Kudos
Reply

1,552 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @yashasdu 

Thanks for your post.

May I know which version BSP you are working with? A RDB3/EVB3 or custom board is used during the test?

 

BR

Chenyin

0 Kudos
Reply

1,550 Views
yashasdu
Contributor I
Hello, @chenyin_h
i am using an rdb3 board
0 Kudos
Reply

1,545 Views
yashasdu
Contributor I
i am using BSP 42, and i have configured "CONFIG_PANIC_TIMEOUT=10", "CONFIG_MAGIC_SYSRQ=Y"
0 Kudos
Reply