Bug 1771647

Summary: microdnf command exits on SIGPIPE without any visible error
Product: Red Hat Enterprise Linux 8 Reporter: Tomáš Golembiovský <tgolembi>
Component: microdnfAssignee: Lukáš Hrázký <lhrazky>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: high    
Version: 8.0CC: dmach, lhrazky
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-18 12:21:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomáš Golembiovský 2019-11-12 18:07:20 UTC
Recently microdnf in ubi8 container started silently dying with exit code 141 but without any visible error reported. Last reported message is always "Running transaction test...". It looks like the exit is caused by unhandled SIGPIPE in librpm. So maybe it is an rpm issue. Whether it is related to any repository setup I cannot tell.

The command  was:

    /bin/microdnf -y --setopt=tsflags=nodocs install python3-openstackclient

Here are the last lines of the command output and the backtrace:

Transaction Summary:
 Installing:       97 packages
 Reinstalling:      0 packages
 Upgrading:         0 packages
 Removing:          0 packages
 Downgrading:       0 packages
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
Running transaction test...

Thread 1 "microdnf" hit Breakpoint 1, 0x00007ffff64fe180 in exit () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff64fe180 in exit () from /lib64/libc.so.6
#1  0x00007ffff3d48684 in rpmsqTerm (signum=13, info=info@entry=0x7ffff3f5f658 <rpmsigTbl+1240>, context=context@entry=0x0) at rpmsq.c:40
#2  0x00007ffff3d48b77 in rpmsqPoll () at rpmsq.c:163
#3  0x00007ffff3f86b58 in rpmdbIndexIteratorInit (db=0x555555920e40, rpmtag=rpmtag@entry=RPMDBI_CONFLICTNAME) at rpmdb.c:1876
#4  0x00007ffff3f8ce48 in addIndexToDepHashes (ts=ts@entry=0x555555920a10, tag=tag@entry=RPMDBI_CONFLICTNAME, filehash=filehash@entry=0x5555565f2bd0, 
    depnothash=depnothash@entry=0x5555565f8070, filenothash=filenothash@entry=0x5555565f4b70, dephash=0x0) at depends.c:953
#5  0x00007ffff3f8ed1f in rpmtsCheck (ts=0x555555920a10) at depends.c:1021
#6  0x00007ffff6fa04ea in dnf_transaction_commit (transaction=0x5555559250c0, goal=0x555556607360, state=0x55555580e9e0, error=error@entry=0x7fffffffeba0)
    at /usr/src/debug/libdnf-0.35.1-9.el8_1.x86_64/libdnf/dnf-transaction.cpp:1349
#7  0x00007ffff6f89ea8 in dnf_context_run (context=context@entry=0x55555580c140, cancellable=cancellable@entry=0x0, error=error@entry=0x7fffffffeba0)
    at /usr/src/debug/libdnf-0.35.1-9.el8_1.x86_64/libdnf/dnf-context.cpp:2009
#8  0x0000555555559889 in dnf_command_install_run (cmd=<optimized out>, argc=<optimized out>, argv=<optimized out>, opt_ctx=<optimized out>, ctx=0x55555580c140, 
    error=0x7fffffffeba0) at ../dnf/plugins/install/dnf-command-install.c:80
#9  0x00005555555588ba in main (argc=<optimized out>, argv=<optimized out>) at ../dnf/dnf-command.h:27


While downloading the metadata there were multiple SIGPIPE signals received here:

Thread 1 "microdnf" received signal SIGPIPE, Broken pipe.                                                                                                                    
0x00007ffff6898ae7 in write () from /lib64/libpthread.so.0                                                                                                                   
(gdb) bt                                                                                                                                                                     
#0  0x00007ffff6898ae7 in write () from /lib64/libpthread.so.0                                                                                                               
#1  0x00007ffff337f44a in _gpgme_io_write () from /lib64/libgpgme.so.11                                                                                                      
#2  0x00007ffff336e375 in my_write () from /lib64/libgpgme.so.11                                                                                                             
#3  0x00007fffeec5c219 in writen () from /lib64/libassuan.so.0                                                                                                               
#4  0x00007fffeec5c937 in _assuan_write_line () from /lib64/libassuan.so.0                                                                                                   
#5  0x00007fffeec5ba04 in _assuan_client_release () from /lib64/libassuan.so.0                                                                                               
#6  0x00007fffeec5a266 in _assuan_reset () from /lib64/libassuan.so.0                                                                                                        
#7  0x00007fffeec5a2b9 in assuan_release () from /lib64/libassuan.so.0                                                                                                       
#8  0x00007ffff3377959 in llass_cancel () from /lib64/libgpgme.so.11                                                                                                         
#9  0x00007ffff33789b2 in llass_release () from /lib64/libgpgme.so.11                                                                                                        
#10 0x00007ffff336f25f in _gpgme_engine_release () from /lib64/libgpgme.so.11                                                                                                
#11 0x00007ffff3384698 in gpgme_release () from /lib64/libgpgme.so.11                                                                                                        
#12 0x00007ffff4b8241b in lr_gpg_import_key () from /lib64/librepo.so.0                                                                                                      
#13 0x00007ffff6f96e55 in dnf_repo_download_import_public_key (error=0x7fffffffe910,                                                                                         
    key_tmp=0x555555f25ff0 "/var/cache/yum/metadata/ubi-8-codeready-builder-8-x86_64.tmp/RPM-GPG-KEY-redhat-release", gpgkey=<optimized out>, repo=0x5555558d73a0)           
    at /usr/src/debug/libdnf-0.35.1-9.el8_1.x86_64/libdnf/dnf-repo.cpp:1603                                                                                                  
