Bug 1059149 - Segfault when working with a Sack copy
Summary: Segfault when working with a Sack copy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hawkey
Version: 20
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Honza Silhan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-29 09:54 UTC by Daniel Mach
Modified: 2014-07-09 02:30 UTC (History)
3 users (show)

Fixed In Version: dnf-plugins-core-0.1.1-2.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-09 02:30:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Daniel Mach 2014-01-29 09:54:37 UTC
Reproducer:

import copy
import dnf.base

dnfbase = dnf.base.Base()
dnfbase.fill_sack(load_system_repo=True, load_available_repos=False)

pkg = list(dnfbase.sack.query())[0]
dnfbase.sack.add_excludes([pkg])

dnfbase_copy = copy.deepcopy(dnfbase)

pkg = list(dnfbase_copy.sack.query())[0]
dnfbase_copy.sack.add_excludes([pkg])

Current behaviours:
Segmentation fault

Expected behaviour:
no segfault, package gets excluded as expected

RPM versions:
dnf-0.4.12-1.fc20.noarch
hawkey-0.4.8-1.fc20.x86_64
python-hawkey-0.4.8-1.fc20.x86_64

Comment 1 Ales Kozumplik 2014-01-29 09:59:40 UTC
Hi Dan, thanks for the report. I think nobody has tested deepcopy on the sack, so this might be a problem. We'll take a look but have to give it a low prio for now.

Comment 2 Honza Silhan 2014-05-30 12:47:27 UTC
Now attemp to do deepcopy on sack rises NotImplementedError. Copying libsolv handler is complicated and duplicating sacks is not good design pattern in code. The same could be achieved by queries with less memory consumption. If you wanna speed up query filters, feel free to open new issue tagged with "[perf]".

Comment 3 Fedora Update System 2014-07-07 09:11:58 UTC
dnf-plugins-core-0.1.1-2.fc20, dnf-0.5.3-1.fc20, hawkey-0.4.17-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.5.3-1.fc20,hawkey-0.4.17-1.fc20,dnf-plugins-core-0.1.1-2.fc20

Comment 4 Fedora Update System 2014-07-08 01:04:21 UTC
Package dnf-plugins-core-0.1.1-2.fc20, dnf-0.5.3-1.fc20, hawkey-0.4.17-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-plugins-core-0.1.1-2.fc20 dnf-0.5.3-1.fc20 hawkey-0.4.17-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-8167/dnf-0.5.3-1.fc20,hawkey-0.4.17-1.fc20,dnf-plugins-core-0.1.1-2.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-07-09 02:30:14 UTC
dnf-plugins-core-0.1.1-2.fc20, dnf-0.5.3-1.fc20, hawkey-0.4.17-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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