Bug 1499514

Summary: Cannot system-upgrade 26→27 - "Error in `/usr/libexec/system-python': free(): invalid pointer: 0x00007f1c8bb31e20 "
Product: [Fedora] Fedora Reporter: Gwendal <ezwen-redhatbugzilla>
Component: dnf-plugin-system-upgradeAssignee: Orphan Owner <extras-orphan>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: chemobejk, erik.bartos, extras-orphan, filbar, kparal, robatino
Target Milestone: ---   
Target Release: ---   
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: 2017-10-09 08:00:04 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:
Bug Depends On:    
Bug Blocks: 1396704    
Attachments:
Description Flags
Logs
none
/usr/libexec/system-python crash extracted from system log none

Description Gwendal 2017-10-08 08:49:42 UTC
Created attachment 1335817 [details]
Logs

Description of problem:

I have tried to upgrade from Fedora 26 to Fedora 27 beta. There seems to be a crash very early in the process


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


How reproducible: Always


Steps to Reproduce:
- sudo dnf upgrade --refresh -y
- sudo dnf install dnf-plugin-system-upgrade -y
- sudo dnf system-upgrade download --refresh --releasever=27
- sudo dnf system-upgrade reboot


Actual results:

It reboots, displays loads of logs, and reboots back into the non-upgraded system rather quickly.


Expected results:

The upgrade should be done.

Additional info:

I have found the corresponding logs by running "sudo dnf system-upgrade log --number=3". Please find them attached. 
In particular, we can find this (I just removed the name of the computer):

oct. 08 10:26:21 systemd[1]: Received SIGRTMIN+20 from PID 382 (plymouthd).
oct. 08 10:26:30 dnf[970]: *** Error in `/usr/libexec/system-python': free(): invalid pointer: 0x00007f1c8bb31e20 ***
oct. 08 10:26:30 dnf[970]: ======= Backtrace: =========
oct. 08 10:26:30 dnf[970]: /lib64/libc.so.6(+0x7c8dc)[0x7f1c8a9728dc]
oct. 08 10:26:30 dnf[970]: /lib64/libc.so.6(+0x87789)[0x7f1c8a97d789]
oct. 08 10:26:30 dnf[970]: /lib64/libc.so.6(cfree+0x16e)[0x7f1c8a9830ee]
oct. 08 10:26:30 dnf[970]: /lib64/libpython3.6m.so.1.0(+0x10a068)[0x7f1c8b70d068]
oct. 08 10:26:30 dnf[970]: /lib64/libpython3.6m.so.1.0(+0x1827fe)[0x7f1c8b7857fe]
oct. 08 10:26:30 dnf[970]: /lib64/libpython3.6m.so.1.0(+0x109aa7)[0x7f1c8b70caa7]
oct. 08 10:26:30 dnf[970]: /lib64/libpython3.6m.so.1.0(+0x11a0f6)[0x7f1c8b71d0f6]
oct. 08 10:26:30 dnf[970]: /lib64/libpython3.6m.so.1.0(+0x14cda1)[0x7f1c8b74fda1]

.... (and it keeps going)

Comment 1 Stefan Becker 2017-10-08 15:22:54 UTC
Created attachment 1335907 [details]
/usr/libexec/system-python crash extracted from system log

I can confirm this bug. I just tried to update my fully updated F26 x86_64 system to F27 beta. Setting up the ugprade and rebooting works fine, but dnf crashes a few seconds after the "Starting system upgrade ..." message appears.

I've tried several times, with different parameters (--no-downgrade or --allowerasing, even started over with "clean"), to no avail. I doubt that the list of packages to upgrade are the root cause for this.

I've attached the output from "journalctl --boot=-1 -t dnf" which shows the same crash in free() as the original reporter has seen.

Needless to say that I consider this a SHOWSTOPPER bug for Fedora 27.

Comment 2 Fedora Blocker Bugs Application 2017-10-08 15:30:51 UTC
Proposed as a Blocker for 27-final by Fedora user stefanb using the blocker tracking app because:

 dnf system-upgrade F26 -> F27 needs to work for people that already have F26 installed. Re-installing is not an option.

Comment 3 Stefan Becker 2017-10-08 16:12:47 UTC
After adding my comments to this bug I ran "dnf update --refresh" again and another dnf update for F26 arrived:

dnf-conf-2.7.3-1.fc26.noarch
dnf-2.7.3-1.fc26.noarch
dnf-plugins-core-2.1.5-1.fc26.noarch
dnf-yum-2.7.3-1.fc26.noarch
python3-dnf-2.7.3-1.fc26.noarch
python3-dnf-plugins-core-2.1.5-1.fc26.noarch

I tried system-upgrade again, but the crash remains.

I'm not sure if this bug is assigned to the correct package, as system-python is crashing not the dnf plugin:

# rpm -qf /usr/libexec/system-python
system-python-3.6.2-7.fc26.x86_64

Comment 4 Kamil Páral 2017-10-09 08:00:04 UTC
Thanks, this is almost certainly the same as bug 1498207.

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