Bug 1283552 - Segmentation fault / not working
Summary: Segmentation fault / not working
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: disper (Show other bugs)
(Show other bugs)
Version: 27
Hardware: Unspecified Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mario Santagiuliana
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-19 09:33 UTC by Mark van Rossum
Modified: 2018-11-10 03:29 UTC (History)
4 users (show)

Fixed In Version: disper-0.3.1-14.fc27 disper-0.3.1-14.fc29 disper-0.3.1-14.fc28
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-11-10 02:27:37 UTC
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)
diff -Naur disper/src/xrandr/__init__.py disper-new/src/xrandr/__init__.py (2 bytes, patch)
2016-07-28 13:43 UTC, A Peyser
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1531704 None None None 2016-01-07 04:24 UTC

Description Mark van Rossum 2015-11-19 09:33:31 UTC
Description of problem:

disper  -c
causes a segmentation fault on FC23.

As disper worked fine on FC22, I suspect a change/bug in Python.


disper  without argument returns the help.


Version-Release number of selected component (if applicable):
rpm -q disper
disper-0.3.1-4.fc23.noarch

rpm -q python
python-2.7.10-8.fc23.x86_64


How reproducible:
Always

Comment 1 Mark van Rossum 2015-11-19 09:36:07 UTC
Or maybe the output of some of the auxiliary programs (xrandr?) changed?

Comment 2 Steven Ellis 2016-01-07 04:15:07 UTC
I'm seeing the same issue. Here is the stack trace from the crash

