Bug 1318662

Summary: python3 segfault when using python3-dnf-1.1.7
Product: [Fedora] Fedora Reporter: Samuel <samuel>
Component: libsolvAssignee: Igor Gnatenko <ignatenko>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: bkabrda, cstratak, derfian, ignatenko, jberan, jmracek, jsilhan, mls, mluscon, mstuchli, ossman, packaging-team-maint, pnemade, pviktori, samuel, tomspur, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libsolv-0.6.20-2.fc24 libsolv-0.6.20-2.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-20 17:36:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
backtrace printed as a result of running dnf list help none

Description Samuel 2016-03-17 13:15:45 UTC
Created attachment 1137388 [details]
backtrace printed as a result of running dnf list help

Description of problem:
-----------------------
After upgrading python3-dnf (from 1.1.6 to 1.1.7) I have started to get segfaults when using dnf.


Version-Release number of selected component (if applicable):
-------------------------------------------------------------
I'm not sure if this belongs in the python3 component or dnf, however, rpm -qi says:

Name        : python3
Version     : 3.4.3
Release     : 5.fc23
Architecture: x86_64
Install Date: Thu 17 Dec 2015 16:46:29
Source RPM  : python3-3.4.3-5.fc23.src.rpm
Build Date  : Mon 29 Jun 2015 15:15:25

Name        : python3-dnf
Version     : 1.1.7
Release     : 2.fc23
Architecture: noarch
Install Date: Tue 15 Mar 2016 09:07:51
Source RPM  : dnf-1.1.7-2.fc23.src.rpm
Build Date  : Wed 9 Mar 2016 17:45:30


How reproducible:
-----------------
I can consistently reproduce this one my workstation. However, on my laptop, which also runs fedora 23 I did the exact same upgrade of python3-dnf but I can't trigger the problem. My laptop has the same version of Python 3 as well.


Steps to Reproduce:
-------------------
1. Have python3 3.4.3 and python3-dnf 1.1.6
2. Upgrade python-dnf to 1.1.7
3. Run dnf list


Actual results:
---------------

> [samuel@samuel-80 ~]$ dnf list
> google-chrome              139 kB/s | 3.6 kB     00:00
> Fedora 23 - x86_64         9.0 MB/s |  43 MB     00:04
> 
> Segmentation fault (core dumped)

Full backtrace in attachment.


Expected results:
-----------------
To be able to use dnf without crashes.


Additional info:
----------------

From /var/log/dnf.rpm.log:

Mar 15 09:07:51 INFO Upgraded: python3-dnf-1.1.7-2.fc23.noarch
Mar 15 09:07:52 INFO Upgraded: python3-dnf-plugins-core-0.1.17-1.fc23.noarch
Mar 15 09:08:39 INFO Cleanup: python3-dnf-plugins-core-0.1.16-1.fc23.noarch
Mar 15 09:08:46 INFO Cleanup: python3-dnf-1.1.6-2.fc23.noarch


Due to a retarded habit of mine I removed the abrt report.. So I filled in this by hand, apologies if I missed something vital.

Comment 1 Petr Viktorin 2016-03-17 13:20:47 UTC
The backtrace shows the crash is happening in libhawkey/libsolv, so I'm reassigning to DNF.
If the bug is indeed related to Python, let me know.

Comment 2 Karl Mikaelsson 2016-03-22 13:11:46 UTC
Downgrading libsolv from 0.6.19-2.fc23.x86_64 to libsolv-0.6.14-2.fc23.x86_64 makes dnf work as expected.

I've isolated the problem to a company-internal repository. I'll try to get the repodata published so others can reproduce.

Comment 3 Karl Mikaelsson 2016-03-22 13:53:05 UTC
Here's the repodata from the repository makes dnf crash:

 https://www.cendio.com/~derfian/rh1318662/repodata.tar.xz

It was generated by createrepo-0.9.9-25.el7_2 on a RHEL 7.2 server.

Comment 4 Honza Silhan 2016-03-29 13:47:36 UTC
Karl, how did you downgrade libsolv? If you upgrade to libsolv again, Does it fails pernamently again?

