Diagnosing unreliable reboots
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- linux, raspberry-pi, shell
- Domain
- embedded-iot, operating-systems
Research direction
Start by reading the linked issue 1559 and the diagnostic procedure in this issue, including /boot/cmdline.txt, /boot/config.txt, and /usr/lib/systemd/system-shutdown/debug.sh. The payload does not identify a code location, failing test, or concrete change; a maintainer would need to define whether the next step is kernel investigation or documentation work and what evidence would count as done.
Written by the indexing model from the issue text.
Description
This is a continuation of https://github.com/raspberrypi/firmware/issues/1559, a thread which is so long that the important diagnostic questions have got lost in the middle.
https://github.com/raspberrypi/firmware/issues/1559 was specifically about Pi 4, but the methods for diagnosing the problem are common to all Pis.
I'll be using the word "reboot" throughout this list, but it should apply equally to powering off.
- When rebooting hangs, wait several minutes to see if it unsticks eventually.
- Does
sync && sudo reboot -fhang or reboot? - If reboot is very slow but eventually completes,
- Add
systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M enforcing=0to /boot/cmdline.txt - Put the following in
/usr/lib/systemd/system-shutdown/debug.sh:#!/bin/sh mount -o remount,rw / dmesg > /shutdown-log.txt mount -o remount,ro / reboot - Make it executable:
$ sudo chmod +x /usr/lib/systemd/system-shutdown/debug.sh - Reboot twice - once to activate the logging, and once to generate /shutdown-log.txt.
- Upload /shutdown-log.txt.
- Remove the additions to cmdline.txt and delete (or make non-executable) /usr/lib/systemd/system-shutdown/debug.sh
- Add
- If reboot doesn't complete, and if you have a serial/UART cable you can connect to header pins 6, 8, and 10, and a host computer (or another Raspberry Pi) to run a terminal app such as PuTTY or minicom:
- Add
enable_uart=1to /boot/config.txt. - Add
systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M enforcing=0 ignore_loglevelto /boot/cmdline.txt, being careful to removequietif it is present. - Run
syncto flush outstanding writes, then power cycle. - Log in as usual (it will take a long time to boot, with thousands of lines of output, and if you are logging in over the serial connection you may have to hit Return to get the prompt), then
sudo rebootand capture the output in your terminal program.
- Add
- 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 ·