archlinux-downgrade / downgrade

Downgrade packages in Arch Linux
GNU General Public License v2.0
570 stars 24 forks source link

Downgrade somehow bricked my entire system #201

Closed Theslees closed 2 years ago

Theslees commented 2 years ago

:bug: Bug Report

Checklist

Environment

Steps to Reproduce

  1. Install downgrade via yay
  2. run downgrade gcc gcc-libs and choose 11.2.0 for both
  3. System becomes unresponsive and only way to showdown is by forcing it, causing your DE oe any session to be unbootable

Expected behavior

gcc and gcc-libs to downgrade from 12.1.0 to 11.2.0

Actual behavior

I don't even know, it just broke everything and I don't understand how

Command trace

I don't know how to access the system so I think I might have to make a ubuntu recovery stick and see what I can do, but I don't even know what the command did.

Theslees commented 2 years ago

Uninstalling downgrade and reverting the changes it did in tty fixed it, now it's back to normal If there's a log I can post please let me know because there isnt any log downgrade produced that I know of.

atreyasha commented 2 years ago

Uninstalling downgrade and reverting the changes it did in tty fixed it, now it's back to normal

Okay, could you now share your system information and downgrade version (see commands in the PR template)?

If there's a log I can post please let me know

Downgrade does not have a dedicated log. But since the installation procedure is done via pacman, you could post a snippet of the relevant lines in /var/log/pacman.log.

Expected behavior gcc and gcc-libs to downgrade from 12.1.0 to 11.2.0

I tried downgrading both gcc and gcc-libs as documented in both a VM and my local machine. Unfortunately (or fortunately) I did not encounter any such issues of "bricking". But then again I don't use KDE Plasma, so maybe that plays a part.

Actual behavior I don't even know, it just broke everything and I don't understand how

Going forward, there are two causes to consider:

  1. Was there an error within the execution of downgrade which caused the issue (eg. was there a bug in downgrade itself which altered the system in an unexpected way)?
  2. Or did downgrade execute successfully and the issue was caused because of some dependency-related error in the system itself (eg. KDE Plasma uses a library which implicitly depends on a particular version of gcc-libs and this was not documented as an explicit dependency in the PKGBUILD of the relevant package(s))?

As a maintainer of downgrade, my main concern is to ensure that downgrade did what it was expected/told to do i.e. downgrade packages. Based on my experiments, I can verify that downgrade indeed downgraded gcc and gcc-libs successfully. So from that perspective, I don't see an issue here for downgrade.

That being said, I am not saying that your issue is not valid; I just think (based on the evidence here) that the issue is not related to downgrade and more relevant to another package which implicitly depends on one or more of the downgraded packages.

As a final note, I would err on the side of caution when using downgrade to downgrade low-level packages such as gcc and gcc-libs; precisely because of the reasons mentioned above on implicit dependencies. If you really need to perform this downgrade, maybe it could make sense to look into A.L.A snapshots:

https://wiki.archlinux.org/title/Arch_Linux_Archive#How_to_restore_all_packages_to_a_specific_date

@pbrisbin WDYT?

pbrisbin commented 2 years ago

Sorry to hear about this, it must've been frustrating!

As @atreyasha mentioned, downgrade doesn't actually handle the aspects of this that bricked your system (likely changing some hard-linked shared library not captured by package version constraints). downgrade just helps searching for and selecting older packages from the archive, and then installs things via pacman:

sudo pacman -U \
  https://archive.archlinux.org/packages/g/gcc/gcc-11.2.0-4-x86_64.pkg.tar.zst \
  https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-11.2.0-4-x86_64.pkg.tar.zst

You could easily run this command yourself and find the same outcome. So it's not that downgrade bricked you, it's that installing older versions of gcc doesn't work on your system.

Installing software outside of official sources will always come with increased risk, particularly older versions of core libraries.