Bug 1059149 - Segfault when working with a Sack copy
Summary: Segfault when working with a Sack copy
Alias: None
Product: Fedora
Classification: Fedora
Component: hawkey
Version: 20
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Honza Silhan
QA Contact: Fedora Extras Quality Assurance
Depends On:
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:
Last Closed: 2014-07-09 02:30:14 UTC
Type: Bug

Attachments (Terms of Use)

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

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_copy = copy.deepcopy(dnfbase)

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

Current behaviours:
Segmentation fault

Expected behaviour:
no segfault, package gets excluded as expected

RPM versions:

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.

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:
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.