Bug 1020505 - cannot open and close a display from a python script
cannot open and close a display from a python script
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: libX11 (Show other bugs)
20
ppc64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Adam Jackson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-17 15:26 EDT by Mark Hamzy
Modified: 2014-11-18 11:37 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-11-18 11:37:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
abrt tar file (2.21 MB, application/x-gzip)
2013-10-17 15:29 EDT, Mark Hamzy
no flags Details
A python script which opens and closes X display (388 bytes, text/x-python)
2013-10-18 09:30 EDT, Jakub Filak
no flags Details
log.strace (125.67 KB, text/plain)
2013-10-18 16:31 EDT, Mark Hamzy
no flags Details

  None (edit)
Description Mark Hamzy 2013-10-17 15:26:18 EDT
Description of problem:


Version-Release number of selected component (if applicable):
gnome-abrt-0.3.2-1.fc20.ppc64

How reproducible:
Always

Steps to Reproduce:
1. Run KDE

Additional info:

Core was generated by `/usr/bin/python /usr/bin/gnome-abrt -p /var/tmp/abrt/ccpp-2013-10-17-10:59:43-2'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  XCloseDisplay (dpy=0x36581750) at ClDisplay.c:51
51		if (!(dpy->flags & XlibDisplayClosing))
(gdb) bt
#0  XCloseDisplay (dpy=0x36581750) at ClDisplay.c:51
#1  0x00001fffff86804c in 00000010.plt_call.strchr@@GLIBC_2.3+0 () at ../src/powerpc/linux64.S:116
#2  0x00001fffff867778 in ffi_call (cif=<error reading variable: value has been optimized out>, fn=<optimized out>, 
    rvalue=0x3fffe18bd540, avalue=0x3fffe18bd520) at ../src/powerpc/ffi.c:985
#3  0x00001ffff8bbadb4 in _call_function_pointer (argcount=1, resmem=0x3fffe18bd540, restype=0x10036621520, 
    atypes=<optimized out>, avalues=0x3fffe18bd520, pProc=@0x1ffff8352ff8: 0x1ffff81ea4c0 <XCloseDisplay>, flags=4353)
    at /usr/src/debug/Python-2.7.5/Modules/_ctypes/callproc.c:832
#4  _ctypes_callproc (pProc=@0x1ffff8352ff8: 0x1ffff81ea4c0 <XCloseDisplay>, argtuple=<optimized out>, flags=<optimized out>, 
    argtypes=<optimized out>, restype=<_ctypes.PyCSimpleType at remote 0x10036621050>, checker=0x0)
    at /usr/src/debug/Python-2.7.5/Modules/_ctypes/callproc.c:1179
#5  0x00001ffff8bad884 in PyCFuncPtr_call (self=0x1ffff8e75d50, inargs=(911742800,), kwds=0x0)
    at /usr/src/debug/Python-2.7.5/Modules/_ctypes/_ctypes.c:3929
#6  0x00001fffffd44534 in PyObject_Call (func=<_FuncPtr(__name__='XCloseDisplay') at remote 0x1ffff8e75d50>, arg=<optimized out>, 
    kw=<optimized out>) at /usr/src/debug/Python-2.7.5/Objects/abstract.c:2529
#7  0x00001fffffe45b2c in do_call (nk=<optimized out>, na=1, pp_stack=0x3fffe18bd890, func=<optimized out>)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4316
#8  call_function (oparg=<optimized out>, pp_stack=0x3fffe18bd890) at /usr/src/debug/Python-2.7.5/Python/ceval.c:4121
#9  PyEval_EvalFrameEx (f=Frame 0x10036506780, for file /usr/bin/gnome-abrt, line 41, in <module> (), throwflag=<optimized out>)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:2740
#10 0x00001fffffe4c8d4 in PyEval_EvalCodeEx (co=0x1fffff7d5930, globals=<optimized out>, locals=<optimized out>, 
    args=<optimized out>, argcount=<optimized out>, kws=<optimized out>, kwcount=<optimized out>, defs=0x0, defcount=0, 
    closure=0x0) at /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
#11 0x00001fffffe4c9ec in PyEval_EvalCode (co=<optimized out>, globals=<optimized out>, locals=<optimized out>)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:689
#12 0x00001fffffe83b40 in run_mod (arena=0x100364978e0, flags=<optimized out>, 
    locals={'util': <module at remote 0x100365cc478>, 'logging': <module at remote 0x1ffff8e91d38>, 'signal': <module at remote 0x1fffff915a60>, '__builtins__': <module at remote 0x1fffff8e1b08>, 'cdll': <LibraryLoader(_dlltype=<type at remote 0x1003662b0b0>) at remote 0x100365e0b50>, '__file__': '/usr/bin/gnome-abrt', 'traceback': <module at remote 0x1fffff8224e8>, 'XLIB_PATH': 'libX11.so.6', 'ArgumentParser': <type at remote 0x100365b0e50>, '__package__': None, 'sys': <module at remote 0x1fffff8e1bb0>, 'XLIB': <CDLL(_FuncPtr=<_ctypes.PyCFuncPtrType at remote 0x1003663c7f0>, XCloseDisplay=<_FuncPtr(__name__='XCloseDisplay') at remote 0x1ffff8e75d50>, XOpenDisplay=<_FuncPtr(__name__='XOpenDisplay') at remote 0x1ffff8e75c80>, _handle=1100424138800, _name='libX11.so.6') at remote 0x10036540e50>, 'DISPLAY': 911742800, '__name__': '__main__', 'os': <module at remote 0x1fffff899d00>, '__doc__': None}, 
    globals={'util': <module at remote 0x100365cc478>, 'logging': <module at remote 0x1ffff8e91d38>, 'signal': <module at remote 0x1fffff915a60>, '__builtins__': <module at remote 0x1fffff8e1b08>, 'cdll': <LibraryLoader(_dlltype=<type at remote 0x1003662b0b0>) at remote 0x100365e0b50>, '__file__': '/usr/bin/gnome-abrt', 'traceback': <module at remote 0x1fffff8224e8>, 'XLIB_PATH': 'libX11.so.6', 'ArgumentParser': <type at remote 0x100365b0e50>, '__package__': None, 'sys': <module at remote 0x1fffff8e1bb0>, 'XLIB': <CDLL(_FuncPtr=<_ctypes.PyCFuncPtrType at remote 0x1003663c7f0>, XCloseDisplay=<_FuncPtr(__name__='XCloseDisplay') at remote 0x1ffff8e75d50>, XOpenDisplay=<_FuncPtr(__name__='XOpenDisplay') at remote 0x1ffff8e75c80>, _handle=1100424138800, _name='libX11.so.6') at remote 0x10036540e50>, 'DISPLAY': 911742800, '__name__': '__main__', 'os': <module at remote 0x1fffff899d00>, '__doc__': None}, 
    filename=0x3fffe18bf3ab "/usr/bin/gnome-abrt", mod=0x10036502660) at /usr/src/debug/Python-2.7.5/Python/pythonrun.c:1373
Comment 1 Mark Hamzy 2013-10-17 15:29:27 EDT
Created attachment 813527 [details]
abrt tar file
Comment 2 Jakub Filak 2013-10-18 09:30:30 EDT
Created attachment 813776 [details]
A python script which opens and closes X display

Could you please try to run this simple test and report the results here?
Comment 3 Mark Hamzy 2013-10-18 16:30:26 EDT
[root@sharpie ~]# wget --quiet -O - 'https://bugzilla.redhat.com/attachment.cgi?id=813776' | python -
Segmentation fault (core dumped)

[root@sharpie ~]# strace -ff python test.py > log.strace 2>&1
Segmentation fault (core dumped)
Comment 4 Mark Hamzy 2013-10-18 16:31:07 EDT
Created attachment 813908 [details]
log.strace
Comment 5 Jakub Filak 2013-10-18 17:13:01 EDT
Thank you! It proves that this is a bug either in libX11 or in python. Reassigning from gnome-abrt to libX11.
Comment 6 Karsten Hopp 2013-12-06 11:22:17 EST
I've run gdb on the core file:

#0  XCloseDisplay (dpy=0x73e77c0) at ClDisplay.c:51
#1  0x00000080f8a8804c in 00000010.plt_call.strchr@@GLIBC_2.3+0 () from /lib64/libffi.so.6
#2  0x00000080f8a87778 in .ffi_call () from /lib64/libffi.so.6
#3  0x00001ffff953adb4 in ._ctypes_callproc () from /usr/lib64/python2.7/lib-dynload/_ctypes.so
#4  0x00001ffff952d884 in 00000010.plt_call.PyCData_AtAddress+0 ()
   from /usr/lib64/python2.7/lib-dynload/_ctypes.so
#5  0x00000080f8de4554 in .PyObject_Call () from /lib64/libpython2.7.so.1.0
#6  0x00000080f8ee5a6c in .PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#7  0x00000080f8eec814 in .PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
#8  0x00000080f8eec92c in .PyEval_EvalCode () from /lib64/libpython2.7.so.1.0
#9  0x00000080f8f255cc in .PyRun_InteractiveOneFlags () from /lib64/libpython2.7.so.1.0
#10 0x00000080f8f259b0 in .PyRun_InteractiveLoopFlags () from /lib64/libpython2.7.so.1.0
#11 0x00000080f8f26328 in .PyRun_AnyFileExFlags () from /lib64/libpython2.7.so.1.0
#12 0x00000080f8f41a04 in .Py_Main () from /lib64/libpython2.7.so.1.0
#13 0x0000000010000720 in .main ()
Comment 8 Adam Jackson 2014-11-18 11:37:57 EST
wfm on F20.

Note You need to log in before you can comment on or make changes to this bug.