Bug 1048330 - redshift-gtk will segfault when run manually from terminal and interrupted
Summary: redshift-gtk will segfault when run manually from terminal and interrupted
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: redshift
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miloš Komarčević
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-03 18:17 UTC by Jan Pokorný [poki]
Modified: 2015-06-29 14:08 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-06-29 14:08:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1020053 0 unspecified CLOSED [abrt] gtk-redshift-1.7-5.fc19: _PyType_Lookup: Process /usr/bin/python2.7 was killed by signal 11 (SIGSEGV) 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1039610 0 unspecified CLOSED [abrt] redshift-gtk-1.8-1.fc20: _PyType_Lookup: Process /usr/bin/python2.7 was killed by signal 11 (SIGSEGV) 2021-02-22 00:41:40 UTC

Internal Links: 1020053 1039610

Description Jan Pokorný [poki] 2014-01-03 18:17:24 UTC
$ redshift-gtk
> Using method `randr'.
(now wait a bit and hit ^C, i.e., send SIGINT)
> Segmentation fault (core dumped)

This is likely a regression as gtk-redshift-1.7-2.fc17.x86_64 in F17
behaves correctly in this regard (no segfault).

It can be also a Python or a library (gtk?) bug.


redshift-gtk-0:1.8-1.fc20.x86_64
redshift-1.8-1.fc20.x86_64
pygtk2-2.24.0-8.fc20.x86_64
python-2.7.5-9.fc20.x86_64
glib2-2.38.2-2.fc20.x86_64


(gdb) py-bt
#4 Frame 0x7fb58c0016b0, for file /usr/lib64/python2.7/linecache.py,
   line 127, in updatecache
  (filename='/bin/redshift-gtk',
  module_globals=None,
  fullname='/bin/redshift-gtk',
  stat=<posix.stat_result at remote 0x26269b0>)
>   with open(fullname, 'rU') as fp:
#8 Frame 0x7fb58c0014e0, for file /usr/lib64/python2.7/linecache.py,
   line 40, in getlines
  (filename='/bin/redshift-gtk',
  module_globals=None)
>   return updatecache(filename, module_globals)
#12 Frame 0x7fb58c0012f0, for file /usr/lib64/python2.7/linecache.py,
    line 14, in getline
   (filename='/bin/redshift-gtk',
   lineno=23,
   module_globals=None)
>   lines = getlines(filename, module_globals)
#16 Frame 0x7fb58c000ee0, for file /usr/lib64/python2.7/warnings.py,
    line 39, in formatwarning
   (message=<Warning at remote 0x7fb5a5a800a0>,
   category=<type at remote 0x242dbf0>,
   filename='/bin/redshift-gtk',
   lineno=23, line=None,
   s='/bin/redshift-gtk:23: Warning: GChildWatchSource: Exit status of
   a child process was requested but ECHILD was received by waitpid().
   Most likely the process is ignoring SIGCHLD, or some other thread
   is invoking waitpid() with a nonpositive first argument; either
   behavior can break applications that use g_child_watch_add()
   /g_spawn_sync() either directly or indirectly.\n')
>   line = linecache.getline(filename, lineno) if line is None else line
#20 Frame 0x7fb58c000b10, for file /usr/lib64/python2.7/warnings.py,
    line 29, in _show_warning
   (message=<Warning at remote 0x7fb5a5a800a0>,
   category=<type at remote 0x242dbf0>,
   filename='/bin/redshift-gtk',
   lineno=23,
   file=<file at remote 0x7fb5a5b711e0>,
   line=None)
>   file.write(formatwarning(message, category, filename, lineno, line))

(gdb) t a a bt full  # reformatted

> Thread 1 (Thread 0x7fb59302e700 (LWP 26396)):

#0  _PyType_Lookup
        i = <optimized out>
        n = <optimized out>
        mro = <optimized out>
        res = <method_descriptor at remote 0x7fb5a5b7e560>
        base = <optimized out>
        dict = <optimized out>
        h = 655

#1  lookup_maybe
        at /usr/src/debug/Python-2.7.5/Objects/typeobject.c:1204
        res = <optimized out>

#2  _PyObject_LookupSpecial
        at /usr/src/debug/Python-2.7.5/Objects/typeobject.c:1228
        No locals.

#3  special_lookup
        res = <optimized out>

#4  PyEval_EvalFrameEx
        f=f@entry=Frame 0x7fb58c0016b0, for file
            /usr/lib64/python2.7/linecache.py, line 127, in
            updatecache (filename='/bin/redshift-gtk',
            module_globals=None, fullname='/bin/redshift-gtk',
            stat=<posix.stat_result at remote 0x26269b0>),
            throwflag=throwflag@entry=0) at
            /usr/src/debug/Python-2.7.5/Python/ceval.c:2619
        exit = '__exit__'
        enter = '__enter__'
        stack_pointer = 0x7fb58c0018a8
        next_instr = <optimized out>
        opcode = <optimized out>
        oparg = 19
        why = 1
        err = 0
        x = <file at remote 0x7fb5a5adcf60>
        v = <optimized out>
        w = <file at remote 0x7fb5a5adcf60>
        u = <optimized out>
        t = <optimized out>
        stream = 0x0
        fastlocals = 0x7fb58c001828
        freevars = <optimized out>
        retval = <optimized out>
        tstate = <optimized out>
        co = <optimized out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = <optimized out>
        names = <optimized out>
        consts = <optimized out>

#5  PyEval_EvalCodeEx
        kws=0x7fb58c001680, kwcount=0, defs=0x7fb5a5b3d828,
            defcount=1, closure=closure@entry=0x0) at
            /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
        f = Frame 0x7fb58c0016b0, for file
            /usr/lib64/python2.7/linecache.py, line 127, in
            updatecache (filename='/bin/redshift-gtk',
            module_globals=None, fullname='/bin/redshift-gtk',
            stat=<posix.stat_result at remote 0x26269b0>)
        retval = 0x0
        fastlocals = 0x7fb58c001828
        freevars = 0x7fb58c0018a0
        tstate = 0x22420a0
        x = <optimized out>
        u = <optimized out>

#6  fast_function
        at /usr/src/debug/Python-2.7.5/Python/ceval.c:4194
        co = <optimized out>
        nd = <optimized out>
        globals = <optimized out>
        argdefs = <optimized out>
        d = <optimized out>

#7  call_function
    (oparg=<optimized out>, pp_stack=0x7fb59302d2b0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4119
        func = <function at remote 0x7fb5a5b3e9b0>
        w = <optimized out>
        na = 2
        nk = <optimized out>
        n = 2
        pfunc = 0x7fb58c001668
        x = <optimized out>

#8  PyEval_EvalFrameEx
        f=f@entry=Frame 0x7fb58c0014e0, for file
            /usr/lib64/python2.7/linecache.py, line 40, in getlines
            (filename='/bin/redshift-gtk', module_globals=None),
        throwflag=throwflag@entry=0) at
            /usr/src/debug/Python-2.7.5/Python/ceval.c:2740
        sp = 0x7fb58c001680
        stack_pointer = <optimized out>
        next_instr = <optimized out>
        opcode = <optimized out>
        oparg = <optimized out>
        why = 1
        err = 0
        x = <optimized out>
        v = <optimized out>
        w = <optimized out>
        u = <optimized out>
        t = <optimized out>
        stream = 0x0
        fastlocals = 0x7fb58c001658
        freevars = <optimized out>
        retval = <optimized out>
        tstate = <optimized out>
        co = <optimized out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = <optimized out>
        names = <optimized out>
        consts = <optimized out>

#9  PyEval_EvalCodeEx
        kws=0x7fb58c0014a0, kwcount=0, defs=0x7fb5a5b3d7a8,
            defcount=1, closure=closure@entry=0x0) at
            /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
        f = Frame 0x7fb58c0014e0, for file
            /usr/lib64/python2.7/linecache.py, line 40, in getlines
            (filename='/bin/redshift-gtk', module_globals=None)
        retval = 0x0
        fastlocals = 0x7fb58c001658
        freevars = 0x7fb58c001668
        tstate = 0x22420a0
        x = <optimized out>
        u = <optimized out>

#10 fast_function
        at /usr/src/debug/Python-2.7.5/Python/ceval.c:4194
        co = <optimized out>
        nd = <optimized out>
        globals = <optimized out>
        argdefs = <optimized out>
        d = <optimized out>

#11 call_function
    (oparg=<optimized out>, pp_stack=0x7fb59302d4b0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4119
        func = <function at remote 0x7fb5a5b3e8c0>
        w = <optimized out>
        na = 2
        nk = <optimized out>
        n = 2
        pfunc = 0x7fb58c001488
        x = <optimized out>

#12 PyEval_EvalFrameEx
        f=f@entry=Frame 0x7fb58c0012f0, for file
            /usr/lib64/python2.7/linecache.py, line 14, in getline
            (filename='/bin/redshift-gtk', lineno=23,
            module_globals=None),
        throwflag=throwflag@entry=0) at
            /usr/src/debug/Python-2.7.5/Python/ceval.c:2740
        sp = 0x7fb58c0014a0
        stack_pointer = <optimized out>
        next_instr = <optimized out>
        opcode = <optimized out>
        oparg = <optimized out>
        why = 1
        err = 0
        x = <optimized out>
        v = <optimized out>
        w = <optimized out>
        u = <optimized out>
        t = <optimized out>
        stream = 0x0
        fastlocals = 0x7fb58c001468
        freevars = <optimized out>
        retval = <optimized out>
        tstate = <optimized out>
        co = <optimized out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = <optimized out>
        names = <optimized out>
        consts = <optimized out>

#13 PyEval_EvalCodeEx
        kws=0x7fb58c0010a0, kwcount=0, defs=0x7fb5a5b3d768,
            defcount=1, closure=closure@entry=0x0) at
            /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
        f = Frame 0x7fb58c0012f0, for file
            /usr/lib64/python2.7/linecache.py, line 14, in getline
            (filename='/bin/redshift-gtk', lineno=23,
            module_globals=None)
        retval = 0x0
        fastlocals = 0x7fb58c001468
        freevars = 0x7fb58c001488
        tstate = 0x22420a0
        x = <optimized out>
        u = <optimized out>

#14 fast_function
        at /usr/src/debug/Python-2.7.5/Python/ceval.c:4194
        co = <optimized out>
        nd = <optimized out>
        globals = <optimized out>
        argdefs = <optimized out>
        d = <optimized out>

#15 call_function
    (oparg=<optimized out>, pp_stack=0x7fb59302d6b0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4119
        func = <function at remote 0x7fb5a5b3e7d0>
        w = <optimized out>
        na = 2
        nk = <optimized out>
        n = 2
        pfunc = 0x7fb58c001088
        x = <optimized out>

#16 PyEval_EvalFrameEx
        f=f@entry=Frame 0x7fb58c000ee0, for file
            /usr/lib64/python2.7/warnings.py, line 39, in
            formatwarning (message=<Warning at remote 0x7fb5a5a800a0>,
            category=<type at remote 0x242dbf0>, filename='/bin
            /redshift-gtk', lineno=23, line=None, s='/bin/redshift-
            gtk:23: Warning: GChildWatchSource: Exit status of a child
            process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a nonpositive
            first argument; either behavior can break applications
            that use g_child_watch_add()/g_spawn_sync() either
            directly or indirectly.\n'), throwflag=throwflag@entry=0)
        at /usr/src/debug/Python-2.7.5/Python/ceval.c:2740
        sp = 0x7fb58c0010a0
        stack_pointer = <optimized out>
        next_instr = <optimized out>
        opcode = <optimized out>
        oparg = <optimized out>
        why = 1
        err = 0
        x = <optimized out>
        v = <optimized out>
        w = <optimized out>
        u = <optimized out>
        t = <optimized out>
        stream = 0x0
        fastlocals = 0x7fb58c001058
        freevars = <optimized out>
        retval = <optimized out>
        tstate = <optimized out>
        co = <optimized out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = <optimized out>
        names = <optimized out>
        consts = <optimized out>

#17 PyEval_EvalCodeEx
        kws=0x7fb58c000cf0, kwcount=0, defs=0x7fb5a5b3d868,
            defcount=1, closure=closure@entry=0x0) at
            /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
        f = Frame 0x7fb58c000ee0, for file
            /usr/lib64/python2.7/warnings.py, line 39, in
            formatwarning (message=<Warning at remote 0x7fb5a5a800a0>,
            category=<type at remote 0x242dbf0>, filename='/bin
            /redshift-gtk', lineno=23, line=None, s='/bin/redshift-
            gtk:23: Warning: GChildWatchSource: Exit status of a child
            process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a nonpositive
            first argument; either behavior can break applications
            that use g_child_watch_add()/g_spawn_sync() either
            directly or indirectly.\n')
        retval = 0x0
        fastlocals = 0x7fb58c001058
        freevars = 0x7fb58c001088
        tstate = 0x22420a0
        x = <optimized out>
        u = <optimized out>

#18 fast_function
        at /usr/src/debug/Python-2.7.5/Python/ceval.c:4194
        co = <optimized out>
        nd = <optimized out>
        globals = <optimized out>
        argdefs = <optimized out>
        d = <optimized out>

#19 call_function
    (oparg=<optimized out>, pp_stack=0x7fb59302d8b0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4119
        func = <function at remote 0x7fb5a5b3ea28>
        w = <optimized out>
        na = 5
        nk = <optimized out>
        n = 5
        pfunc = 0x7fb58c000cc0
        x = <optimized out>

#20 PyEval_EvalFrameEx
        f=f@entry=Frame 0x7fb58c000b10, for file
            /usr/lib64/python2.7/warnings.py, line 29, in
            _show_warning (message=<Warning at remote 0x7fb5a5a800a0>,
            category=<type at remote 0x242dbf0>, filename='/bin
            /redshift-gtk', lineno=23, file=<file at remote
            0x7fb5a5b711e0>, line=None), throwflag=throwflag@entry=0)
        at /usr/src/debug/Python-2.7.5/Python/ceval.c:2740
        sp = 0x7fb58c000cf0
        stack_pointer = <optimized out>
        next_instr = <optimized out>
        opcode = <optimized out>
        oparg = <optimized out>
        why = 1
        err = 0
        x = <optimized out>
        v = <optimized out>
        w = <optimized out>
        u = <optimized out>
        t = <optimized out>
        stream = 0x0
        fastlocals = 0x7fb58c000c88
        freevars = <optimized out>
        retval = <optimized out>
        tstate = <optimized out>
        co = <optimized out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = <optimized out>
        names = <optimized out>
        consts = <optimized out>

#21 PyEval_EvalCodeEx
        kws=kws@entry=0x0, kwcount=kwcount@entry=0,
            defs=defs@entry=0x7fb5a5b42bf0, defcount=defcount@entry=2,
            closure=0x0) at
            /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
        f = Frame 0x7fb58c000b10, for file
            /usr/lib64/python2.7/warnings.py, line 29, in
            _show_warning (message=<Warning at remote 0x7fb5a5a800a0>,
            category=<type at remote 0x242dbf0>, filename='/bin
            /redshift-gtk', lineno=23, file=<file at remote
            0x7fb5a5b711e0>, line=None)
        retval = 0x0
        fastlocals = 0x7fb58c000c88
        freevars = 0x7fb58c000cb8
        tstate = 0x22420a0
        x = <optimized out>
        u = <optimized out>

#22 function_call
        arg=(<Warning at remote 0x7fb5a5a800a0>, <type at remote
            0x242dbf0>, '/bin/redshift-gtk', 23), kw=0x0) at
            /usr/src/debug/Python-2.7.5/Objects/funcobject.c:526
        result = <optimized out>
        argdefs = <optimized out>
        kwtuple = 0x0
        d = 0x7fb5a5b42bf0
        k = 0x0
        nk = 0
        nd = 2

#23 PyObject_Call
        arg=arg@entry=(<Warning at remote 0x7fb5a5a800a0>, <type at
            remote 0x242dbf0>, '/bin/redshift-gtk', 23),
            kw=kw@entry=0x0)
        at /usr/src/debug/Python-2.7.5/Objects/abstract.c:2529
        result = <optimized out>
        call = 0x7fb5a56470d0 <function_call>

#24 PyObject_CallFunctionObjArgs
    (callable=callable@entry=<function at remote 0x7fb5a5b3eaa0>)
    at /usr/src/debug/Python-2.7.5/Objects/abstract.c:2760
        args = (<Warning at remote 0x7fb5a5a800a0>, <type at remote
            0x242dbf0>, '/bin/redshift-gtk', 23)
        tmp = <optimized out>
        vargs = {{
        gp_offset = 40,
        fp_offset = 48,
        overflow_arg_area = 0x7fb59302db50,
        reg_save_area = 0x7fb59302da80
        }}

#25 warn_explicit
        message@entry='GChildWatchSource: Exit status of a child
            process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a nonpositive
            first argument; either behavior can break applications
            that use g_child_watch_add()/g_spawn_sync() either
            directly or indirectly.', filename=filename@entry='/bin
            /redshift-gtk', lineno=lineno@entry=23,
            module=module@entry='__main__',
        registry=registry@entry={('GChildWatchSource: Exit status of a
            child process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a nonpositive
            first argument; either behavior can break applications
            that use g_child_watch_add()/g_spawn_sync() either
            directly or indirectly.', <type at remote 0x242dbf0>, 23):
            True}, sourceline=sourceline@entry=0x0) at
            /usr/src/debug/Python-2.7.5/Python/_warnings.c:415
        res = <optimized out>
        show_fxn = <function at remote 0x7fb5a5b3eaa0>
        key = ('GChildWatchSource: Exit status of a child process was
            requested but ECHILD was received by waitpid(). Most
            likely the process is ignoring SIGCHLD, or some other
            thread is invoking waitpid() with a nonpositive first
            argument; either behavior can break applications that use
            g_child_watch_add()/g_spawn_sync() either directly or
            indirectly.', <type at remote 0x242dbf0>, 23)
        text = <optimized out>
        result = 0x0
        lineno_obj = 23
        item = ('ignore', None, <type at remote 0x7fb5a595a2a0>, None,
            0)
        rc = 0

#26 do_warn
        message=message@entry='GChildWatchSource: Exit status of a
            child process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a nonpositive
            first argument; either behavior can break applications
            that use g_child_watch_add()/g_spawn_sync() either
            directly or indirectly.', category=category@entry=<type at
            remote 0x242dbf0>, stack_level=stack_level@entry=1) at
            /usr/src/debug/Python-2.7.5/Python/_warnings.c:597
        filename = '/bin/redshift-gtk'
        module = '__main__'
        registry = {('GChildWatchSource: Exit status of a child
            process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a nonpositive
            first argument; either behavior can break applications
            that use g_child_watch_add()/g_spawn_sync() either
            directly or indirectly.', <type at remote 0x242dbf0>, 23):
            True}
        res = <optimized out>
        lineno = 23

#27 PyErr_WarnEx
        text=text@entry=0x7fb58c000d60 "GChildWatchSource: Exit status
            of a child process was requested but ECHILD was received
            by waitpid(). Most likely the process is ignoring SIGCHLD,
            or some other thread is invoking waitpid() with a non"...,
            stack_level=stack_level@entry=1) at
            /usr/src/debug/Python-2.7.5/Python/_warnings.c:720
        res = <optimized out>
        message = 'GChildWatchSource: Exit status of a child process
            was requested but ECHILD was received by waitpid(). Most
            likely the process is ignoring SIGCHLD, or some other
            thread is invoking waitpid() with a nonpositive first
            argument; either behavior can break applications that use
            g_child_watch_add()/g_spawn_sync() either directly or
            indirectly.'

#28 _log_func
        message=message@entry=0x7fb58c000d60 "GChildWatchSource: Exit
            status of a child process was requested but ECHILD was
            received by waitpid(). Most likely the process is ignoring
            SIGCHLD, or some other thread is invoking waitpid() with a
            non"..., user_data=user_data@entry=0x242dbf0) at
            gobjectmodule.c:2316
        state = PyGILState_LOCKED
        warning = <type at remote 0x242dbf0>

#29 g_logv
    (log_domain=0x7fb59c6a5f4e "GLib", log_level=G_LOG_LEVEL_WARNING,
    format=<optimized out>, args=args@entry=0x7fb59302ddf0)
    at gmessages.c:960
        domain = 0x0
        data = 0x242dbf0
        depth = 1
        log_func = 0x7fb59bf08bd0 <_log_func>
        domain_fatal_mask = <optimized out>
        masquerade_fatal = 0
        test_level = G_LOG_LEVEL_WARNING
        was_fatal = <optimized out>
        was_recursion = <optimized out>
        msg = 0x7fb58c000d60 "GChildWatchSource: Exit status of a
            child process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a non"...
        msg_alloc = 0x7fb58c000d60 "GChildWatchSource: Exit status of
            a child process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a non"...
        i = 4

#30 g_log
        format=format@entry=0x7fb59c6ad700 "GChildWatchSource: Exit
            status of a child process was requested but ECHILD was
            received by waitpid(). Most likely the process is ignoring
            SIGCHLD, or some other thread is invoking waitpid() with a
            non"...) at gmessages.c:1025
        args = {{
        gp_offset = 24,
        fp_offset = 48,
        overflow_arg_area = 0x7fb59302ded0,
        reg_save_area = 0x7fb59302de10
        }}

#31 dispatch_unix_signals
    at gmain.c:4858
        pid = <optimized out>
        source = 0x2854100
        node = 0x2853c90 = {0x2854100}

#32 glib_worker_main
    (data=<optimized out>)
    at gmain.c:5477
        No locals.

#33 g_thread_proxy
    (data=0x284e770)
    at gthread.c:798
        thread = 0x284e770

#34 start_thread
    (arg=0x7fb59302e700)
    at pthread_create.c:309
        __res = <optimized out>
        pd = 0x7fb59302e700
        now = <optimized out>
        unwind_buf = {
        cancel_jmp_buf = {{
        jmp_buf = {140417832249088, -2157697230793059157, 0, 0,
            140417832249792, 140417832249088, 2118230906261755051,
            2118129662546039979},
        mask_was_saved = 0
        }},
        priv = {
        pad = {0x0, 0x0, 0x0, 0x0},
        data = {
        prev = 0x0,
        cleanup = 0x0,
        canceltype = 0
        }
        }
        }
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>

#35 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
        No locals.


> Thread 2 (Thread 0x7fb5a5b96740 (LWP 26394)):

#0  update_refs
    (containers=<optimized out>)
    at /usr/src/debug/Python-2.7.5/Modules/gcmodule.c:400
        gc = 0x7fb5a5b5d030

#1  collect
    (generation=generation@entry=2)
    at /usr/src/debug/Python-2.7.5/Modules/gcmodule.c:998
        i = <optimized out>
        m = 0
        n = 0
        young = <optimized out>
        old = 0x7fb5a59832c0 <generations+96>
        unreachable = {
        gc = {
        gc_next = 0x0,
        gc_prev = 0x7fb5a599d5f0 <Py_IgnoreEnvironmentFlag>,
        gc_refs = 140418145126584
        },
        dummy = <invalid float value>
        }
        finalizers = {
        gc = {
        gc_next = 0x7fb5a5997f88 <_PyThreadState_Current>,
        gc_prev = 0x7fb5a59ac756 <_dl_fixup+230>,
        gc_refs = 140415365808133
        },
        dummy = <invalid float value>
        }
        gc = <optimized out>
        t1 = 0

#2  PyGC_Collect
    at /usr/src/debug/Python-2.7.5/Modules/gcmodule.c:1514
        n = 140418145964080

#3  Py_Finalize
    at /usr/src/debug/Python-2.7.5/Python/pythonrun.c:444
        interp = 0x2242010

#4  Py_Main
    (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/Python-2.7.5/Modules/main.c:665
        c = <optimized out>
        sts = 0
        command = 0x0
        filename = 0x7fff77b603ca "/bin/redshift-gtk"
        module = 0x0
        fp = 0x2318230
        p = <optimized out>
        unbuffered = 0
        skipfirstline = 0
        stdin_is_interactive = 1
        help = <optimized out>
        version = <optimized out>
        saw_unbuffered_flag = <optimized out>
        cf = {
        cf_flags = 0
        }

#5  __libc_start_main
        stack_end=0x7fff77b5f0c8) at libc-start.c:285
        result = <optimized out>
        unwind_buf = {
        cancel_jmp_buf = {{
        jmp_buf = {0, -2157697230793059157, 4196088, 140735201800400,
            0, 0, 2157433846276838571, 2118126606127355051},
        mask_was_saved = 0
        }},
        priv = {
        pad = {0x0, 0x0, 0x4007f0 <__libc_csu_init>, 0x7fff77b5f0d8},
        data = {
        prev = 0x0,
        cleanup = 0x0,
        canceltype = 4196336
        }
        }
        }
        not_first_call = <optimized out>

#6  _start
        No symbol table info available.


> Thread 3 (Thread 0x7fb590862700 (LWP 26397)):

#0  poll
    at ../sysdeps/unix/syscall-template.S:81
        No locals.

#1  g_main_context_poll
    (priority=2147483647, n_fds=3, fds=0x7fb5840010c0, timeout=-1,
    context=0x286c7b0)
    at gmain.c:4007
        poll_func = 0x7fb59c64b500 <g_poll>

#2  g_main_context_iterate
    (context=0x286c7b0, block=block@entry=1, dispatch=dispatch@entry=1,
    self=<optimized out>)
    at gmain.c:3708
        max_priority = 2147483647
        timeout = -1
        some_ready = <optimized out>
        nfds = 3
        allocated_nfds = 3
        fds = 0x7fb5840010c0

#3  g_main_loop_run
    (loop=0x28abd50)
    at gmain.c:3907
        __PRETTY_FUNCTION__ = "g_main_loop_run"

#4  gdbus_shared_thread_func
    (user_data=0x286c780)
    at gdbusprivate.c:278
        data = 0x286c780

#5  g_thread_proxy
    (data=0x284f050)
    at gthread.c:798
        thread = 0x284f050

#6  start_thread
    (arg=0x7fb590862700)
    at pthread_create.c:309
        __res = <optimized out>
        pd = 0x7fb590862700
        now = <optimized out>
        unwind_buf = {
        cancel_jmp_buf = {{
        jmp_buf = {140417790519040, -2157697230793059157, 0, 0,
            140417790519744, 140417790519040, 2118223173173138603,
            2118129662546039979},
        mask_was_saved = 0
        }},
        priv = {
        pad = {0x0, 0x0, 0x0, 0x0},
        data = {
        prev = 0x0,
        cleanup = 0x0,
        canceltype = 0
        }
        }
        }
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>

#7  clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
        No locals.

Comment 1 Jan Pokorný [poki] 2014-01-03 19:20:18 UTC
(gdb) t a a bt full  # now using a bit more sane reformatter [1]

> Thread 1 (Thread 0x7fb59302e700 (LWP 26396)):

#0  _PyType_Lookup
    (type=0x7fb5a5960d20 <PyFile_Type>, name='__exit__')
    at /usr/src/debug/Python-2.7.5/Objects/typeobject.c:2531
        i = <optimized out>
        n = <optimized out>
        mro = <optimized out>
        res = <method_descriptor at remote 0x7fb5a5b7e560>
        base = <optimized out>
        dict = <optimized out>
        h = 655

#1  lookup_maybe
    (self=<file at remote 0x7fb5a5adcf60>, attrstr=<optimized out>,
    attrobj=<optimized out>)
    at /usr/src/debug/Python-2.7.5/Objects/typeobject.c:1204
        res = <optimized out>

#2  _PyObject_LookupSpecial
    (self=<optimized out>, attrstr=<optimized out>, attrobj=<optimized
    out>)
    at /usr/src/debug/Python-2.7.5/Objects/typeobject.c:1228
        No locals.

#3  special_lookup
    (o=<optimized out>, meth=<optimized out>, cache=0x7fb5a5997b90
    <exit.10946>)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:3357
        res = <optimized out>

#4  PyEval_EvalFrameEx
    (f=f@entry=Frame 0x7fb58c0016b0, for file
    /usr/lib64/python2.7/linecache.py, line 127, in updatecache
    (filename='/bin/redshift-gtk', module_globals=None, fullname='/bin
    /redshift-gtk', stat=<posix.stat_result at remote 0x26269b0>),
    throwflag=throwflag@entry=0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:2619
        exit = '__exit__'
        enter = '__enter__'
        stack_pointer = 0x7fb58c0018a8
        next_instr = <optimized out>
        opcode = <optimized out>
        oparg = 19
        why = 1
        err = 0
        x = <file at remote 0x7fb5a5adcf60>
        v = <optimized out>
        w = <file at remote 0x7fb5a5adcf60>
        u = <optimized out>
        t = <optimized out>
        stream = 0x0
        fastlocals = 0x7fb58c001828
        freevars = <optimized out>
        retval = <optimized out>
        tstate = <optimized out>
        co = <optimized out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = <optimized out>
        names = <optimized out>
        consts = <optimized out>

#5  PyEval_EvalCodeEx
    (co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0,
    args=<optimized out>, argcount=argcount@entry=2,
    kws=0x7fb58c001680, kwcount=0, defs=0x7fb5a5b3d828, defcount=1,
    closure=closure@entry=0x0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
        f = Frame 0x7fb58c0016b0, for file
            /usr/lib64/python2.7/linecache.py, line 127, in
            updatecache (filename='/bin/redshift-gtk',
            module_globals=None, fullname='/bin/redshift-gtk',
            stat=<posix.stat_result at remote 0x26269b0>)
        retval = 0x0
        fastlocals = 0x7fb58c001828
        freevars = 0x7fb58c0018a0
        tstate = 0x22420a0
        x = <optimized out>
        u = <optimized out>

#6  fast_function
    (nk=<optimized out>, na=2, n=2, pp_stack=0x7fb59302d2b0,
    func=<function at remote 0x7fb5a5b3e9b0>)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4194
        co = <optimized out>
        nd = <optimized out>
        globals = <optimized out>
        argdefs = <optimized out>
        d = <optimized out>

#7  call_function
    (oparg=<optimized out>, pp_stack=0x7fb59302d2b0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4119
        func = <function at remote 0x7fb5a5b3e9b0>
        w = <optimized out>
        na = 2
        nk = <optimized out>
        n = 2
        pfunc = 0x7fb58c001668
        x = <optimized out>

#8  PyEval_EvalFrameEx
    (f=f@entry=Frame 0x7fb58c0014e0, for file
    /usr/lib64/python2.7/linecache.py, line 40, in getlines
    (filename='/bin/redshift-gtk', module_globals=None),
    throwflag=throwflag@entry=0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:2740
        sp = 0x7fb58c001680
        stack_pointer = <optimized out>
        next_instr = <optimized out>
        opcode = <optimized out>
        oparg = <optimized out>
        why = 1
        err = 0
        x = <optimized out>
        v = <optimized out>
        w = <optimized out>
        u = <optimized out>
        t = <optimized out>
        stream = 0x0
        fastlocals = 0x7fb58c001658
        freevars = <optimized out>
        retval = <optimized out>
        tstate = <optimized out>
        co = <optimized out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = <optimized out>
        names = <optimized out>
        consts = <optimized out>

#9  PyEval_EvalCodeEx
    (co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0,
    args=<optimized out>, argcount=argcount@entry=2,
    kws=0x7fb58c0014a0, kwcount=0, defs=0x7fb5a5b3d7a8, defcount=1,
    closure=closure@entry=0x0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
        f = Frame 0x7fb58c0014e0, for file
            /usr/lib64/python2.7/linecache.py, line 40, in getlines
            (filename='/bin/redshift-gtk', module_globals=None)
        retval = 0x0
        fastlocals = 0x7fb58c001658
        freevars = 0x7fb58c001668
        tstate = 0x22420a0
        x = <optimized out>
        u = <optimized out>

#10 fast_function
    (nk=<optimized out>, na=2, n=2, pp_stack=0x7fb59302d4b0,
    func=<function at remote 0x7fb5a5b3e8c0>)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4194
        co = <optimized out>
        nd = <optimized out>
        globals = <optimized out>
        argdefs = <optimized out>
        d = <optimized out>

#11 call_function
    (oparg=<optimized out>, pp_stack=0x7fb59302d4b0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4119
        func = <function at remote 0x7fb5a5b3e8c0>
        w = <optimized out>
        na = 2
        nk = <optimized out>
        n = 2
        pfunc = 0x7fb58c001488
        x = <optimized out>

#12 PyEval_EvalFrameEx
    (f=f@entry=Frame 0x7fb58c0012f0, for file
    /usr/lib64/python2.7/linecache.py, line 14, in getline
    (filename='/bin/redshift-gtk', lineno=23, module_globals=None),
    throwflag=throwflag@entry=0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:2740
        sp = 0x7fb58c0014a0
        stack_pointer = <optimized out>
        next_instr = <optimized out>
        opcode = <optimized out>
        oparg = <optimized out>
        why = 1
        err = 0
        x = <optimized out>
        v = <optimized out>
        w = <optimized out>
        u = <optimized out>
        t = <optimized out>
        stream = 0x0
        fastlocals = 0x7fb58c001468
        freevars = <optimized out>
        retval = <optimized out>
        tstate = <optimized out>
        co = <optimized out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = <optimized out>
        names = <optimized out>
        consts = <optimized out>

#13 PyEval_EvalCodeEx
    (co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0,
    args=<optimized out>, argcount=argcount@entry=2,
    kws=0x7fb58c0010a0, kwcount=0, defs=0x7fb5a5b3d768, defcount=1,
    closure=closure@entry=0x0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
        f = Frame 0x7fb58c0012f0, for file
            /usr/lib64/python2.7/linecache.py, line 14, in getline
            (filename='/bin/redshift-gtk', lineno=23,
            module_globals=None)
        retval = 0x0
        fastlocals = 0x7fb58c001468
        freevars = 0x7fb58c001488
        tstate = 0x22420a0
        x = <optimized out>
        u = <optimized out>

#14 fast_function
    (nk=<optimized out>, na=2, n=2, pp_stack=0x7fb59302d6b0,
    func=<function at remote 0x7fb5a5b3e7d0>)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4194
        co = <optimized out>
        nd = <optimized out>
        globals = <optimized out>
        argdefs = <optimized out>
        d = <optimized out>

#15 call_function
    (oparg=<optimized out>, pp_stack=0x7fb59302d6b0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4119
        func = <function at remote 0x7fb5a5b3e7d0>
        w = <optimized out>
        na = 2
        nk = <optimized out>
        n = 2
        pfunc = 0x7fb58c001088
        x = <optimized out>

#16 PyEval_EvalFrameEx
        sp = 0x7fb58c0010a0
        stack_pointer = <optimized out>
        next_instr = <optimized out>
        opcode = <optimized out>
        oparg = <optimized out>
        why = 1
        err = 0
        x = <optimized out>
        v = <optimized out>
        w = <optimized out>
        u = <optimized out>
        t = <optimized out>
        stream = 0x0
        fastlocals = 0x7fb58c001058
        freevars = <optimized out>
        retval = <optimized out>
        tstate = <optimized out>
        co = <optimized out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = <optimized out>
        names = <optimized out>
        consts = <optimized out>

#17 PyEval_EvalCodeEx
    (co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0,
    args=<optimized out>, argcount=argcount@entry=5,
    kws=0x7fb58c000cf0, kwcount=0, defs=0x7fb5a5b3d868, defcount=1,
    closure=closure@entry=0x0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
        f = Frame 0x7fb58c000ee0, for file
            /usr/lib64/python2.7/warnings.py, line 39, in
            formatwarning (message=<Warning at remote 0x7fb5a5a800a0>,
            category=<type at remote 0x242dbf0>, filename='/bin
            /redshift-gtk', lineno=23, line=None, s='/bin/redshift-
            gtk:23: Warning: GChildWatchSource: Exit status of a child
            process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a nonpositive
            first argument; either behavior can break applications
            that use g_child_watch_add()/g_spawn_sync() either
            directly or indirectly.\n')
        retval = 0x0
        fastlocals = 0x7fb58c001058
        freevars = 0x7fb58c001088
        tstate = 0x22420a0
        x = <optimized out>
        u = <optimized out>

#18 fast_function
    (nk=<optimized out>, na=5, n=5, pp_stack=0x7fb59302d8b0,
    func=<function at remote 0x7fb5a5b3ea28>)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4194
        co = <optimized out>
        nd = <optimized out>
        globals = <optimized out>
        argdefs = <optimized out>
        d = <optimized out>

#19 call_function
    (oparg=<optimized out>, pp_stack=0x7fb59302d8b0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:4119
        func = <function at remote 0x7fb5a5b3ea28>
        w = <optimized out>
        na = 5
        nk = <optimized out>
        n = 5
        pfunc = 0x7fb58c000cc0
        x = <optimized out>

#20 PyEval_EvalFrameEx
    (f=f@entry=Frame 0x7fb58c000b10, for file
    /usr/lib64/python2.7/warnings.py, line 29, in _show_warning
    (message=<Warning at remote 0x7fb5a5a800a0>, category=<type at
    remote 0x242dbf0>, filename='/bin/redshift-gtk', lineno=23,
    file=<file at remote 0x7fb5a5b711e0>, line=None),
    throwflag=throwflag@entry=0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:2740
        sp = 0x7fb58c000cf0
        stack_pointer = <optimized out>
        next_instr = <optimized out>
        opcode = <optimized out>
        oparg = <optimized out>
        why = 1
        err = 0
        x = <optimized out>
        v = <optimized out>
        w = <optimized out>
        u = <optimized out>
        t = <optimized out>
        stream = 0x0
        fastlocals = 0x7fb58c000c88
        freevars = <optimized out>
        retval = <optimized out>
        tstate = <optimized out>
        co = <optimized out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = <optimized out>
        names = <optimized out>
        consts = <optimized out>

#21 PyEval_EvalCodeEx
    (co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0,
    args=args@entry=0x7fb5a5ad8328, argcount=4, kws=kws@entry=0x0,
    kwcount=kwcount@entry=0, defs=defs@entry=0x7fb5a5b42bf0,
    defcount=defcount@entry=2, closure=0x0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
        f = Frame 0x7fb58c000b10, for file
            /usr/lib64/python2.7/warnings.py, line 29, in
            _show_warning (message=<Warning at remote 0x7fb5a5a800a0>,
            category=<type at remote 0x242dbf0>, filename='/bin
            /redshift-gtk', lineno=23, file=<file at remote
            0x7fb5a5b711e0>, line=None)
        retval = 0x0
        fastlocals = 0x7fb58c000c88
        freevars = 0x7fb58c000cb8
        tstate = 0x22420a0
        x = <optimized out>
        u = <optimized out>

#22 function_call
        result = <optimized out>
        argdefs = <optimized out>
        kwtuple = 0x0
        d = 0x7fb5a5b42bf0
        k = 0x0
        nk = 0
        nd = 2

#23 PyObject_Call
        result = <optimized out>
        call = 0x7fb5a56470d0 <function_call>

#24 PyObject_CallFunctionObjArgs
    (callable=callable@entry=<function at remote 0x7fb5a5b3eaa0>)
    at /usr/src/debug/Python-2.7.5/Objects/abstract.c:2760
        args = (<Warning at remote 0x7fb5a5a800a0>, <type at remote
            0x242dbf0>, '/bin/redshift-gtk', 23)
        tmp = <optimized out>
        vargs = {{
        gp_offset = 40,
        fp_offset = 48,
        overflow_arg_area = 0x7fb59302db50,
        reg_save_area = 0x7fb59302da80
        }}

#25 warn_explicit
        res = <optimized out>
        show_fxn = <function at remote 0x7fb5a5b3eaa0>
        key = ('GChildWatchSource: Exit status of a child process was
            requested but ECHILD was received by waitpid(). Most
            likely the process is ignoring SIGCHLD, or some other
            thread is invoking waitpid() with a nonpositive first
            argument; either behavior can break applications that use
            g_child_watch_add()/g_spawn_sync() either directly or
            indirectly.', <type at remote 0x242dbf0>, 23)
        text = <optimized out>
        result = 0x0
        lineno_obj = 23
        item = ('ignore', None, <type at remote 0x7fb5a595a2a0>, None,
            0)
        rc = 0

#26 do_warn
    (message=message@entry='GChildWatchSource: Exit status of a child
    process was requested but ECHILD was received by waitpid(). Most
    likely the process is ignoring SIGCHLD, or some other thread is
    invoking waitpid() with a nonpositive first argument; either
    behavior can break applications that use
    g_child_watch_add()/g_spawn_sync() either directly or
    indirectly.', category=category@entry=<type at remote 0x242dbf0>,
    stack_level=stack_level@entry=1)
    at /usr/src/debug/Python-2.7.5/Python/_warnings.c:597
        filename = '/bin/redshift-gtk'
        module = '__main__'
        registry = {('GChildWatchSource: Exit status of a child
            process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a nonpositive
            first argument; either behavior can break applications
            that use g_child_watch_add()/g_spawn_sync() either
            directly or indirectly.', <type at remote 0x242dbf0>, 23):
            True}
        res = <optimized out>
        lineno = 23

#27 PyErr_WarnEx
        res = <optimized out>
        message = 'GChildWatchSource: Exit status of a child process
            was requested but ECHILD was received by waitpid(). Most
            likely the process is ignoring SIGCHLD, or some other
            thread is invoking waitpid() with a nonpositive first
            argument; either behavior can break applications that use
            g_child_watch_add()/g_spawn_sync() either directly or
            indirectly.'

#28 _log_func
        state = PyGILState_LOCKED
        warning = <type at remote 0x242dbf0>

#29 g_logv
    (log_domain=0x7fb59c6a5f4e "GLib", log_level=G_LOG_LEVEL_WARNING,
    format=<optimized out>, args=args@entry=0x7fb59302ddf0)
    at gmessages.c:960
        domain = 0x0
        data = 0x242dbf0
        depth = 1
        log_func = 0x7fb59bf08bd0 <_log_func>
        domain_fatal_mask = <optimized out>
        masquerade_fatal = 0
        test_level = G_LOG_LEVEL_WARNING
        was_fatal = <optimized out>
        was_recursion = <optimized out>
        msg = 0x7fb58c000d60 "GChildWatchSource: Exit status of a
            child process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a non"...
        msg_alloc = 0x7fb58c000d60 "GChildWatchSource: Exit status of
            a child process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a non"...
        i = 4

#30 g_log
        args = {{
        gp_offset = 24,
        fp_offset = 48,
        overflow_arg_area = 0x7fb59302ded0,
        reg_save_area = 0x7fb59302de10
        }}

#31 dispatch_unix_signals
    at gmain.c:4858
        pid = <optimized out>
        source = 0x2854100
        node = 0x2853c90 = {0x2854100}

#32 glib_worker_main
    (data=<optimized out>)
    at gmain.c:5477
        No locals.

#33 g_thread_proxy
    (data=0x284e770)
    at gthread.c:798
        thread = 0x284e770

#34 start_thread
    (arg=0x7fb59302e700)
    at pthread_create.c:309
        __res = <optimized out>
        pd = 0x7fb59302e700
        now = <optimized out>
        unwind_buf = {
        cancel_jmp_buf = {{
        jmp_buf = {140417832249088, -2157697230793059157, 0, 0,
            140417832249792, 140417832249088, 2118230906261755051,
            2118129662546039979},
        mask_was_saved = 0
        }},
        priv = {
        pad = {0x0, 0x0, 0x0, 0x0},
        data = {
        prev = 0x0,
        cleanup = 0x0,
        canceltype = 0
        }
        }
        }
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>

#35 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
        No locals.


> Thread 2 (Thread 0x7fb5a5b96740 (LWP 26394)):

#0  update_refs
    (containers=<optimized out>)
    at /usr/src/debug/Python-2.7.5/Modules/gcmodule.c:400
        gc = 0x7fb5a5b5d030

#1  collect
    (generation=generation@entry=2)
    at /usr/src/debug/Python-2.7.5/Modules/gcmodule.c:998
        i = <optimized out>
        m = 0
        n = 0
        young = <optimized out>
        old = 0x7fb5a59832c0 <generations+96>
        unreachable = {
        gc = {
        gc_next = 0x0,
        gc_prev = 0x7fb5a599d5f0 <Py_IgnoreEnvironmentFlag>,
        gc_refs = 140418145126584
        },
        dummy = <invalid float value>
        }
        finalizers = {
        gc = {
        gc_next = 0x7fb5a5997f88 <_PyThreadState_Current>,
        gc_prev = 0x7fb5a59ac756 <_dl_fixup+230>,
        gc_refs = 140415365808133
        },
        dummy = <invalid float value>
        }
        gc = <optimized out>
        t1 = 0

#2  PyGC_Collect
    at /usr/src/debug/Python-2.7.5/Modules/gcmodule.c:1514
        n = 140418145964080

#3  Py_Finalize
    at /usr/src/debug/Python-2.7.5/Python/pythonrun.c:444
        interp = 0x2242010

#4  Py_Main
    (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/Python-2.7.5/Modules/main.c:665
        c = <optimized out>
        sts = 0
        command = 0x0
        filename = 0x7fff77b603ca "/bin/redshift-gtk"
        module = 0x0
        fp = 0x2318230
        p = <optimized out>
        unbuffered = 0
        skipfirstline = 0
        stdin_is_interactive = 1
        help = <optimized out>
        version = <optimized out>
        saw_unbuffered_flag = <optimized out>
        cf = {
        cf_flags = 0
        }

#5  __libc_start_main
    (main=0x4006f0 <main>, argc=2, argv=0x7fff77b5f0d8, init=<optimized
    out>, fini=<optimized out>, rtld_fini=<optimized out>,
    stack_end=0x7fff77b5f0c8)
    at libc-start.c:285
        result = <optimized out>
        unwind_buf = {
        cancel_jmp_buf = {{
        jmp_buf = {0, -2157697230793059157, 4196088, 140735201800400,
            0, 0, 2157433846276838571, 2118126606127355051},
        mask_was_saved = 0
        }},
        priv = {
        pad = {0x0, 0x0, 0x4007f0 <__libc_csu_init>, 0x7fff77b5f0d8},
        data = {
        prev = 0x0,
        cleanup = 0x0,
        canceltype = 4196336
        }
        }
        }
        not_first_call = <optimized out>

#6  _start
        No symbol table info available.


> Thread 3 (Thread 0x7fb590862700 (LWP 26397)):

#0  poll
    at ../sysdeps/unix/syscall-template.S:81
        No locals.

#1  g_main_context_poll
    (priority=2147483647, n_fds=3, fds=0x7fb5840010c0, timeout=-1,
    context=0x286c7b0)
    at gmain.c:4007
        poll_func = 0x7fb59c64b500 <g_poll>

#2  g_main_context_iterate
    (context=0x286c7b0, block=block@entry=1, dispatch=dispatch@entry=1,
    self=<optimized out>)
    at gmain.c:3708
        max_priority = 2147483647
        timeout = -1
        some_ready = <optimized out>
        nfds = 3
        allocated_nfds = 3
        fds = 0x7fb5840010c0

#3  g_main_loop_run
    (loop=0x28abd50)
    at gmain.c:3907
        __PRETTY_FUNCTION__ = "g_main_loop_run"

#4  gdbus_shared_thread_func
    (user_data=0x286c780)
    at gdbusprivate.c:278
        data = 0x286c780

#5  g_thread_proxy
    (data=0x284f050)
    at gthread.c:798
        thread = 0x284f050

#6  start_thread
    (arg=0x7fb590862700)
    at pthread_create.c:309
        __res = <optimized out>
        pd = 0x7fb590862700
        now = <optimized out>
        unwind_buf = {
        cancel_jmp_buf = {{
        jmp_buf = {140417790519040, -2157697230793059157, 0, 0,
            140417790519744, 140417790519040, 2118223173173138603,
            2118129662546039979},
        mask_was_saved = 0
        }},
        priv = {
        pad = {0x0, 0x0, 0x0, 0x0},
        data = {
        prev = 0x0,
        cleanup = 0x0,
        canceltype = 0
        }
        }
        }
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>

#7  clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
        No locals.


[1] http://fedorapeople.org/cgit/jpokorny/public_git/gdb-bt-reformat.git/commit/?id=db94b33

Comment 2 Jan Pokorný [poki] 2014-01-03 19:27:20 UTC
Looks like these are the same:

[bug 1039610]: also Fedora 20
[bug 1020053]: Fedora 19

Comment 3 Dave Malcolm 2014-01-06 15:46:46 UTC
I think it's a GIL issue: to access Python objects (such as running bytecode) a thread needs to have the Global Interpreter Lock, but at the type of the segfault *both* thread 1 and thread 2 are currently doing things that require the GIL.

It looks like you have 3 threads:
* thread 1 is trying to print a warning, and it's within linecache.py, which means I think it's trying to print a backtrace (linecache caches .py source code for this purpose); all of the this requires the GIL.

* thread 2 is exiting with Py_Finalize, and it's running the garbage-collector to try to break reference cycles (which also requires the GIL).

* thread 3 is polling, waiting for an event.

I see that thread 1 is within a call to g_log and it's trying to print this warning:
        msg = 0x7fb58c000d60 "GChildWatchSource: Exit status of a
            child process was requested but ECHILD was received by
            waitpid(). Most likely the process is ignoring SIGCHLD, or
            some other thread is invoking waitpid() with a non"...

It looks like g_log leads to a *python* warning being emitted, and that requires the GIL.  This seems doomed to fail in a multithreaded process: IIRC g_log doesn't have any requirements on locking, but running Python code needs the GIL.  So if g_log is to run Python code (by calling PyErr_WarnEx), it needs to wait for the GIL before it can run said Python code.  But the GIL may already be held by another thread, and that thread may be waiting on the thread that called g_log, which could lead to a deadlock.

I see that _log_func is called in thread 1 frame 28, and that's the thing that 

_log_func seems to be from pygobject2, on my checkout it's in pygobject-2.28.6/gobject/gobjectmodule.c.

This calls PyErr_Warn, thusly:

	state = pyglib_gil_state_ensure();
	PyErr_Warn(warning, (char *) message);
	pyglib_gil_state_release(state);

which would appear to be waiting on the GIL.

What version of pygobject2 do you have?

Looking at pyglib_gil_state_ensure within pygobject-2.28.6/glib/pyglib.c I see various ways it can return PyGILState_LOCKED, and in not all of them do we necessarily acquire the GIL.   So maybe we're hitting one of those paths through the code?

Hope this is helpful

Comment 4 Dave Malcolm 2014-01-06 15:54:42 UTC
To further isolate this you could try running it under gdb, putting a breakpoint on Py_Finalize, and when that hits, put a breakpoint on pyglib_gil_state_ensure and step through that latter function to see why it thinks it has the GIL when it doesn't.

Comment 5 Jan Pokorný [poki] 2014-01-06 16:30:15 UTC
re [comment 3]:

> What version of pygobject2 do you have?

pygobject2-2.28.6-11.fc20.x86_64 (i.e., the one you are talking about,
perhaps modulo some patches, the most recent being from 2013-09-19 [2])

[2] https://pkgs.fedoraproject.org/cgit/pygobject2.git/commit/?id=ae1702ce2379665b86b4ee6d55321e2fa4afad9b

Comment 6 Fedora End Of Life 2015-05-29 10:18:41 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. 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 '20'.

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 20 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 7 Fedora End Of Life 2015-06-29 14:08:25 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 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.


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