#14 dnf_repo_update (repo=repo@entry=0x5555558d73a0, flags=flags@entry=DNF_REPO_UPDATE_FLAG_FORCE, state=state@entry=0x55555580eba0, error=error@entry=0x7fffffffe910)       
    at /usr/src/debug/libdnf-0.35.1-9.el8_1.x86_64/libdnf/dnf-repo.cpp:1731                                                                                                  
#15 0x00007ffff6f841a2 in dnf_sack_add_repo (sack=sack@entry=0x5555558910b0, repo=repo@entry=0x5555558d73a0, permissible_cache_age=permissible_cache_age@entry=0,            
    flags=flags@entry=DNF_SACK_ADD_FLAG_FILELISTS, state=0x55555580ec80, error=error@entry=0x7fffffffeba0)                                                                   
    at /usr/src/debug/libdnf-0.35.1-9.el8_1.x86_64/libdnf/dnf-sack.cpp:2122                                                                                                  
#16 0x00007ffff6f8448a in dnf_sack_add_repos (sack=0x5555558910b0, repos=0x55555585d080, permissible_cache_age=0, flags=DNF_SACK_ADD_FLAG_FILELISTS,                         
    state=state@entry=0x55555580e900, error=error@entry=0x7fffffffeba0) at /usr/src/debug/libdnf-0.35.1-9.el8_1.x86_64/libdnf/dnf-sack.cpp:2221                              
#17 0x00007ffff6f8c67f in dnf_context_setup_sack_with_flags (context=<optimized out>, state=0x55555580e900, flags=DNF_CONTEXT_SETUP_SACK_FLAG_NONE, error=0x7fffffffeba0)    
    at /usr/src/debug/libdnf-0.35.1-9.el8_1.x86_64/libdnf/dnf-context.cpp:1486                                                                                               
#18 0x00007ffff6f8ca33 in dnf_context_install (context=context@entry=0x55555580c140, name=0x55555592c5e0 "python3-openstackclient", error=error@entry=0x7fffffffeba0)        
    at /usr/src/debug/libdnf-0.35.1-9.el8_1.x86_64/libdnf/dnf-context.cpp:2047                                                                                               
#19 0x000055555555980b in dnf_command_install_run (cmd=<optimized out>, argc=<optimized out>, argv=<optimized out>, opt_ctx=<optimized out>, ctx=0x55555580c140,             
    error=0x7fffffffeba0) at ../dnf/plugins/install/dnf-command-install.c:73                                                                                                 
#20 0x00005555555588ba in main (argc=<optimized out>, argv=<optimized out>) at ../dnf/dnf-command.h:27                                                                       

Whether this is the root cause or whether it was handled properly I don't know.


Version-Release number of selected component (if applicable):

dnf-data-4.2.7-7.el8_1.noarch
dnf-plugins-core-4.0.8-3.el8.noarch
libdnf-0.35.1-9.el8_1.x86_64
libdnf-debuginfo-0.35.1-9.el8_1.x86_64
libdnf-debugsource-0.35.1-9.el8_1.x86_64
microdnf-3.0.1-3.el8.x86_64
microdnf-debuginfo-3.0.1-3.el8.x86_64
microdnf-debugsource-3.0.1-3.el8.x86_64
python3-dnf-4.2.7-7.el8_1.noarch
python3-dnf-plugins-core-4.0.8-3.el8.noarch
python3-libdnf-0.35.1-9.el8_1.x86_64
rpm-4.14.2-25.el8.x86_64
rpm-build-libs-4.14.2-25.el8.x86_64
rpm-debuginfo-4.14.2-25.el8.x86_64
rpm-debugsource-4.14.2-25.el8.x86_64
rpm-libs-4.14.2-25.el8.x86_64
rpm-libs-debuginfo-4.14.2-25.el8.x86_64
rpm-plugin-systemd-inhibit-4.14.2-25.el8.x86_64

Comment 1 Lukáš Hrázký 2019-11-18 12:21:50 UTC

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