Comment 5 Jaroslav Mracek 2016-03-29 14:09:44 UTC
Thank you for report. Unfortunately I was unable to reproduce the problem even with provided repodata. Please could you reproduce it on other machine with provided metadata and report back results. Thanks a lot.

Comment 6 Karl Mikaelsson 2016-04-01 08:29:47 UTC
(In reply to Jan Silhan from comment #4)
> Karl, how did you downgrade libsolv?

"dnf downgrade libsolv --disablerepo=cendio-build". dnf only seems to have a problem with the cendio-build repo.

> If you upgrade to libsolv again, Does it fails pernamently again?

Yes. Here's the steps I used to verify this:

> # rpm -q libsolv
> libsolv-0.6.19-2.fc23.x86_64

> # dnf clean all ; dnf upgrade
> [...]
> Cendio Build Environment                       63 MB/s |  11 MB     00:00    
> Segmentation fault (core dumped)

> # dnf downgrade libsolv --disablerepo=cendio-build

> # rpm -q libsolv
> libsolv-0.6.14-2.fc23.x86_64

> # dnf clean all ; dnf upgrade

> # rpm -q libsolv
> libsolv-0.6.19-2.fc23.x86_64

> # dnf clean all ; dnf upgrade
> [...]
> Fedora 23 - x86_64 - Updates                  2.6 MB/s |  21 MB     00:07    
> Cendio Build Environment                       60 MB/s |  11 MB     00:00    
> Segmentation fault (core dumped)

Comment 7 Igor Gnatenko 2016-04-11 11:58:40 UTC
*** Bug 1323587 has been marked as a duplicate of this bug. ***

Comment 8 Karl Mikaelsson 2016-05-12 16:39:20 UTC
I did some git bisecting and found the commit in libsolv that introduced the error:

> d06562f7b70f6ceb7d52e717efd1963ce6e8ecf0 is the first bad commit
> commit d06562f7b70f6ceb7d52e717efd1963ce6e8ecf0
> Author: Michael Schroeder <mls>
> Date:   Mon Feb 29 13:49:48 2016 +0100
> 
>     Use less memory when extending packages
>     
>     Implement a hash instead of mis-using a string pool.

Comment 9 Karl Mikaelsson 2016-05-12 16:57:03 UTC
I've also tried to figure out why I can't reproduce any problems with a local (file://) repo - so far dnf seems to fail to "download" the filelist for no apparent reason. The repo that's causing problem is distributed over http:// (with http auth, so http://user:pass@host/path). I'm not sure if this is a contributing factor or not.

FWIW, the repo metadata has been regenerated since the bug report was filed but the problem persists.

Comment 10 Honza Silhan 2016-05-16 11:08:48 UTC
We will investigate whether the cause is because of usage of createrepo or anything else.

Comment 11 Michael Schröder 2016-05-17 09:26:21 UTC
Hey, if you get such a bug could you please also open a issue upstream so that I can take a look as well?

Fixed with 599c58bed474c2a68109ff0649f1effa7ff02c45 in libsolv.

Comment 12 Igor Gnatenko 2016-05-17 10:31:05 UTC
Will backport it into f23+.

Comment 13 Fedora Update System 2016-05-17 12:06:06 UTC
libsolv-0.6.20-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c46a2cafe7

Comment 14 Fedora Update System 2016-05-17 12:06:54 UTC
libsolv-0.6.20-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-301d205cce

Comment 15 Fedora Update System 2016-05-17 22:00:18 UTC
libsolv-0.6.20-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-301d205cce

Comment 16 Fedora Update System 2016-05-17 22:00:22 UTC
libsolv-0.6.20-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c46a2cafe7

Comment 17 Karl Mikaelsson 2016-05-18 08:24:41 UTC
libsolv-0.6.20-2.fc23 from updates-testing works great for me. Thanks!

Comment 18 Samuel 2016-05-19 08:02:40 UTC
libsolv version 0.6.20 works great for me as well! Using Fedora 23.

Comment 19 Fedora Update System 2016-05-20 17:36:37 UTC
libsolv-0.6.20-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2016-05-20 23:50:17 UTC
libsolv-0.6.20-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.