Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4060

Troubleshooting • sudo reboot takes 4-8mins

$
0
0
My RPi 4B running Linux raspberrypi 6.1.21-v8+ takes ~8 minutes to reboot. Here's what I was messing with when this first happened, then a reboot timeline, and then some logs I've looked at.

I initially had this problem when I rebooted the RPi after adding a uart gps (max m10s) that draws very little power. I thought this maybe drew too much power from the pi (it has two other gps's plugged into the usb ports, an imu, other random sensors), and removed the uart gps—and everything went back to normal. By normal, I mean the RPi reboots in maybe 2 minutes, is connected to its ethernet connection, sends me an email via an rc.local triggered python script saying it's up, and gets a reverse ssh tunnel going via ngrok. So, I added a separate power source for the gps (that shares a common ground), migrated over many of the other sensors to this separate 3.3v, and tried again. Same boot taking forever. And at this point, I was disconnecting the ethernet when the pi didn't come up in a few minutes, and trying to ssh over wired LAN; this was not working for still another few minutes, giving connection refused but pinging ok, and then all of sudden it would just start working and let me in. It doesn't seem to reboot any better on a wired LAN with my laptop versus on internet-connected ethernet.

Now I have the uart gps removed, and removed the extra 3.3v altogether, so everything's as it was just before I noticed this problem. However, I hadn't rebooted in at least a couple days, so lots of other random os config changes could also be the culprit.

A timeline (this recurs consistently):
'sudo reboot' around 11:14:50
there's a bunch of shutdown stuff in /var/log/syslog until 23:14:52
there is nothing in /var/log/syslog until 23:18:19
there's a nothing in /var/log/syslog between 23:18:46 and 23:22:32
python email script gets called around 23:18:36 (this ends up being the body of the email), but is confusingly not sent (according to the email html) until 23:22:22, and then received at 23:22:24
reverse ssh tunnel is first seen at 03:22:24

Basically, it seems to wait four minutes to attempt to startup, and then it does so in ~30sec, but then hangs for another four minutes on something?

Code:

systemd-analyze blame
gives

Code:

23.546s dev-mmcblk0p2.device22.337s systemd-journal-flush.service22.086s e2scrub_reap.service17.885s rc-local.service15.178s systemd-udevd.service14.909s ModemManager.service14.585s cups.service13.008s udisks2.service 6.016s rpi-eeprom-update.service 4.019s systemd-random-seed.service 3.977s systemd-sysusers.service 3.283s polkit.service 2.984s plymouth-start.service 2.754s raspi-config.service 2.717s avahi-daemon.service 2.601s ifupdown-pre.service 2.536s systemd-logind.service 2.521s wpa_supplicant.service 2.063s ssh.service 1.997s glamor-test.service 1.992s gldriver-test.service 1.829s rng-tools-debian.service 1.817s user@1000.service 1.393s dphys-swapfile.service 1.379s pulseaudio-enable-autospawn.service 1.304s dhcpcd.service 1.295s rsyslog.service 1.212s systemd-fsck@dev-disk-by\x2dpartuuid-e9c8be79\x2d01.service 1.105s lightdm.service  870ms keyboard-setup.service  773ms systemd-udev-trigger.service  568ms triggerhappy.service  523ms systemd-fsck-root.service  478ms packagekit.service  463ms systemd-journald.service  428ms networking.service  412ms fake-hwclock.service  400ms modprobe@drm.service  292ms systemd-tmpfiles-setup-dev.service  268ms systemd-timesyncd.service  230ms dev-mqueue.mount  228ms alsa-restore.service  226ms run-rpc_pipefs.mount  222ms sys-kernel-debug.mount  222ms modprobe@fuse.service  217ms sys-kernel-tracing.mount  197ms systemd-modules-load.service  196ms kmod-static-nodes.service  194ms modprobe@configfs.service  179ms systemd-remount-fs.service  132ms systemd-tmpfiles-setup.service  129ms gpsdctl@ttyACM0.service  126ms systemd-sysctl.service  126ms gpsdctl@ttyACM1.service  114ms boot.mount   75ms systemd-update-utmp.service   58ms systemd-rfkill.service   58ms systemd-user-sessions.service   55ms console-setup.service   40ms plymouth-read-write.service   38ms wd_keepalive.service   38ms nfs-config.service   27ms user-runtime-dir@1000.service   27ms systemd-update-utmp-runlevel.service   18ms sys-kernel-config.mount   15ms sys-fs-fuse-connections.mount    3ms plymouth-quit-wait.service    

Code:

systemctl status
gives

Code:

    State: running     Jobs: 0 queued   Failed: 0 units

Code:

cat /var/log/syslog | grep -a rror
gives

Code:

Mar 29 23:18:19 raspberrypi kernel: [   46.739776] spi-bcm2835 fe204000.spi: Error applying setting, reverse things backMar 29 23:18:21 raspberrypi lightdm[577]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service filesMar 29 23:18:35 raspberrypi vncserver-x11[578,root]: UpdateNotificationRequest: X.509 Error: Certificate expiredMar 29 23:18:41 raspberrypi lightdm[685]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service filesMar 29 23:18:43 raspberrypi systemd-xdg-autostart-generator[703]: Not generating service for XDG autostart app-pulseaudio-autostart.service, error parsing Exec= line: No such file or directoryMar 29 23:18:45 raspberrypi pipewire[705]: Failed to receive portal pid: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get PID of name 'org.freedesktop.portal.Desktop': no such nameMar 29 23:23:25 raspberrypi kernel: [  131.916622] v3d fec00000.v3d: MMU error from client CLE (4) at 0x21e01e0, pte invalid

Code:

cat /var/log/syslog | grep -a ailed
gives

Code:

Mar 29 23:18:19 raspberrypi systemd-udevd[193]: event1: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.Mar 29 23:18:19 raspberrypi systemd-udevd[198]: event0: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.Mar 29 23:18:23 raspberrypi udisksd[436]: failed to load module mdraid: libbd_mdraid.so.2: cannot open shared object file: No such file or directoryMar 29 23:18:23 raspberrypi udisksd[436]: Failed to load the 'mdraid' libblockdev pluginMar 29 23:18:45 raspberrypi pipewire[705]: Failed to receive portal pid: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get PID of name 'org.freedesktop.portal.Desktop': no such name
I've cleared out a bunch of other errors from the syslog (network configuration throwing errors, pulseaudio throwing errors, my python email script throwing errors when the ethernet doesn't connect fast enough, systemd services failing, and more) but none seem to change this 8min reboot time.

Where should I be looking to figure out what the pi's doing all this time? What's up with the email being sent so much later than the python script is called? Thank you for your help.

Statistics: Posted by mgrocketman — Sat Mar 30, 2024 7:41 am



Viewing all articles
Browse latest Browse all 4060

Trending Articles