Red Hat Bugzilla – Bug 1175662
[abrt] gnome-abrt: XCloseDisplay(): cannot open and close a display
Last modified: 2016-11-03 23:05:41 EDT
Description of problem: I run a python script testing whether it is possible to open and close display while I was logged via ssh -X into a ppc64 machine. See bug #1020505 for more details. Version-Release number of selected component: gnome-abrt-0.3.4-6.el7 Additional info: reporter: libreport-2.1.11 backtrace_rating: 4 cmdline: /usr/bin/python /usr/bin/gnome-abrt crash_function: XCloseDisplay executable: /usr/bin/python2.7 kernel: 3.10.0-210.el7.ppc64 machineid: systemd=cd2dd5749b584a59ab5f52d6bfd3f560 runlevel: N 3 type: CCpp uid: 0 Truncated backtrace: Thread no. 1 (10 frames) #0 XCloseDisplay at ClDisplay.c:51 #1 .ffi_call_LINUX64 at ../src/powerpc/linux64.S:116 #2 ffi_call at ../src/powerpc/ffi.c:985 #3 _call_function_pointer at /usr/src/debug/Python-2.7.5/Modules/_ctypes/callproc.c:832 #4 _ctypes_callproc at /usr/src/debug/Python-2.7.5/Modules/_ctypes/callproc.c:1179 #5 PyCFuncPtr_call at /usr/src/debug/Python-2.7.5/Modules/_ctypes/_ctypes.c:3929 #6 PyObject_Call at /usr/src/debug/Python-2.7.5/Objects/abstract.c:2529 #7 do_call at /usr/src/debug/Python-2.7.5/Python/ceval.c:4316 #8 call_function at /usr/src/debug/Python-2.7.5/Python/ceval.c:4121 #9 PyEval_EvalFrameEx at /usr/src/debug/Python-2.7.5/Python/ceval.c:2740
Created attachment 970466 [details] File: backtrace
Created attachment 970467 [details] File: cgroup
Created attachment 970468 [details] File: core_backtrace
Created attachment 970469 [details] File: dso_list
Created attachment 970470 [details] File: environ
Created attachment 970471 [details] File: limits
Created attachment 970472 [details] File: maps
Created attachment 970473 [details] File: open_fds
Created attachment 970474 [details] File: proc_pid_status
Created attachment 970475 [details] File: var_log_messages
Created attachment 970476 [details] File: sosreport.tar.xz
*** Bug 1175643 has been marked as a duplicate of this bug. ***
While I can reproduce the crash, I am not entirely convinced the problem really lies in libX11/libxcb. According to the backtrace in comment #0, the segfault occurs in XCloseDisplay() at line 51 of ClDisplay.c which reads: 44 int 45 XCloseDisplay ( 46 register Display *dpy) 47 { 48 register _XExtension *ext; 49 register int i; 50 51 ==> if (!(dpy->flags & XlibDisplayClosing)) 52 { We can reasonably think that dpy is pointing to either 0 or a wrong address, thus the segfault when trying to access dpy->flags That would mean the problem lies in the caller instead, not in the library, or else XOpenDisplay() does not return a valid display address, in which case all X11 programs would fail on PPC (which is not the case, AFAIK). So it could be a problem with Python and dlopen() of a library on ppc64.
The core file shows dpy is not null, so most likely pointing to a wrong address. #0 XCloseDisplay (dpy=0x283b1dd0) at ClDisplay.c:51
Created attachment 1040519 [details] Test program in plain C I think it's a problem with Python, the exact same program written in plain C (using dlopen on libX11) works just fine.
We have fixed the crash in gnome-abrt upstream by moving the check from Python code to C wrappers: https://github.com/abrt/gnome-abrt/commit/5dcf9097cdfa68087569e13f9e8c2eb2eba8250f because the crash started appearing in Fedora Rawhide (bug #1188002). If there is no interest in finding out the root cause of this crash, we can re-assign this bug report to gnome-abrt.
Created attachment 1127897 [details] Patch I backported the upstream patch https://github.com/abrt/gnome-abrt/commit/5dcf9097cdfa68087569e13f9e8c2eb2eba8250f
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2307.html