Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core dumped when: The rpm transaction contains more elements than requested #518

Open
xsuchy opened this issue May 10, 2023 · 10 comments
Open
Assignees
Labels
Priority: HIGH Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@xsuchy
Copy link
Member

xsuchy commented May 10, 2023

My previous dnf5 was forcefully interrupted.

Now I get:

Running transaction
terminate called after throwing an instance of 'libdnf::AssertionError'
  what():  libdnf/rpm/transaction.cpp:165: void libdnf::rpm::Transaction::fill(const libdnf::base::Transaction&): Assertion 'implicit_ts_elements.empty()' failed: The rpm transaction contains more elements than requested
Neúspěšně ukončen (SIGABRT) (core dumped [obraz paměti uložen])

This is because:

# rpm -q glibc
glibc-2.37-1.fc38.x86_64
glibc-2.37-1.fc38.i686
glibc-2.37-4.fc38.x86_64
Full output
# dnf5 upgrade 'glib*'
Updating and loading repositories:
 Copr repo for flask-pixel owned by msuchy                                                                                                                                   100% | 625.0   B/s |   1.3 KiB |  00m02s
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/msuchy/flask-pixel/fedora-38-x86_64/repodata/repomd.xml (IP: 13.32.110.108) - https://download.copr.fedorainfracloud.org/results/msuchy/f
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/msuchy/flask-pixel/fedora-38-x86_64/repodata/repomd.xml (IP: 13.32.110.108) - https://download.copr.fedorainfracloud.org/results/msuchy/f
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/msuchy/flask-pixel/fedora-38-x86_64/repodata/repomd.xml (IP: 13.32.110.108) - https://download.copr.fedorainfracloud.org/results/msuchy/f
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/msuchy/flask-pixel/fedora-38-x86_64/repodata/repomd.xml (IP: 13.32.110.108) - https://download.copr.fedorainfracloud.org/results/msuchy/f
>>> Librepo error: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Repositories loaded.
Package                                                                  Arch             Version                                                                  Repository                                    Size
Upgrading:                                                                                                                                                                                                           
 glibc                                                                   i686             2.37-4.fc38                                                              updates                                    5.2 MiB
  replacing glibc                                                        i686             2.37-1.fc38                                                              fedora                                     5.2 MiB
 glibc-all-langpacks                                                     x86_64           2.37-4.fc38                                                              updates                                  218.2 MiB
  replacing glibc-all-langpacks                                          x86_64           2.37-1.fc38                                                              fedora                                   218.2 MiB
 glibc-devel                                                             i686             2.37-4.fc38                                                              updates                                   75.8 KiB
  replacing glibc-devel                                                  i686             2.37-1.fc38                                                              fedora                                    82.3 KiB
 glibc-gconv-extra                                                       i686             2.37-4.fc38                                                              updates                                    7.7 MiB
  replacing glibc-gconv-extra                                            i686             2.37-1.fc38                                                              fedora                                     7.7 MiB
 libnsl                                                                  i686             2.37-4.fc38                                                              updates                                  106.8 KiB
  replacing libnsl                                                       i686             2.37-1.fc38                                                              fedora                                   106.9 KiB
 libnsl                                                                  x86_64           2.37-4.fc38                                                              updates                                   99.7 KiB
   replacing libnsl                                                      x86_64           2.37-1.fc38                                                              fedora                                    99.9 KiB

Transaction Summary:
Upgrading: 6 packages
Replacing: 6 packages

Total size of inbound packages is 22 MiB. Need to download 0 B.
After this operation 15 KiB will be freed (install 231 MiB, remove 231 MiB).
Is this ok [y/N]: y
[1/6] glibc-0:2.37-4.fc38.i686 100% | 0.0 B/s | 0.0 B | 00m00s

Already downloaded
[2/6] libnsl-0:2.37-4.fc38.i686 100% | 0.0 B/s | 0.0 B | 00m00s
Already downloaded
[3/6] glibc-gconv-extra-0:2.37-4.fc38.i686 100% | 0.0 B/s | 0.0 B | 00m00s
Already downloaded
[4/6] libnsl-0:2.37-4.fc38.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s
Already downloaded
[5/6] glibc-all-langpacks-0:2.37-4.fc38.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s
Already downloaded
[6/6] glibc-devel-0:2.37-4.fc38.i686 100% | 0.0 B/s | 0.0 B | 00m00s
Already downloaded