Jan 07 17:01:30 t440s audit[14584]: ANOM_ABEND auid=500 uid=500 gid=500 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=14584 comm="python" exe="/usr/bin/python2.7" sig=11
Jan 07 17:01:30 t440s kernel: python[14584]: segfault at fffffffffc640df8 ip 00007fd9b5c2b0dd sp 00007ffcdf2597c0 error 5 in libX11.so.6.3.0[7fd9b5bf2000+13a000]
Jan 07 17:01:33 t440s systemd-coredump[14586]: Process 14584 (python) of user 500 dumped core.
                                                              
                                                              Stack trace of thread 14584:
                                                              #0  0x00007fd9b5c2b0dd XQueryExtension (libX11.so.6)
                                                              #1  0x00007fd9b5c1ec52 XInitExtension (libX11.so.6)
                                                              #2  0x00007fd9b53bc21f XextAddDisplay (libXext.so.6)
                                                              #3  0x00007fd9b55c2e86 XRRFindDisplay (libXrandr.so.2)
                                                              #4  0x00007fd9b55c354a XRRQueryVersion (libXrandr.so.2)
                                                              #5  0x00007fd9b5f37d30 ffi_call_unix64 (libffi.so.6)
                                                              #6  0x00007fd9b5f3779b ffi_call (libffi.so.6)
                                                              #7  0x00007fd9b614adaf _ctypes_callproc (_ctypes.so)
                                                              #8  0x00007fd9b61449d4 PyCFuncPtr_call (_ctypes.so)
                                                              #9  0x00007fd9c177db03 PyObject_Call (libpython2.7.so.1.0)
                                                              #10 0x00007fd9c1813a68 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                              #11 0x00007fd9c1815666 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                              #12 0x00007fd9c18166b4 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                              #13 0x00007fd9c18167d9 PyEval_EvalCode (libpython2.7.so.1.0)
                                                              #14 0x00007fd9c18264dc PyImport_ExecCodeModuleEx (libpython2.7.so.1.0)
                                                              #15 0x00007fd9c1826762 load_source_module (libpython2.7.so.1.0)
                                                              #16 0x00007fd9c1827c12 load_package (libpython2.7.so.1.0)
                                                              #17 0x00007fd9c18273f0 import_submodule (libpython2.7.so.1.0)
                                                              #18 0x00007fd9c1827716 load_next (libpython2.7.so.1.0)
                                                              #19 0x00007fd9c182805d PyImport_ImportModuleLevel (libpython2.7.so.1.0)
                                                              #20 0x00007fd9c180de48 builtin___import__ (libpython2.7.so.1.0)
                                                              #21 0x00007fd9c177db03 PyObject_Call (libpython2.7.so.1.0)
                                                              #22 0x00007fd9c180fac7 PyEval_CallObjectWithKeywords (libpython2.7.so.1.0)
                                                              #23 0x00007fd9c181261b PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                              #24 0x00007fd9c18166b4 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                              #25 0x00007fd9c18167d9 PyEval_EvalCode (libpython2.7.so.1.0)
                                                              #26 0x00007fd9c18264dc PyImport_ExecCodeModuleEx (libpython2.7.so.1.0)
                                                              #27 0x00007fd9c1826762 load_source_module (libpython2.7.so.1.0)
                                                              #28 0x00007fd9c18273f0 import_submodule (libpython2.7.so.1.0)
                                                              #29 0x00007fd9c182767f load_next (libpython2.7.so.1.0)
                                                              #30 0x00007fd9c182805d PyImport_ImportModuleLevel (libpython2.7.so.1.0)
                                                              #31 0x00007fd9c180de48 builtin___import__ (libpython2.7.so.1.0)
                                                              #32 0x00007fd9c177db03 PyObject_Call (libpython2.7.so.1.0)
                                                              #33 0x00007fd9c180fac7 PyEval_CallObjectWithKeywords (libpython2.7.so.1.0)
                                                              #34 0x00007fd9c181261b PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                              #35 0x00007fd9c1815666 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                              #36 0x00007fd9c18166b4 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                              #37 0x00007fd9c17a25ac function_call (libpython2.7.so.1.0)
                                                              #38 0x00007fd9c177db03 PyObject_Call (libpython2.7.so.1.0)
                                                              #39 0x00007fd9c178c95c instancemethod_call (libpython2.7.so.1.0)
                                                              #40 0x00007fd9c177db03 PyObject_Call (libpython2.7.so.1.0)
                                                              #41 0x00007fd9c180fac7 PyEval_CallObjectWithKeywords (libpython2.7.so.1.0)
                                                              #42 0x00007fd9c178d660 PyInstance_New (libpython2.7.so.1.0)
                                                              #43 0x00007fd9c177db03 PyObject_Call (libpython2.7.so.1.0)
                                                              #44 0x00007fd9c1813a68 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                              #45 0x00007fd9c1815666 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                              #46 0x00007fd9c1815666 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                              #47 0x00007fd9c1815666 PyEval_EvalFrameEx (libpython2.7.so.1.0)
                                                              #48 0x00007fd9c18166b4 PyEval_EvalCodeEx (libpython2.7.so.1.0)
                                                              #49 0x00007fd9c18167d9 PyEval_EvalCode (libpython2.7.so.1.0)
                                                              #50 0x00007fd9c182fbdf run_mod (libpython2.7.so.1.0)
                                                              #51 0x00007fd9c1830db2 PyRun_FileExFlags (libpython2.7.so.1.0)
                                                              #52 0x00007fd9c1831fc7 PyRun_SimpleFileExFlags (libpython2.7.so.1.0)
                                                              #53 0x00007fd9c18441e1 Py_Main (libpython2.7.so.1.0)
                                                              #54 0x00007fd9c0a6c580 __libc_start_main (libc.so.6)
                                                              #55 0x000055a9fa9b6839 _start (python2.7)

Comment 3 A Peyser 2016-07-28 13:20:56 UTC
There seems to be a bug with an insufficiently defined ctypes call for XRRQueryVersion. The following works:
import os
from ctypes import *

class Display(Structure):
    pass

xlib = cdll.LoadLibrary("libX11.so.6")
rr = cdll.LoadLibrary("libXrandr.so.2")

xopendisplay = xlib.XOpenDisplay
xopendisplay.restype = POINTER(Display)
xopendisplay.argtypes = [c_char_p]

xrrqueryversion = rr.XRRQueryVersion
xrrqueryversion.restype = c_int
xrrqueryversion.argtypes = [POINTER(Display), POINTER(c_int), POINTER(c_int)]

def get_current_display():
    """Returns the currently used display"""
    display_url = os.getenv("DISPLAY")
    dpy = xopendisplay(display_url)
    return dpy

def get_version():
    """Returns a tuple containing the major and minor version of the xrandr
       extension or None if the extension is not available"""
    major = c_int()
    minor = c_int()
    dpy = get_current_display()
    if not dpy: return None
    res = rr.XRRQueryVersion(dpy, byref(major), byref(minor))
    if res:
        return (major.value, minor.value)
    return None

print("Version: ", get_version())

The only intentional difference between this and the code in disper.xrandr and disper.xrandr.core is the full definition of the argument and return types for the Xlib and Xrandr calls. 

