Skip to contentSkip to conversation

Debugging reboot freeze

DISCUSSION Aaron Marcher 2 participants 5 messages Sep 25, 2020 – Sep 28, 2020

lore
Share & tools
lore
#0 lore raw

Hi,

we are encountering reboot freezes on the current 5.4.66-rt38 kernel with PREEMPT_RT enabled on i.mx8mm hardware. Unfortunately, debugging is difficult in this situation as the only related output we get during reboot (via serial console) is:

Rebooting...
Segmentation fault

However, the second line is not shown on every reboot; the freeze happens everytime.

We already tried various kernel command line options (print-fatal-signals=1 oops=panic), earlyprintk/earlycon and a lot of debug printk's in the kernel source.
However it seems that there is no output after kernel_restart_prepare(cmd); in kernel/reboot.c.

When using the same kernel version without PREEMPT_RT, the issue does not occur.

Do you have any hints for further debugging?
Thank you very much in advance.

Regards,
Aaron Marcher

#1 lore raw

Aaron,

Quoted 6 lines

Subject: Debugging reboot freeze

Hi,

we are encountering reboot freezes on the current 5.4.66-rt38 kernel with PREEMPT_RT enabled on i.mx8mm hardware.

Where do you get the kernel source code and which version? NXP release or Linux kernel upstream?

Also ATF/U-Boot version?

Quoted 5 lines

Unfortunately, debugging is difficult in this situation as the only related output we get during reboot (via serial console) is:

Rebooting...
Segmentation fault

Do you have a debugger to see where it hangs?

Quoted 10 lines

However, the second line is not shown on every reboot; the freeze happens everytime.

We already tried various kernel command line options (print-fatal-signals=1 oops=panic), earlyprintk/earlycon and a lot of debug printk's in the kernel source.
However it seems that there is no output after kernel_restart_prepare(cmd); in kernel/reboot.c.

Quoted 4 lines

When using the same kernel version without PREEMPT_RT, the issue does not occur.

Do you have any hints for further debugging?

If you point me your version, and source, I could give a try in my side.

Regards,
Peng.

Quoted 4 lines

Thank you very much in advance.

Regards,
Aaron Marcher

#2 lore raw

Hi Peng,

Quoted 4 lines

Where do you get the kernel source code and which version? NXP release or Linux kernel upstream?

Also ATF/U-Boot version?

- Kernel: Mainline (5.4.66-rt37) + PREEMPT_RT + your power domain patches
- U-Boot: NXP (2020.07)
- ATF: NXP (v2.0)
https://source.codeaurora.org/external/imx/imx-atf/

Quoted 1 line

Do you have a debugger to see where it hangs?

Unfortunately not.

Quoted 1 line

If you point me your version, and source, I could give a try in my side.

Thanks, let me know if you need anything else.

Regards,
Aaron

#3 lore raw
Quoted 10 lines

Subject: Re: Debugging reboot freeze

Hi Peng,

Quoted 4 lines

Where do you get the kernel source code and which version? NXP release or Linux kernel upstream?

Also ATF/U-Boot version?

- Kernel: Mainline (5.4.66-rt37) + PREEMPT_RT + your power domain patches

you mean upstream stable branch 5.4.66 + RT37 patchset? Where is the power domain patches? I not did this part.

Do you have a github branch for this? And what kernel config are you using?

Quoted 1 line

- U-Boot: NXP (2020.07)

NXP official release is 2020.04, not 2020.07, could you share the link?

Quoted 1 line

- ATF: NXP (v2.0)

Which specific release branch?

Thanks,
Peng.

Quoted 18 lines

https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsource
.codeaurora.org%2Fexternal%2Fimx%2Fimx-atf%2F&data=02%7C01%7 Cpeng.fan%40nxp.com%7C18457f343ede453e0b3908d86381b506%7C686ea 1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C637368756031689583& sdata=IZtLBW6a5e87HRspOW5utxsTTehv6E0ZpnRXQDxhOKU%3D&rese rved=0

Quoted 1 line

Do you have a debugger to see where it hangs?

Unfortunately not.

Quoted 1 line

If you point me your version, and source, I could give a try in my side.

Thanks, let me know if you need anything else.

Regards,
Aaron

#4 lore raw

Hi Peng,

Quoted 1 line

you mean upstream stable branch 5.4.66 + RT37 patchset?

Yes.

Quoted 1 line

Where is the power domain patches? I not did this part.

I confused names, sorry. You can find them here:
https://patchwork.kernel.org/cover/10904511/

Quoted 1 line

Do you have a github branch for this? And what kernel config are you using?

Unfortunately not as we got the sources from the vendor directly. We are using an arm64 defconfig with everything imx8-related enabled.

Quoted 1 line

NXP official release is 2020.04, not 2020.07, could you share the link?

Same here, unfortunately we cannot share a link to the sources.

Quoted 1 line

Which specific release branch?

rel_imx_5.4.3_2.0.0-0-gf1a195b5c-dirty

Does the issue happen for you with these versions?

Thanks
Aaron