Bug 1460516 - dnf shouldn't allow you to remove its dependencies
Summary: dnf shouldn't allow you to remove its dependencies
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openssl
Version: 27
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-11 18:23 UTC by Randy Barlow
Modified: 2019-11-14 15:00 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-14 15:12:24 UTC
Type: Bug
Embargoed:
rbarlow: needinfo-


Attachments (Terms of Use)
coredumpctl info (5.92 KB, text/plain)
2017-06-11 18:23 UTC, Randy Barlow
no flags Details
debugdata folder (6.52 MB, application/x-bzip)
2017-06-23 20:52 UTC, Randy Barlow
no flags Details
dnf output (3.08 KB, text/plain)
2017-06-23 20:53 UTC, Randy Barlow
no flags Details

Description Randy Barlow 2017-06-11 18:23:54 UTC
Created attachment 1286848 [details]
coredumpctl info

Description of problem:
Today I used dnf to install some build dependencies for erlang. After I installed those dependencies, dnf segfaults.


Version-Release number of selected component (if applicable):
dnf-2.5.0-2.fc27.noarch


How reproducible:
Every time.


Steps to Reproduce:
1. Run dnf


Actual results:
$ dnf
Segmentation fault (core dumped)


Expected results:
dnf should not segfault.


Additional info:
I am attaching coredump info.

Comment 1 Randy Barlow 2017-06-11 18:29:04 UTC
I believe this may be connected to dnf having wanted to install compat-openssl10-devel-1:1.0.2j-6.fc26.x86_64 instead of openssl-devel. Since it was a devel library, I used the --allowerasing option. Ever since that replacement was made, dnf does not work (which is surprising, given that it is a devel package).

Comment 2 Randy Barlow 2017-06-11 18:40:05 UTC
I was able to use rpm to get my system working again:

$ sudo rpm -e compat-openssl10-devel && sudo rpm -U https://kojipkgs.fedoraproject.org//packages/openssl/1.1.0f/2.fc27/x86_64/openssl-libs-1.1.0f-2.fc27.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/openssl/1.1.0f/2.fc27/x86_64/openssl-devel-1.1.0f-2.fc27.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/openssl/1.1.0f/2.fc27/x86_64/openssl-1.1.0f-2.fc27.x86_64.rpm

It might be good to have dnf disallow removing libraries that it depends on itself.

Comment 3 Randy Barlow 2017-06-11 18:48:38 UTC
Or alternatively, dnf could at least warn you that you are removing its dependencies with some kind of "are you sure?" prompt. Also, it's curious that dnf allowed me to remove openssl without it removing dnf itself too.

Comment 4 Igor Gnatenko 2017-06-12 05:51:27 UTC
That sounds like a packaging problem...

Comment 5 Igor Gnatenko 2017-06-14 11:30:20 UTC
Can you reproduce this? If yes, please re-run with --debugsolver and attach debugdata directory... Then I can take a look why it broke DNF...

if not, please close this bug as NOTABUG.

Comment 6 Randy Barlow 2017-06-23 20:52:19 UTC
Hi Igor!

I can reproduce it, but only by using --allowerasing. Here's some reproducer steps:

0. fedpkg clone erlang
1. sudo dnf builddep erlang.spec --debugsolver

I'll attach the folder and a file with the output of dnf.

Comment 7 Randy Barlow 2017-06-23 20:52:57 UTC
Created attachment 1291276 [details]
debugdata folder

Comment 8 Randy Barlow 2017-06-23 20:53:18 UTC
Created attachment 1291277 [details]
dnf output

Comment 9 Igor Gnatenko 2017-07-01 17:29:48 UTC
Well, swapping devel subpackages should be completely fine... If that breaks system, that's packaging fault but not DNF...


I have suspicion that something tries to dlopen unversioned libcrypto and after transaction version mismatches and everything just explodes.

Reassigning to openssl for additional help.

Try to build such packages in mock, btw.

Comment 10 Tomas Mraz 2017-07-10 11:33:31 UTC
Can you please provide full stack trace from the crash? The original stack trace attached is not much helpful as there is no libcrypto mentioned at all.

And yes, if something opens libcrypto by unversioned .so this needs to be fixed. But we need to find what does it. If you remove both compat-openssl10-devel and openssl-devel does dnf still crash?

Comment 11 Jan Kurik 2017-08-15 06:57:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.


Note You need to log in before you can comment on or make changes to this bug.