182 testing: error when updating Alsa

Pakfire log as below:

Dec 6 00:19:41 vulkan pakfire: DOWNLOAD FINISHED: pakfire2/2.27.1-x86_64/paks/tor-0.4.8.9-82.ipfire
Dec 6 00:19:41 vulkan pakfire: PAKFIRE UPGR: alsa: Decrypting…
Dec 6 00:19:41 vulkan pakfire: CLEANUP: tmp
Dec 6 00:19:41 vulkan pakfire: DECRYPT STARTED: alsa
Dec 6 00:19:42 vulkan pakfire: DECRYPT FINISHED: alsa - Status: 0
Dec 6 00:19:42 vulkan pakfire: PAKFIRE UPGR: alsa: Upgrading files and running post-upgrading scripts…
Dec 6 00:19:48 vulkan pakfire: PAKFIRE ERROR: Returncode: 1. Sorry. Please search our forum to find a solution for this problem.

Alsa is a prerequisite for Qemu, too, and these two and a couple of packages are still listed under upgrades after this failed update. I haven’t dared to reboot the machine yet as I don’t want to rebuild it tonight.

Can you show the contents of
/var/log/pakfire/update-alsa.log
This should show what problem was encountered when doing the upgrade of alsa.

mv: cannot stat ‘/etc/asound.state’: No such file or directory
Extracting backup includes…
xz: error while loading shared libraries: liblzma.so.5: cannot open shared object file: No such file or directory
tar: Child returned status 127
tar: Error is not recoverable: exiting now
…Finished.
Stopping ALSA… Saving volumes…
e[1Ae[0Ge[-8Ge[1;34m[e[1;32m OK e[1;34m]e[0;39m
Creating Backup…
tar: Removing leading `//’ from member names
//var/lib/alsa/asound.state
…Finished.
Removing files…
removed ‘/etc/rc.d/init.d/alsa’
(multi-removal of files and directories omitted)
removed directory ‘/var/lib/alsa’
…Finished.
Extracting files…
xz: error while loading shared libraries: liblzma.so.5: cannot open shared object file: No such file or directory
tar: Child returned status 127
tar: Error is not recoverable: exiting now
…Finished.
touch: cannot touch ‘/var/lib/alsa/asound.state’: No such file or directory
Restoring Backup…
var/lib/alsa/asound.state
…Finished.
‘/etc/rc.d/rc3.d/S65alsa’ → ‘…/init.d/alsa’
‘/etc/rc.d/rc0.d/K35alsa’ → ‘…/init.d/alsa’
‘/etc/rc.d/rc6.d/K35alsa’ → ‘…/init.d/alsa’
mv: cannot stat ‘/tmp/asound.state’: No such file or directory
mv: cannot stat ‘/etc/asound.state’: No such file or directory
Extracting backup includes…
xz: error while loading shared libraries: liblzma.so.5: cannot open shared object file: No such file or directory
tar: Child returned status 127
tar: Error is not recoverable: exiting now
…Finished.
Removing files…
removed ‘/var/lib/alsa/asound.state’
removed directory ‘/var/lib/alsa’
…Finished.
Extracting files…
xz: error while loading shared libraries: liblzma.so.5: cannot open shared object file: No such file or directory
tar: Child returned status 127
tar: Error is not recoverable: exiting now
…Finished.
touch: cannot touch ‘/var/lib/alsa/asound.state’: No such file or directory
Restoring Backup…
var/lib/alsa/asound.state
…Finished.
‘/etc/rc.d/rc3.d/S65alsa’ → ‘…/init.d/alsa’
‘/etc/rc.d/rc0.d/K35alsa’ → ‘…/init.d/alsa’
‘/etc/rc.d/rc6.d/K35alsa’ → ‘…/init.d/alsa’
mv: cannot stat ‘/tmp/asound.state’: No such file or directory

So, a removal of liblzma has occurred. Looking at update-core-upgrade-182.log I see (from relevant part, liblzma removal)

removed '/usr/lib/liblzma.so.5.4.4'
removed '/usr/lib/liblzma.so.5.4.5'
removed '/usr/lib/libqpdf.so.29.5.0'
removed '/usr/lib/libsodium.so.23'
removed '/usr/lib/libsodium.so.23.3.0'
Searching in /usr/lib...
Removing /usr/lib/libharfbuzz-cairo.so.0.60811.0...
Removing /usr/lib/libharfbuzz-subset.so.0.60811.0...
Removing /usr/lib/libharfbuzz.so.0.60811.0...
Removing /usr/lib/liblua.so.5.4.4...
Removing /usr/lib/libunbound.so.8.1.22...
Searching in /lib...
Starting Unbound DNS Proxy...
e[1Ae[0Ge[-8Ge[1;34m[e[1;32m  OK  e[1;34m]e[0;39m
Starting SSH Server...
e[1Ae[0Ge[-8Ge[1;34m[e[1;32m  OK  e[1;34m]e[0;39m
/usr/lib/dracut/dracut-install: error while loading shared libraries: liblzma.so.5: cannot open shared object file: No such file or directory
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.34S2Jw/initramfs /bin/sh
dracut: Executing: /usr/bin/dracut --kver=6.1.61-ipfire --force
/usr/lib/dracut/dracut-install: error while loading shared libraries: liblzma.so.5: cannot open shared object file: No such file or directory
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.34S2Jw/initramfs -l /lib64 /lib64
/usr/lib/dracut/dracut-install: error while loading shared libraries: liblzma.so.5: cannot open shared object file: No such file or directory
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.34S2Jw/initramfs -l /usr/lib64 /usr/lib64

(lots of similar failed dracut lines omitted)

Okay, I have found where the error is.

xz waqs update from 5.4.4 to 5.4.5 and the libraries equivalently. Alsa would then have been linked against the new library.

As part of the upgrade script we also remove the old versions of libraries. The error is that the removal line is:-

/usr/lib/liblzma.so.5.4*

which removes both the old 5.4.4 and the new 5.4.5 libraries so no library is left in place.

I will flag this up in the dev mailing list.

Thanks for finding it.

Thanks for finding the error so fast :slight_smile:

Will there be a new 182 testing, and do you think it’s possible to salvage this system by applying it, or should I schedule a reinstall?

Yes there will be.

I am not sure. It might be better to re-install.

I have also found a library link error related to avahi which would also affect people using cups or samba so there will be some other changes coming along as well.

1 Like

Peter has purged the current version of liblzma and also soundcard firmwares.
I have pushed a fix that is now building…

After removing liblzma pakfire is not able to unpack any files because they are xz compressed. The only way is manually copy a working liblzma on the system.

2 Likes

@arne_f has pushed a fix into CU182 Testing.

See the bug report
https://bugzilla.ipfire.org/show_bug.cgi?id=13466
for details.

Can you test the alsa part of the update. I don’t have any sound systems on my vm testbeds so can’t test that part.

I put back liblzma.so.5.4.4 from a working system with its matching link (on my broken, not reinstalled system) and reran the update (Alsa release 17->19, it now says). It didn’t work anyway. The logs now say:

Extracting backup includes...
xz: error while loading shared libraries: liblzma.so.5: cannot open shared object file: No such file or directory
tar: Child returned status 127

Does the new version of unpack utilities require liblzma.so.5.4.5, possibly?

If you run
ls -hal /usr/lib/liblzma*
what do you get.

I suspect that the linked file liblzma.so.5 is also missing.

If that link is not present then you need to run
ln -s /usr/lib/liblzma.so.5.4.4 /usr/lib/liblzma.so.5

and then try the update again.

If that still has a problem then I would suggest the best approach would be to do a fresh install of CU181 on your broken system, do a restore and then try the update to CU182 Testing.

Well I wrote “with its matching link” :wink:

lrwxrwxrwx 1 root root   16 Dec  7 10:07 /usr/lib/liblzma.so.5 -> liblzma.so.5.4.4
-rwxr-xr-x 1 root root 191K Sep 19 15:34 /usr/lib/liblzma.so.5.4.4

Can’t do a reinstall now, will likely take a couple of days.

Sorry, missed that :slightly_frowning_face:

The fix appears to have resolved all the issues that I was seeing. Will wait to hear from you if it has also fixed the alsa ones.

1 Like

Backing xz to 5.4.4 resolved the unpacking error. However, Alsa-update still says

Dec  7 10:47:23 vulkan pakfire: DECRYPT STARTED: alsa
Dec  7 10:47:23 vulkan pakfire: DECRYPT FINISHED: alsa - Status: 0
Dec  7 10:47:23 vulkan pakfire: PAKFIRE UPGR: alsa: Upgrading files and running post-upgrading scripts...
Dec  7 10:47:30 vulkan pakfire: PAKFIRE ERROR: Returncode: 1. Sorry. Please search our forum to find a solution for this problem.
Dec  7 10:47:30 vulkan pakfire: PAKFIRE INFO: Pakfire has finished. Closing.

However it’s not clear from the update log what’s wrong now. What I can find is this:

mv: cannot stat '/etc/asound.state': No such file or directory

…in the beginning and end, likely not of any importance, but also this…

Starting ALSA...   Restoring volumes...
e[1Ae[0Ge[-8Ge[1;34m[e[1;32m  OK  e[1;34m]e[0;39m
Found hardware: "HDA-Intel" "Realtek ALC887" "HDA:10ec0887,10438427,00100202 HDA:10de0007,104383c3,00100100" "0x1043" "0x8427"
Hardware is initialized using a generic method
e[1Ae[0Ge[-8Ge[1;34m[e[1;31m FAIL e[1;34m]e[0;39m

Dunno what that FAIL is about. How is success/failure of the update scripts judged, are the log files searched for the words “error” and “fail”?

No other errors can be spotted in the log.

[root@vulkan ~]# /etc/rc.d/init.d/alsa start
Starting ALSA...   Restoring volumes...                                [  OK  ]
Found hardware: "HDA-Intel" "Realtek ALC887" "HDA:10ec0887,10438427,00100202 HDA:10de0007,104383c3,00100100" "0x1043" "0x8427"
Hardware is initialized using a generic method                         [ FAIL ]

Also

[root@vulkan ~]# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC887 Analog [ALC887 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC887 Digital [ALC887 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I am not familiar enough with alsa to be able to comment on the messages that are being found.

Will need other forum members more familar with alsa to help on what might be causing that.

Well, this is weird.

I rebooted the system, and to my surprise it actually rebooted fine. Alsa could still not be updated, however.

So I uninstalled Alsa. Then I updated all other packages, one of them being Qemu, which has Alsa as a dependency. Then everything updated and Alsa installed fine as a dependency! However, Alsa can still not be run from the rc.d script, perhaps the installer is not checking for the error while the updater does – or something.

1 Like

Reading back through this thread, I believe that you have not done a fresh install of 181 and then upgraded to 182 with the corrected upgrade package that @arne_f provided.

I believe that you put back in the liblzma library and got the upgrade to “work”.

Maybe something still is not correct with the completed upgrade because of the initial hiccup.

It might be better to start with a fresh install of CU181, install your addons and then do the restore of your backup and the addon backups and then do the change to the Testing branch and upgrade to CU182.

That’s correct, but I don’t have the time to do a reinstall right now, just giving a data point.

Ah, okay. Then I understand.