In fact, the only definition that is needed is the return type of XOpenDisplay. Assuming it is an 'int' rather than a pointer to an opaque object is the problem.

Comment 4 A Peyser 2016-07-28 13:43 UTC
Created attachment 1185113 [details]
diff -Naur disper/src/xrandr/__init__.py disper-new/src/xrandr/__init__.py

Comment 5 Fedora End Of Life 2016-11-24 13:34:34 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 A Peyser 2016-11-24 14:02:39 UTC
Wow - the patch should be applied or the package removed from the repos going forward as unmaintained.

Comment 7 Mark van Rossum 2016-11-24 14:31:52 UTC
I must say this is why I have practically stopped reporting bugs here.

Bug is clear and reproducible, fix is provided, and nothing happens...

Comment 8 Fedora End Of Life 2016-12-20 16:05:11 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 A Peyser 2016-12-20 16:25:39 UTC
Why should I bother?

Comment 10 A Peyser 2017-07-07 11:17:33 UTC
& F24 & F25... and of course it has nothing to do with release, it's a bug in the code, with a simple patch which won't go upstream because the code is moribund.

But I'll just keep on adding to this bug report every six months, forever and ever, just to see how long a universally broken package will be kept in the fedora repository.

Comment 11 François Cami 2017-07-07 11:42:26 UTC
Reopening, switching to rawhide.

@APeyser or @Mark: I don't have any clonable displays, so if we build a test package, can you test disper extensively?

Comment 12 A Peyser 2017-07-07 16:16:35 UTC
Have been using a locally produced rpm with this patch since 23, so no problem to test an officially produced equivalent.

Comment 13 A Peyser 2017-07-07 16:19:08 UTC
But I am using 25 and not 26 or rawhide, so for testing I'd need a package against 25.

Comment 14 François Cami 2017-07-07 17:01:02 UTC
Mario,

Can you either apply the patch & rebuild or give me access rights to the package?

Thank you,
François

Comment 15 Jan Kurik 2017-08-15 08:43:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 16 A Peyser 2017-11-22 15:30:54 UTC
And someone has actually updated again for fedora-26 as a mass rebuild and updated the release number even though it's simply broken.

So, you need extensive testing to fix -- but no testing to continue to upgrade although it's clearly broken. 

Two years -- a patch has been here for a year and a half -- no one can possibly be using this, and I myself would be much happier if it was simply no longer in the repository, so I don't have to bump my own version numbers with every update.

How much of fedora is zombie packages? People just clicking buttons?

I'll continue to ping every six months... this could become a kind of seasonal festival...

Comment 17 A Peyser 2018-06-08 18:59:18 UTC
So it's also true for fc27! Still broken, still fixable with the same (trivial) patch, 2.5 years down the road, 4 versions later!

Awesome! Congrats on the process orientation!

Comment 18 A Peyser 2018-06-08 19:01:24 UTC
And of course the same mass rebuild!

Comment 19 Fedora Update System 2018-10-28 00:35:57 UTC
disper-0.3.1-14.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-9d201b79e8

Comment 20 Fedora Update System 2018-10-28 00:36:12 UTC
disper-0.3.1-14.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-79a660c9e5

Comment 21 Fedora Update System 2018-10-28 00:36:26 UTC
disper-0.3.1-14.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-67d604cabb

Comment 22 Filipe Rosset 2018-10-28 00:39:06 UTC
(In reply to A Peyser from comment #17)
> So it's also true for fc27! Still broken, still fixable with the same
> (trivial) patch, 2.5 years down the road, 4 versions later!
> 
> Awesome! Congrats on the process orientation!

Hi Alex,
I regret that this bug report has taken so long, now it seems that it's fixed, can you test the update please?
Thanks!

Comment 23 Fedora Update System 2018-10-28 18:47:17 UTC
disper-0.3.1-14.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-79a660c9e5

Comment 24 Fedora Update System 2018-10-28 18:55:02 UTC
disper-0.3.1-14.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-67d604cabb

Comment 25 Fedora Update System 2018-10-31 18:50:41 UTC
disper-0.3.1-14.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-9d201b79e8

Comment 26 Fedora Update System 2018-11-10 02:27:37 UTC
disper-0.3.1-14.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 27 Fedora Update System 2018-11-10 03:17:41 UTC
disper-0.3.1-14.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 28 Fedora Update System 2018-11-10 03:29:09 UTC
disper-0.3.1-14.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


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