Update stops on 86%

Hi.

I started the update to the latest version today (using My OSMC). It restarted once, but is now stuck at 86% on the screen with the blue background. It’s on the part “Configuring armv7-bluez-osmc (armhf)”. I know it sometimes takes a while to update, but now it has been stuck on this point for about 2 hours.

I’m able to connect using SSH.

What is recommended to do in this case? Is it possible to stop the update and retry? Or a logfile I can check to see if I can find the reason why it stops during the installation of this package?

I would assume it’s an issue with the SD Card.

You can check grab-logs -P -a to check for errors. If you don’t see anything you can upload with grab-logs -a and share the URL.

You could also check sudo journalctl -f

Thank you for your reply. I didn’t find anything useful in the logs.

Could be the SD card, but it’s a high quality SanDisk Ultra card with 10 years warranty. I have only used it for OSMC, but since 2017 and total bytes written is 360GB. Maybe it has been worn out? :slight_smile:

But is there a way I can stop the update and try to start it again to see if it resumes?

You can check with ps -aux | grep apt to see the process id and then kill -9 PID to kill it.

I used htop, and there was a running process called “bash /var/lib/dpkg/info/armv7-bluez-osmc.postinst configure 5.62-1”. I ended that, and then the update resumes and it seems like everything was fine, except I got an error in the end that there was a problem installing the bluez package. But that’s for Bluetooth which I don’t use, so I guess it’s okay then. :slight_smile:

Thank you for your support.

I have the same problem but I have grabbed the logs at https://paste.osmc.tv/jufejoqoti.

journalctl -f gives a repeating:

Oct 27 21:11:41 osmc rpi-btuart[18127]: Initialization timed out.
Oct 27 21:11:41 osmc rpi-btuart[18127]: bcm43xx_init
Oct 27 21:11:41 osmc systemd[1]: brcm43xx.service: Control process exited, code=exited, status=1/FAILURE
Oct 27 21:11:41 osmc systemd[1]: brcm43xx.service: Failed with result 'exit-code'.
Oct 27 21:11:41 osmc systemd[1]: Failed to start Broadcom 43xx bluetooth HCI.
Oct 27 21:11:41 osmc systemd[1]: Starting Broadcom 43xx bluetooth HCI...
Oct 27 21:11:41 osmc rpi-btuart[18128]: /usr/bin/rpi-btuart: line 10: warning: command substitution: ignored null byte in input
Oct 27 21:11:41 osmc rpi-btuart[18128]: /usr/bin/rpi-btuart: line 10: warning: command substitution: ignored null byte in input

ps faux gives:

<snip>
root       884  0.0  0.1   6756  1136 ?        Ss   20:32   0:00 /bin/bash /tmp/tmp.bB15AywyUa
root       911  0.4  1.1  14072 10620 ?        S    20:32   0:12  \_ /usr/bin/perl -w /usr/share/debconf/frontend /usr/bin/debconf-apt-progress --logfile /tmp/tmp.MDFsXJsfx8 -- apt-get-noninteractive -f -y dist-upgrade
root       919  0.0  0.5   7528  5208 ?        S    20:32   0:02      \_ /usr/bin/perl -w /usr/bin/debconf-apt-progress --logfile /tmp/tmp.MDFsXJsfx8 -- apt-get-noninteractive -f -y dist-upgrade
root       922  0.0  0.0   2956   852 ?        S    20:32   0:00      |   \_ /bin/bash /usr/bin/apt-get-noninteractive -o APT::Status-Fd=4 -o APT::Keep-Fds::=5 -o APT::Keep-Fds::=6 -f -y dist-upgrade
root       923  0.0  0.0   2956   916 ?        S    20:32   0:00      |       \_ /bin/bash /usr/bin/apt-get -o APT::Status-Fd=4 -o APT::Keep-Fds::=5 -o APT::Keep-Fds::=6 -f -y dist-upgrade
root       924  0.4  5.0  52752 47360 ?        S    20:32   0:12      |           \_ /usr/bin/apt-get-real -o APT::Status-Fd=4 -o APT::Keep-Fds::=5 -o APT::Keep-Fds::=6 -f -y dist-upgrade
root      9449  0.0  0.3   4944  3460 pts/0    Ss+  20:43   0:01      |               \_ /usr/bin/dpkg --force-confdef --force-confold --status-fd 29 --configure --pending
root     17490  0.0  0.2   2696  2036 pts/0    S+   20:45   0:00      |                   \_ /bin/bash /var/lib/dpkg/info/armv7-bluez-osmc.postinst configure 5.62-1
root     17566  0.0  0.1   5196  1144 pts/0    S+   20:45   0:00      |                       \_ systemctl restart bluetooth.service
root       921  0.4  0.1   2968  1776 ?        S    20:32   0:12      \_ dialog --backtitle Package configuration --title Installing packages --output-fd 7 --nocancel --gauge   7 78 0
<snip>

