Pi 400 WARNs when shutting down
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c, linux
- Domain
- embedded-iot, operating-systems
Research direction
Reproduce shutdown on the Raspberry Pi 400 with the UART enabled, then trace the call chain from gpio_poweroff_do_poweroff through rpi_exp_gpio_dir_out and rpi_firmware_property. Check the related kernel power-off and GPIO paths first; done means shutdown still powers off normally without emitting the RCU warning.
Written by the indexing model from the issue text.
Description
Describe the bug
With a serial cable attached reveals that the Pi 400 kernel is emitting a WARN message when shutting down:
[ 57.499952] ------------[ cut here ]------------
[ 57.504630] Voluntary context switch within RCU read-side critical section!
[ 57.504646] WARNING: CPU: 0 PID: 1 at kernel/rcu/tree_plugin.h:320 rcu_note_context_switch+0x4b4/0x5ac
[ 57.521154] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash aes_arm64 aes_generic algif_skcipher af_alg bnep binfmt_misc brcmfmac brcmutil hci_uart btbcm bluetooth cfg80211 rpivid_hevc(C) bcm2835_codec(C) v4l2_mem2mem bcm2835_isp(C) bcm2835_v4l2(C) ecdh_generic ecc bcm2835_mmal_vchiq(C) videobuf2_dma_contig videobuf2_vmalloc videobuf2_memops libaes raspberrypi_hwmon videobuf2_v4l2 rfkill videobuf2_common videodev raspberrypi_gpiomem vc_sm_cma(C) snd_bcm2835(C) mc nvmem_rmem uio_pdrv_genirq uio i2c_dev fuse dm_mod ip_tables x_tables ipv6 vc4 v3d gpu_sched drm_shmem_helper snd_soc_hdmi_codec drm_display_helper cec drm_dma_helper i2c_brcmstb drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm drm_panel_orientation_quirks snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd backlight
[ 57.597444] CPU: 0 PID: 1 Comm: systemd-shutdow Tainted: G C 6.1.0-rpi4-rpi-v8 #1 Debian 1:6.1.54-1+rpt2
[ 57.608559] Hardware name: Raspberry Pi 400 Rev 1.0 (DT)
[ 57.613941] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 57.620999] pc : rcu_note_context_switch+0x4b4/0x5ac
[ 57.626031] lr : rcu_note_context_switch+0x4b4/0x5ac
[ 57.631064] sp : ffffffc00802b7d0
[ 57.634418] x29: ffffffc00802b7d0 x28: ffffff80401e0000 x27: ffffff80409decc0
[ 57.641656] x26: 0000000000000000 x25: ffffff80401e0000 x24: ffffff80401e0000
[ 57.648895] x23: 0000000000000000 x22: ffffffd845a68d28 x21: ffffff80401e0000
[ 57.656132] x20: ffffffd845557f40 x19: ffffff80fb782f40 x18: 0000000000000006
[ 57.663370] x17: 0000000000000000 x16: ffffff80fb7d92c0 x15: ffffffc00802b230
[ 57.670607] x14: 0000000000000000 x13: 216e6f6974636573 x12: 206c616369746972
[ 57.677844] x11: 6320656469732d64 x10: ffffffd8458e77e8 x9 : ffffffd8444fb258
[ 57.685080] x8 : 00000000ffffefff x7 : ffffffd8458e4800 x6 : 00000000000001ff
[ 57.692319] x5 : 000000000000bff4 x4 : 40000000fffff1ff x3 : 0000000000000000
[ 57.699555] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffff80401e0000
[ 57.706792] Call trace:
[ 57.709266] rcu_note_context_switch+0x4b4/0x5ac
[ 57.713946] __schedule+0xc4/0xa10
[ 57.717397] schedule+0x60/0x100
[ 57.720667] schedule_timeout+0xa4/0x1c0
[ 57.724641] wait_for_completion_timeout+0x7c/0x150
[ 57.729585] mbox_send_message+0xa8/0x12c
[ 57.733651] rpi_firmware_property_list+0xf8/0x270
[ 57.738510] rpi_firmware_property+0x78/0x114
[ 57.742925] rpi_exp_gpio_get_polarity+0x64/0xec
[ 57.747604] rpi_exp_gpio_dir_out+0x68/0x110
[ 57.751930] gpiod_direction_output_raw_commit+0x64/0x1dc
[ 57.757406] gpiod_direction_output+0xb8/0x134
[ 57.761908] gpio_poweroff_do_poweroff+0x40/0xf0
[ 57.766595] legacy_pm_power_off+0x24/0x40
[ 57.770752] sys_off_notify+0x3c/0x64
[ 57.774462] atomic_notifier_call_chain+0x68/0xa0
[ 57.779231] do_kernel_power_off+0x5c/0x74
[ 57.783383] machine_power_off+0x54/0x60
[ 57.787360] kernel_power_off+0x78/0x84
[ 57.791247] __do_sys_reboot+0x200/0x23c
[ 57.795222] __arm64_sys_reboot+0x2c/0x3c
[ 57.799286] invoke_syscall+0x50/0x120
[ 57.803084] el0_svc_common.constprop.0+0x68/0x124
[ 57.807941] do_el0_svc_compat+0x24/0x4c
[ 57.811915] el0_svc_compat+0x30/0x94
[ 57.815625] el0t_32_sync_handler+0x98/0x140
[ 57.819952] el0t_32_sync+0x190/0x194
[ 57.823661] ---[ end trace 0000000000000000 ]---
It then proceeds to power off as expected - I'm just logging this so it doesn't get forgotten.
Steps to reproduce the behaviour
- Attach a serial cable.
- Enable the UART.
- Press the power button to shut it down.
- Splat.
Device (s)
Raspberry Pi 400
System
6.1.0-rpi4-rpi-v8 #1 Debian 1:6.1.54-1+rpt2
Logs
No response
Additional context
No response
- Dominant language
- C
- Stars
- 13.2k
- Forks
- 5.5k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 21
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/linux
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7415 · 2 comments · 1 reaction ·
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/linux#7399 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
raspberrypi/linux#7357 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7054 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/linux#7634 · 8 comments · 1 reaction ·
All issues in raspberrypi/linux
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·