Bug 1369717

Summary: [abrt] system-python: rpmfnInit(): system-python killed by SIGSEGV
Product: [Fedora] Fedora Reporter: Igor Gnatenko <ignatenko>
Component: python3Assignee: Charalampos Stratakis <cstratak>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bkabrda, cstratak, mhroncok, pviktori, rkuska, tomspur, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/5a13308ebfec4bd6e37104f7a3bf373e5a7e22b1
Whiteboard: abrt_hash:b0241ae9968705496930b233b6a576c3df09ecf3;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-24 09:11:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: exploitable
none
File: limits
none
File: maps
none
File: mountinfo
none
File: namespaces
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages none

Description Igor Gnatenko 2016-08-24 08:36:14 UTC
Description of problem:
[root@ignatenko ~]# dnf update
Copr repo for rpm-gitoverlay owned by ignatenkobrain                                                                                                                               1.6 kB/s | 1.7 kB     00:01    
Fedora - Rawhide - Developmental packages for the next Fedora release                                                                                                              7.9 MB/s |  49 MB     00:06    
Failed to synchronize cache for repo 'rhpkg-rawhide', disabling.
Last metadata expiration check: 0:00:03 ago on Wed Aug 24 10:32:26 2016.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                               Arch                                     Version                                             Repository                                                Size
===================================================================================================================================================================================================================
Upgrading:
 glibc                                                 x86_64                                   2.24.90-4.fc26                                      rawhide                                                  3.3 M
 glibc-all-langpacks                                   x86_64                                   2.24.90-4.fc26                                      rawhide                                                  6.9 M
 glibc-common                                          x86_64                                   2.24.90-4.fc26                                      rawhide                                                  877 k
 glibc-devel                                           x86_64                                   2.24.90-4.fc26                                      rawhide                                                  937 k
 glibc-headers                                         x86_64                                   2.24.90-4.fc26                                      rawhide                                                  502 k
 glibc-langpack-en                                     x86_64                                   2.24.90-4.fc26                                      rawhide                                                  280 k
 glibc-langpack-ru                                     x86_64                                   2.24.90-4.fc26                                      rawhide                                                  269 k
 libcrypt-nss                                          x86_64                                   2.24.90-4.fc26                                      rawhide                                                   43 k
 libevdev                                              x86_64                                   1.5.3-1.fc26                                        rawhide                                                   38 k
 rfpkg                                                 noarch                                   1.24.0-2.fc26                                       rpmfusion-free-rawhide                                    41 k

Transaction Summary
===================================================================================================================================================================================================================
Upgrade  10 Packages

Total size: 13 M
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] glibc-2.24.90-4.fc26.x86_64.rpm: Already downloaded                                                                                                                                                     
[SKIPPED] glibc-common-2.24.90-4.fc26.x86_64.rpm: Already downloaded                                                                                                                                              
[SKIPPED] libcrypt-nss-2.24.90-4.fc26.x86_64.rpm: Already downloaded                                                                                                                                              
[SKIPPED] glibc-langpack-ru-2.24.90-4.fc26.x86_64.rpm: Already downloaded                                                                                                                                         
[SKIPPED] glibc-langpack-en-2.24.90-4.fc26.x86_64.rpm: Already downloaded                                                                                                                                         
[SKIPPED] glibc-headers-2.24.90-4.fc26.x86_64.rpm: Already downloaded                                                                                                                                             
[SKIPPED] glibc-devel-2.24.90-4.fc26.x86_64.rpm: Already downloaded                                                                                                                                               
[SKIPPED] glibc-all-langpacks-2.24.90-4.fc26.x86_64.rpm: Already downloaded                                                                                                                                       
[SKIPPED] libevdev-1.5.3-1.fc26.x86_64.rpm: Already downloaded                                                                                                                                                    
[SKIPPED] rfpkg-1.24.0-2.fc26.noarch.rpm: Already downloaded                                                                                                                                                      
Running transaction check
Segmentation fault (core dumped)

Version-Release number of selected component:
system-python-3.5.2-1.fc26