This is on a Pi 3B+

I’ll try killing 17566 then 17490 in the next hour or so if I don’t hear back, I am afraid.

[edit]
From the ps faux shouldn’t the bluetooth restart be a condrestart and not a restart, otherwise you are forcing it to start when it may not have been running?
[/edit]

[edit2]
systemctl status bluetooth gives:

* bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/bluetooth.service.d
             `-local.conf
     Active: inactive (dead) since Thu 2022-10-27 20:39:27 BST; 49min ago
       Docs: man:bluetoothd(8)
   Main PID: 351 (code=exited, status=0/SUCCESS)
     Status: "Powering down"

Oct 27 20:39:27 osmc bluetoothd[351]: Endpoint unregistered: sender=:1.10 path=/org/bluez/hci0/A2DP/SBC/Source/1
Oct 27 20:39:27 osmc bluetoothd[351]: Endpoint unregistered: sender=:1.10 path=/org/bluez/hci0/A2DP/SBC/Source/2
Oct 27 20:39:27 osmc bluetoothd[351]: Endpoint unregistered: sender=:1.10 path=/org/bluez/hci0/A2DP/SBC/Sink/1
Oct 27 20:39:27 osmc bluetoothd[351]: Endpoint unregistered: sender=:1.10 path=/org/bluez/hci0/A2DP/SBC/Sink/2
Oct 27 20:39:27 osmc bluetoothd[351]: Terminating
Oct 27 20:39:27 osmc systemd[1]: Stopping Bluetooth service...
Oct 27 20:39:27 osmc bluetoothd[351]: Stopping SDP server
Oct 27 20:39:27 osmc bluetoothd[351]: Exit
Oct 27 20:39:27 osmc systemd[1]: bluetooth.service: Succeeded.
Oct 27 20:39:27 osmc systemd[1]: Stopped Bluetooth service.

[/edit2]

In my case, I killed the process called “bash /var/lib/dpkg/info/armv7-bluez-osmc.postinst configure 5.62-1”, and the upgrade then resumed.

After the upgrade, I ran “sudo apt autoremove” to remove not needed packages, and remember I also got something about incomplete packages or something like that. And that was the bluez package, but that was fixed when I used the apt autoremove command.

And btw, I also have a Pi 3B+.

If you look at my process tree, I have the same process as the one you terminated, but it has a subprocess which is restarting bluetooth. I am wondering if it is that which is hanging.

Killing the systemctl restart bluetooth allowed the installation to continue.

I’m no expert, but it seems like the bluetooth service for some reason will not end correctly during the upgrade, and that’s why the upgrade stops, since it’s necessary to shutdown the service before the upgrade can continue.

It might be possible to manually stop the bluetooth service and see if the upgrade resume then. But according to the output from the systemctl status bluetooth it seems like it’s already stopped.

I’m sorry, but I don’t have any more information about this issue. I only know what I did that fixed it. :slight_smile:

[edit]
I guess it will be better to kill the “systemctl restart bluetooth” as you did, since then the installation of the bluez package probably will be completed without error as I got.

I’ll mark your reply as solution if anyone else should get this problem.
[/edit]

I still get a sad face at the end but Kodi/OSMC does work and the bluetooth service comes up automatically after the Pi reboots as part of the update.