[6/6] Total 100% | 0.0 B/s | 0.0 B | 00m00s
Verifying PGP signatures

Running transaction
terminate called after throwing an instance of 'libdnf::AssertionError'
what(): libdnf/rpm/transaction.cpp:165: void libdnf::rpm::Transaction::fill(const libdnf::base::Transaction&): Assertion 'implicit_ts_elements.empty()' failed: The rpm transaction contains more elements than requested

After # rpm -e glibc-2.37-1.fc38.x86_64 I can run dnf5 upgrade and it proceed without problem.

@j-mracek
Copy link
Member

It looks like that DNF5 is too sensitive to broken system.

@j-mracek j-mracek added Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take Priority: HIGH labels May 15, 2023
@jan-kolarik
Copy link
Member

It looks like that DNF5 is too sensitive to broken system.

Can we really consider this as a "broken system" scenario that can only happen when doing out-of-dnf package operations? If so, I'd be for lowering the priority level then.

@j-mracek
Copy link
Member

j-mracek commented Jan 8, 2024

I believe that the issue is not related to out-of-dnf package operations.

@jan-kolarik
Copy link
Member

I believe that the issue is not related to out-of-dnf package operations.

OK and do we know how to reproduce this issue? Because using dnf5 it seems not possible to install both glibc-2.37-1.fc38.x86_64 and glibc-2.37-4.fc38.x86_64.

@j-mracek
Copy link
Member

j-mracek commented Jan 8, 2024

Yes, just install dnf5 install glibc-2.37-4.fc38.x86_64 --setopt=installonly=glibc. This is a way how we can reproduce it in our CI.

But the real life reproducer is - upgrade glibc like dnf5 upgrade glibc and in the middle of transaction kill the system (power off, ...).

@j-mracek j-mracek self-assigned this Jan 8, 2024
@j-mracek
Copy link
Member

j-mracek commented Jan 8, 2024

@xsuchy May I ask you for additional information generated by --debugsolver for transaction that generated the traceback?

I tried to reproduce the issue with a simplified test packages, but it worked like expected, therefore I need to have more details to understand the trigger.

Tested with dnf5-5.1.10

@xsuchy
Copy link
Member Author

xsuchy commented Jan 8, 2024

It was 7 months ago! I do not have that system anymore. Sorry.

@j-mracek
Copy link
Member

j-mracek commented Jan 9, 2024

@xsuchy My apology, it is our mistake. I have seen a similar problem with DNF4 where RPM transaction differed from History DB transaction. The first step was to add a proper logging where all elements in history transaction (solver) and RPM transaction where logged. Without it we were unable to fix it in DNF4 and it would be difficult with DNF5 either. Anyway I will try to play around.

@j-mracek
Copy link
Member

j-mracek commented Jan 9, 2024

Ok, the reproducer requires i686 and x86_64 version in transaction. With the only one architecture installed it is not possible to reproduce the issue.

Installed:
foo-0:1.0-1.i686
foo-0:1.0-1.x86_64
foo-0:2.0-1.x86_64

Available:
foo-0:1.0-1.i686
foo-0:1.0-1.x86_64
foo-0:2.0-1.i686
foo-0:2.0-1.x86_64

@j-mracek
Copy link
Member

j-mracek commented Jan 9, 2024

The issue is also reproducible with DNF and RPM.

The problem is that upgrade of B-1-1.i686 result in RPM in removal of B-2-2.x86_64 and B-1-1.x86_64. DNF4 complains in callbacks, but DNF5 correctly fails. Not nicely, but it is less problematic then removal of all packages b.x86_64. Package B does not require anything and provides only B.

#rpm -q --root=/tmp/dnf_ci_installroot_eajo9b5c B
B-1-1.i686
B-2-2.x86_64
B-1-1.x86_64

# rpm -U --root=/tmp/dnf_ci_installroot_eajo9b5c B-2-2.i686.rpm

# rpm -q --root=/tmp/dnf_ci_installroot_eajo9b5c B
B-2-2.i686

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: HIGH Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
Status: Backlog
Development

No branches or pull requests

3 participants