Additional info:
reporter:       libreport-2.7.2
backtrace_rating: 4
cmdline:        /usr/libexec/system-python /bin/dnf update
crash_function: rpmfnInit
executable:     /usr/libexec/system-python
global_pid:     2570
kernel:         4.8.0-0.rc2.git4.1.fc26.x86_64
pkg_vendor:     Fedora Project
runlevel:       N 5
type:           CCpp
uid:            0

Truncated backtrace:
Thread no. 1 (10 frames)
 #0 rpmfnInit at rpmfi.c:171
 #1 rpmfilesNew at rpmfi.c:1522
 #2 getFiles at rpmte.c:110
 #3 addTE at rpmte.c:173
 #4 rpmteNew at rpmte.c:241
 #5 addPackage at depends.c:438
 #6 rpmtsAddInstallElement at depends.c:493
 #7 rpmts_AddInstall at rpmts-py.c:183
 #8 PyCFunction_Call at /usr/src/debug/Python-3.5.2/Objects/methodobject.c:109
 #9 PyObject_Call at /usr/src/debug/Python-3.5.2/Objects/abstract.c:2165

Comment 1 Igor Gnatenko 2016-08-24 08:36:23 UTC
Created attachment 1193522 [details]
File: backtrace

Comment 2 Igor Gnatenko 2016-08-24 08:36:25 UTC
Created attachment 1193523 [details]
File: cgroup

Comment 3 Igor Gnatenko 2016-08-24 08:36:27 UTC
Created attachment 1193524 [details]
File: core_backtrace

Comment 4 Igor Gnatenko 2016-08-24 08:36:29 UTC
Created attachment 1193525 [details]
File: dso_list

Comment 5 Igor Gnatenko 2016-08-24 08:36:31 UTC
Created attachment 1193526 [details]
File: environ

Comment 6 Igor Gnatenko 2016-08-24 08:36:33 UTC
Created attachment 1193527 [details]
File: exploitable

Comment 7 Igor Gnatenko 2016-08-24 08:36:35 UTC
Created attachment 1193528 [details]
File: limits

Comment 8 Igor Gnatenko 2016-08-24 08:36:37 UTC
Created attachment 1193529 [details]
File: maps

Comment 9 Igor Gnatenko 2016-08-24 08:36:40 UTC
Created attachment 1193530 [details]
File: mountinfo

Comment 10 Igor Gnatenko 2016-08-24 08:36:42 UTC
Created attachment 1193531 [details]
File: namespaces

Comment 11 Igor Gnatenko 2016-08-24 08:36:43 UTC
Created attachment 1193532 [details]
File: open_fds

Comment 12 Igor Gnatenko 2016-08-24 08:36:45 UTC
Created attachment 1193533 [details]
File: proc_pid_status

Comment 13 Igor Gnatenko 2016-08-24 08:36:47 UTC
Created attachment 1193534 [details]
File: var_log_messages

Comment 14 Miro HronĨok 2016-08-24 08:56:24 UTC
Does this not happen with /usr/bin/python3 ?

Comment 15 Igor Gnatenko 2016-08-24 09:11:10 UTC
Root cause of this bug in kernel panic which happened during upgrade of glibc.

I did `dnf -y update` which wanted to update glibc, but in the middle of transaction everything got frozen. I was waiting a bit and then I rebooted.

After reboot everything worked fine except rpm. It was segfaulting on `rpm -V`, `rpm -e`, but worked with `rpm -q`.


Solution:
1. Download rpms as installed on system (but latest version) from sourcerpm glibc
2. Put downloaded rpms into /
3. cd /
4. for rpm in *.rpm; do rpm2cpio $rpm | cpio -dium; done
5. /sbin/ldconfig
6. reboot
7. rpm -q --dupes
8. rpm -e on duplicated packages
9. dnf -y update
10. dnf -y reinstall glibc\* libcrypto-nss

Comment 16 Igor Gnatenko 2016-08-24 09:12:28 UTC
Thanks to Florian Festi for help.

Comment 17 Igor Gnatenko 2016-08-24 09:17:35 UTC
> 10. dnf -y reinstall glibc\* libcrypto-nss
10. rpm -qp --queryformat="%{name} " /*.rpm | xargs dnf reinstall