Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1680160 - sudo dnf upgrade --refresh traceback
Summary: sudo dnf upgrade --refresh traceback
Keywords:
Status: CLOSED DUPLICATE of bug 1672947
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 29
Hardware: aarch64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-22 21:04 UTC by Ludovic Hirlimann [:Paul-muadib]
Modified: 2019-02-23 11:47 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-23 11:45:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ludovic Hirlimann [:Paul-muadib] 2019-02-22 21:04:32 UTC
Running sudo dnf upgrade --refresh

spitted the following today :

Cleanup          : libxcrypt-4.4.2-6.fc29.aarch64                      95/102 
  Cleanup          : systemd-libs-239-11.git4dc7dce.fc29.aarch64         96/102 
  Cleanup          : systemd-pam-239-11.git4dc7dce.fc29.aarch64          97/102 
  Cleanup          : p11-kit-0.23.14-2.fc29.aarch64                      98/102 
  Running scriptlet: p11-kit-0.23.14-2.fc29.aarch64                      98/102 
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/dnf/yum/rpmtrans.py", line 260, in callback
    self._elemProgress(key, amount)
  File "/usr/lib/python3.7/site-packages/dnf/yum/rpmtrans.py", line 303, in _elemProgress
    transaction_list = self._extract_cbkey(key)
  File "/usr/lib/python3.7/site-packages/dnf/yum/rpmtrans.py", line 244, in _extract_cbkey
    raise RuntimeError("TransactionItem not found for key: %s" % cbkey)
RuntimeError: TransactionItem not found for key: p11-kit

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/dnf/yum/rpmtrans.py", line 272, in callback
    self._uninst_progress(amount, total, key)
  File "/usr/lib/python3.7/site-packages/dnf/yum/rpmtrans.py", line 356, in _uninst_progress
    transaction_list = self._extract_cbkey(key)
  File "/usr/lib/python3.7/site-packages/dnf/yum/rpmtrans.py", line 244, in _extract_cbkey
    raise RuntimeError("TransactionItem not found for key: %s" % cbkey)
RuntimeError: TransactionItem not found for key: p11-kit

Comment 1 Brendan Shephard 2019-02-23 10:58:26 UTC
This is the same issue we're seeing on Rawhide here: https://bugzilla.redhat.com/show_bug.cgi?id=1672947

From what I can see, we're looking at this function:
https://github.com/rpm-software-management/dnf/blob/master/dnf/yum/rpmtrans.py#L222-L244

90% of the time, it appears to exit during the first if statement. But in the events where it makes it past, it seems to have nothing to push to the items list:

        items = []
        for tsi in self.base.transaction:
            if tsi.action == libdnf.transaction.TransactionItemAction_REINSTALL:   
                # skip REINSTALL in order to return REINSTALLED
                continue
            if str(tsi) == te_nevra:
                items.append(tsi)  <<< ---- Seems like nothing happens here so items is still null.
        if items:                 
            self._tsi_cache = items
            return items
        raise RuntimeError("TransactionItem not found for key: %s" % cbkey)

So it must be this part that is failing:

        te = self._te_list[self._te_index]
        te_nevra = dnf.util._te_nevra(te)


We can try: except: it to remove the traceback from stdout and send it to logger instead. On my original BZ, I suggested a pretty broad try, except, but we could be more specific and just wrap it around the final if statement which should improve user experience.

Ultimately, this error doesn't seem to be fatal. But it would be nice to understand what is failing. I haven't started digging into _te_nevra() yet so that's all I have at the moment.

Comment 2 Ludovic Hirlimann [:Paul-muadib] 2019-02-23 11:45:07 UTC
(In reply to Brendan Shephard from comment #1)
> This is the same issue we're seeing on Rawhide here:
> https://bugzilla.redhat.com/show_bug.cgi?id=1672947

Sorry failed to find it.

*** This bug has been marked as a duplicate of bug 1672947 ***

Comment 3 Brendan Shephard 2019-02-23 11:47:57 UTC
(In reply to Ludovic Hirlimann [:Paul-muadib] from comment #2)
> (In reply to Brendan Shephard from comment #1)
> > This is the same issue we're seeing on Rawhide here:
> > https://bugzilla.redhat.com/show_bug.cgi?id=1672947
> 
> Sorry failed to find it.
> 
> *** This bug has been marked as a duplicate of bug 1672947 ***

Hey mate. 

All good. I was leaving it open since this has been raised against Fedora 29 and the other is Rawhide. 

I'll make a note on the other one that we're also seeing the issue on Fedora 29 as well and copy the info over to there for you.


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