Bug 1393595 - DNF 2.0rc1 segfaults when attempting to undo or redo a transaction
Summary: DNF 2.0rc1 segfaults when attempting to undo or redo a transaction
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Michal Luscon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-09 23:05 UTC by Neal Gompa
Modified: 2016-12-07 03:50 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-07 03:50:47 UTC
Type: Bug


Attachments (Terms of Use)
Backtrace of dnf history undo 81 (8.43 KB, text/plain)
2016-11-10 12:33 UTC, Neal Gompa
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Mageia 19744 0 None None None 2016-11-09 23:05:39 UTC

Description Neal Gompa 2016-11-09 23:05:39 UTC
Description of problem:
Whenever attempting to undo or redo a specific transaction by ID number, DNF crashes with a segmentation fault. Listing transactions or getting info on a transaction does not cause a segfault.

Name-Version-Release of components (if applicable):
dnf-2.0.0-0.0.1.rc1.mga6 (= dnf-2.0.0-0.rc1.4.fc26)
libdnf-0.7.0-0.0.1.20161010.git.817d2a1.mga6
libdnf-0.7.0-0.0.2.20161108.git.f102fd3.mga6

How reproducible:
Always

Steps to Reproduce:
1. Install something with DNF
2. Get the transaction ID of the transaction with "dnf history list"
3. Use "dnf history undo <ID>" or "dnf history redo <ID>"

Actual results:
Crashes with "Segmentation fault"

Expected results:
Does the redo/undo operation with the transaction

Additional info:
This issue was discovered on Mageia Cauldron using the DNF 2.0 Copr for Cauldron[1]. The "last" keyword wasn't used because of bug 1393594.

[1]: https://copr.fedorainfracloud.org/coprs/ngompa/dnf2-mga/

Comment 1 Igor Gnatenko 2016-11-10 05:42:24 UTC
Please provide backtrace.

Comment 2 Neal Gompa 2016-11-10 12:33:05 UTC
Created attachment 1219368 [details]
Backtrace of dnf history undo 81

Backtrace generated from running: "sudo gdb -ex r --args python3 /usr/bin/dnf history undo 81 | tee dnfhistoryundo.txt"

Comment 3 Michal Luscon 2016-11-18 09:18:24 UTC
*** Bug 1393594 has been marked as a duplicate of this bug. ***

Comment 4 Michal Luscon 2016-11-18 11:06:33 UTC
Take a look at https://github.com/rpm-software-management/libhif/pull/213

Comment 5 Neal Gompa 2016-11-18 14:00:13 UTC
I locally applied the patch and attempted the test case again, and I was able to undo and redo transactions.

Comment 6 Neal Gompa 2016-12-07 03:50:47 UTC
Fixed in dnf 2.0 rc2.


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