Bug 1382866

Summary: [abrt] dnf: rpmtrans.py:237:_extract_str_cbkey:AssertionError
Product: [Fedora] Fedora Reporter: José Matos <jamatos>
Component: dnfAssignee: rpm-software-management
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: high    
Version: 25CC: akadam, code, danielkza2, dominik, fedora, jamiemarchant47, jsilhan, ldavidfore, mluscon, packaging-team-maint, pmatilai, pnemade, rpm-software-management, ssmetana, vmukhame
Target Milestone: ---Keywords: EasyFix, Reopened, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/331245623056b0da6572d99b9ab164d195f79639
Whiteboard: abrt_hash:32bc228363199c62c1e5802fa8e6427358659d4d;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1382896 (view as bug list) Environment:
Last Closed: 2016-11-27 18:07:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: _var_log_dnf.log
none
File: backtrace
none
File: dnf-makecache.log
none
File: environ none

Description José Matos 2016-10-07 23:01:49 UTC
Description of problem:
installing texlive-scheme-full:

# dnf install texlive-scheme-full

Version-Release number of selected component:
dnf-1.1.10-2.fc25

Additional info:
reporter:       libreport-2.8.0
cmdline:        /usr/libexec/system-python /usr/bin/dnf install texlive-scheme-full
executable:     /usr/bin/dnf
kernel:         4.8.0-0.rc8.git0.1.fc25.x86_64
pkg_fingerprint: 4089 D8F2 FDB1 9C98
pkg_vendor:     Fedora Project
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
rpmtrans.py:237:_extract_str_cbkey:AssertionError

Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 427, in callback
    self._scriptError(bytes, total, h)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 557, in _scriptError
    pkg, _, _ = self._extract_cbkey(h)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 229, in _extract_cbkey
    return self._extract_str_cbkey(cbkey)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 237, in _extract_str_cbkey
    assert(isinstance(name, basestring))
AssertionError

Local variables in innermost frame:
name: None
self: <dnf.yum.rpmtrans.RPMTransaction object at 0x7ff6ae0c3a90>

Potential duplicate: bug 1323425

Comment 1 José Matos 2016-10-07 23:02:04 UTC
Created attachment 1208273 [details]
File: _var_log_dnf.log

Comment 2 José Matos 2016-10-07 23:02:06 UTC
Created attachment 1208274 [details]
File: backtrace

Comment 3 José Matos 2016-10-07 23:02:08 UTC
Created attachment 1208275 [details]
File: dnf-makecache.log

Comment 4 José Matos 2016-10-07 23:02:10 UTC
Created attachment 1208276 [details]
File: environ

Comment 5 José Matos 2016-10-07 23:04:46 UTC
At the end of installation I got:

var/tmp/rpm-tmp.pTTSYA: line 5: syntax error near unexpected token `else'
/var/tmp/rpm-tmp.pTTSYA: line 5: `      else'
warning: %triggerin(texlive-5:2016-6.20160520.fc25.x86_64) scriptlet failed, exit status 2
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 427, in callback
    self._scriptError(bytes, total, h)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 557, in _scriptError
    pkg, _, _ = self._extract_cbkey(h)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 229, in _extract_cbkey
    return self._extract_str_cbkey(cbkey)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 237, in _extract_str_cbkey
    assert(isinstance(name, basestring))
AssertionError
FATAL ERROR: python callback ??? failed, aborting!

Comment 6 Igor Gnatenko 2016-10-08 07:07:26 UTC
*** Bug 1323425 has been marked as a duplicate of this bug. ***

Comment 7 Igor Gnatenko 2016-10-08 07:07:28 UTC
*** Bug 1339101 has been marked as a duplicate of this bug. ***

Comment 8 Panu Matilainen 2016-10-10 05:43:39 UTC
Moral of the story: the transaction callback must never fail.
By all means log unexpected events and values from there in dnf but don't use assert() in code called by rpm.

Comment 9 Honza Silhan 2016-10-17 11:33:43 UTC
Yeah, as Panu writes. Thanks for the report, we will fix it.

Comment 10 Štěpán Smetana 2016-11-27 17:09:50 UTC
This Bug is fixed in upstream version: dnf-1.1.10-3.fc25

It was fixed in commit https://github.com/rpm-software-management/dnf/commit/507acfe3c0f81f253621d116a7474e1081d979f5 from 8 Dec 2015 which was merged to dnf on Jun 29, 2016

Comment 11 Igor Gnatenko 2016-11-27 17:16:27 UTC
(In reply to Štěpán Smetana from comment #10)
> This Bug is fixed in upstream version: dnf-1.1.10-3.fc25
> 
> It was fixed in commit
> https://github.com/rpm-software-management/dnf/commit/
> 507acfe3c0f81f253621d116a7474e1081d979f5 from 8 Dec 2015 which was merged to
> dnf on Jun 29, 2016

that's not true.

Comment 12 Igor Gnatenko 2016-11-27 18:07:53 UTC
(In reply to Igor Gnatenko from comment #11)
> (In reply to Štěpán Smetana from comment #10)
> > This Bug is fixed in upstream version: dnf-1.1.10-3.fc25
> > 
> > It was fixed in commit
> > https://github.com/rpm-software-management/dnf/commit/
> > 507acfe3c0f81f253621d116a7474e1081d979f5 from 8 Dec 2015 which was merged to
> > dnf on Jun 29, 2016
> 
> that's not true.
actually, it's a bit lie. It's fixed in DNF 2.0, not 1.1.x