Bug 1747901
Summary: | ipactl command for ipa.service segfaults on process exit. | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Christian Heimes <cheimes> |
Component: | python3 | Assignee: | Charalampos Stratakis <cstratak> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | awilliam, cstratak, dmalcolm, jpazdziora, lslebodn, m.cyprian, mhroncok, pviktori, rkuska, robatino, shcherbina.iryna, slavek.kabrda, tomspur, torsava, vstinner |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | openqa | ||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-10-07 15:56:28 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: | 1705303 |
Description
Christian Heimes
2019-09-02 08:50:27 UTC
It looks like the func object is the local remove function of weakref.WeakValueDictionary() implementation, https://github.com/python/cpython/blob/353053d9ad08fea0e205e6c008b8a4350c0188e6/Lib/weakref.py#L90-L112 All function object fields except func_qualname and vectorcall are already NULL. (gdb) print ((PyFunctionObject*)func).func_annotations $19 = 0x0 (gdb) print ((PyFunctionObject*)func).func_closure $20 = 0x0 (gdb) print ((PyFunctionObject*)func).func_code $21 = 0x0 (gdb) print ((PyFunctionObject*)func).func_defaults $22 = 0x0 (gdb) print ((PyFunctionObject*)func).func_dict $23 = 0x0 (gdb) print ((PyFunctionObject*)func).func_doc $24 = 0x0 (gdb) print ((PyFunctionObject*)func).func_globals $25 = 0x0 (gdb) print ((PyFunctionObject*)func).func_kwdefaults $26 = 0x0 (gdb) print ((PyFunctionObject*)func).func_module $27 = 0x0 (gdb) print ((PyFunctionObject*)func).func_name $28 = 0x0 (gdb) print ((PyFunctionObject*)func).func_qualname $29 = 'WeakValueDictionary.__init__.<locals>.remove' (gdb) print ((PyFunctionObject*)func).func_weakreflist $30 = 0x0 (gdb) print ((PyFunctionObject*)func).vectorcall $31 = (vectorcallfunc) 0x7ffff7be3530 <_PyFunction_Vectorcall> (gdb) print func.ob_refcnt $32 = 135 (gdb) print func.ob_type $33 = (struct _typeobject *) 0x7ffff7dd4e80 <PyFunction_Type> The crash occurs because PyFunction_GET_CODE(func) returns NULL and _PyFunction_Vectorcall() uses the code object without checking for a NULL code object. Victor and Pablo have analysed the issue and think that it might be related to a problem in CFFI, too. I have opened https://bitbucket.org/cffi/cffi/issues/416/python-38-segfault-cfield_type-does-not against CFFI. Armin Rigo is looking into the problem. I'll open a RHBZ against CFFI after CFFI upstream decides it's a bug. I'm still investigating the complex garbage collector issue. It seems like the root issue is a bug in Python itself. *** Bug 1747913 has been marked as a duplicate of this bug. *** openQA is seeing this also, now https://bugzilla.redhat.com/show_bug.cgi?id=1745450 is fixed in Rawhide. This blocks F32 Beta, as it prevents FreeIPA server deployment/operation from working. Victor Stinner has pushed a workaround for the segfault upstream, https://github.com/python/cpython/pull/15787 The patch does not address the root cause, but it gets rid of the segfault. I also pushed another change which change one of the root issues (there are multiple root issues, it's a complex bug): I removed func_clear() function which was added in Python 3.8. https://github.com/python/cpython/pull/15826 The fix will be part of next Python 3.8.0rc1 release (expected release date: 2019-09-30). With python3-3.8.0~rc1-1.fc32.x86_64 I no longer see the failure: https://travis-ci.org/adelton/freeipa-container/jobs/594119521 Yeah, openQA server deployment is working again now too. Though it seems webUI login always fails, I'll need to look into that. |