Adding packages crashes system in 'Reloading device manager configuration', leaves zero-sized files behind

TL;DR when package installation fails, crashes the system, and leaves behind a bunch of zero-sized files, what’s an appropriate recovery strategy? (2) Are there known issues with virtualbox or docker packages that could cause installation failures in the ‘Reloading device manager configuration stage’?

Details: I’m new to Manjaro (installed from manjaro-xfce-24.2.1-241216-linux612.iso), coming from Debian. After successfully installing and updating the system, I attempted to add some packages:

pacman -Syu xorg-xrandr fetchmail postfix docker virtualbox

This appeared to go OK, but during the post-transaction hooks I saw dialog like

(2/9) Reloading system manager configuration…
(3/9) Creating temporary files…
(4/9) Reloading device manager configuration…

at which point the system rebooted. I saw nothing in the syslog when it came back up, so I attempted to remove / reinstall the offending packages and narrow down which one caused it. I was somewhat stymied because a large number of files - perhaps everything that was to be installed? - in /usr/share/doc, /usr/share/man, /usr/lib, etc. were present, but zero-sized, generating messages like

libtlsrpt: /usr/lib/libtlsrpt.so.0 exists in filesystem
postfix: /etc/postfix/master.cf.proto exists in filesystem

Removing the packages with ‘pacman -R’ appears to work but does not remove these files, and reinstalling fails because they’re present. I don’t know if this corruption extends to the package database and not just the filesystem, although removing all zero-sized files reported by reinstalling a particular one of those packages (postfix, fetchmail) does seem to work.

I strongly suspect the problem is related to virtualbox, perhaps less likely related to docker - vbox requires a kernel module, for example - so have been hesitant to try and reinstall them.

Have been poking at the forum searchbox but not turning up advice on this - I apologize if my searching was inadequate and this is a known issue.

Welcome to the forum! :vulcan_salute:

There is a way around that, but it’s a very big cannon and it should not be used lightly or routinely… :point_down:

sudo pacman -Syu --overwrite="*"

If it breaks your system, then you get to keep all the pieces. Better cross your fingers and say a little prayer to your favorite guardian angels before you commence.

Thou hast been warned, Sir. :slight_smile:

In addition to the above, zero-sized files are usually the result of filesystem damage due to an unclean shutdown. Make sure you repair the filesystem first before doing anything else. I recommend that you do this from the live USB.

that is not normal - system does not restart in the middle of pacman transaction as such restart will surely wreck the transaction and may leave weird things behind.

I can’t say what may have triggered the restart in your case.

When you have these remnants which are supposed to exist if the transaction completed succesfully - there is an argument to pacman - which will work around the issue - use it sparingly and only when you know you have such issue

sudo pacman -Syu xorg-xrandr fetchmail postfix docker virtualbox --overwrite '*'

Thanks. Is there a way to audit integrity of the pacman database?

It’s an ext4 filesystem. What sort of repair should I be doing?!

(Remembering the bad old days of ncheck / dcheck / icheck on a PDP 11-70 running Interactive Unix and suffering Florida Flash & Flicker’s weekly power surges.)

I would suggest booting up from the live USB, and then, without mounting the root filesystem of the installed system, run an fsck on it. See the man page… :point_down:

man fsck

Hm, this throws me into a form of dependency hell, e.g. when I try this on fetchmail I see a lot of complaints of form

:: Processing package changes…
(1/1) reinstalling fetchmail
[############################################################] 100%
ldconfig: File /usr/lib/libQt6Scxml.so.6.8.2 is empty, not checked.
ldconfig: File /usr/lib/libQt6UiTools.so.6 is empty, not checked.
ldconfig: File /usr/lib/liblzf.so.1.0.0 is empty, not checked.
ldconfig: File /usr/lib/libQt6StateMachineQml.so is empty, not checked.

even though there are no qt6-* dependencies in fetchmail (they come from virtualbox, another package from the original failed install). TBH I’m not seeing much alternative to a complete system reinstall at this point, since I cannot assess the database and system corruption that resulted from this failed install. Distressing both in terms of the onboarding experience for a new Manjaro user - installing a package from the official repo results in this sort of disaster?! - and because I do require virtualbox and docker support.

As I said - this is not normal - I suspect there is a hardware issue somewhere - which caused the system to crash in the midst of transaction.

Your profile says APU is Ryzen 9 370 - what ever caused the crash may be related to the CPU.

It is impossible to suggest a viable way forward wtihout knowing what caused the incident in the first place.

I have read about it - OEM vendors undervolting the system to get as low TDP as possible - but that may create other issues - such as unexpected shutdowns due to lack of power when the processing demand increases.

I suggest you check if your firmware - the APU may be undervolted and this will cause unexpected crashes with may have severe consequences for the installed os - then do a clean reinstallation.

BIOS is showing VCore +0.671, V_SM +1.133, 3.3V +3.355, 5V +5.140 at boot time - no facility to change that. I believe this device is limited to 65W although the 370 HX can nominally take considerably more, but they don’t seem to be playing games with undervolting.

I ran fsck which came up clean, then reinstalled anyway to cleanup the package DB / zero file corruption. This time I installed docker and virtualbox individually after doing a full upgrade, and it did not crash. Do not know what to make of this but, hopefully, it was a one-time thing. Thanks for the suggestions.

Topic closed as OP has now installed a clean working system. Should the topic need to be re-opened for further commentary please ask one of our friendly neighbourhood Moderation staff.