RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1055733 - No module named backtrace in File "/usr/share/glib-2.0/gdb/gobject.py", line 3
Summary: No module named backtrace in File "/usr/share/glib-2.0/gdb/gobject.py", line 3
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: glib2
Version: 7.0
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Colin Walters
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On: 972351
Blocks: 1133060 1205796
TreeView+ depends on / blocked
 
Reported: 2014-01-20 20:22 UTC by Jan Kratochvil
Modified: 2019-02-15 13:37 UTC (History)
17 users (show)

Fixed In Version: glib2-2.42.2-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: The Python plugin for GDB used to debug glib2 applications did not function with the version of GDB in 7.1. Consequence: Errors were emitted by gdb when debugging glib2 applications. Fix: An upstream fix to use newer GDB APIs was included in the rebase. Result: The Python GDB debugging aid for glib2 applications now works without error.
Clone Of: 972351
Environment:
Last Closed: 2015-11-19 08:13:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 613732 0 None None None Never
GNOME Bugzilla 623552 0 None None None Never
Red Hat Knowledge Base (Solution) 1157813 0 None None None Never
Red Hat Product Errata RHBA-2015:2116 0 normal SHIPPED_LIVE GTK+ bug fix and enhancement update 2015-11-19 08:39:32 UTC

Description Jan Kratochvil 2014-01-20 20:22:40 UTC
+++ This bug was initially created as a clone of Bug #972351 +++

Description of problem:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.3600.2-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.3600.2-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace


Version-Release number of selected component (if applicable):
Installierte Pakete
glib2.i686                                          2.36.2-1.fc19                                  @fedora  
glib2.x86_64                                        2.36.2-1.fc19                                  installed
glib2-devel.x86_64                                  2.36.2-1.fc19                                  installed

--- Additional comment from Phil Muldoon on 2013-08-20 18:06:54 CEST ---

The frame filters API was ported upstream to GDB.  Unfortunatley to do
what we wanted to do with it, and in the confines of the upstream
projects we were not able to provide API compatability.  However,
the two are fairly close.  It should just take a few changes.  The
good news is, as this was rewritten for upstream, it now works
with MI.  Also as it is now upstream it is available outside of
Fedora, or other projects that do not carry the experimental archer
patch-set.  With the above in mind, the archer patch for the old frame
filters was dropped as it conflicts with the new feature.

There is a guide to writing frame filters from the GDB manual here:

http://sourceware.org/gdb/current/onlinedocs/gdb/Writing-a-Frame-Filter.html#Writing-a-Frame-Filter

As well as am API guide to the Frame filter, and Frame decorator
interface here:

http://sourceware.org/gdb/current/onlinedocs/gdb/Frame-Filter-API.html#Frame-Filter-API

and

http://sourceware.org/gdb/current/onlinedocs/gdb/Frame-Decorator-API.html#Frame-Decorator-API

As well as API changes, there are frame filter management commands
available to the user:

http://sourceware.org/gdb/current/onlinedocs/gdb/Frame-Filter-Management.html#Frame-Filter-Management

I would be happy to assist you in making the change in any way I can.
You can either bring issues up here, or on the gdb
mailing list.

Cheers,

Phil

Comment 1 Matěj Cepl 2014-01-20 20:44:08 UTC
See also bug 972351 comment 24 (and attachment 852842 [details]).

Comment 2 Jan Kratochvil 2014-02-25 19:28:31 UTC
The proper fix is now upstream by Tom Tromey:
https://bugzilla.gnome.org/show_bug.cgi?id=623552#c11

Comment 3 RHEL Program Management 2014-03-22 06:11:40 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 James Hartsock 2014-08-06 15:54:41 UTC
Prior to finding this RHEL 7 BZ, I noticed that this looks to have been addressed 2 different ways upstream.


Think this may be the first upstream commit to address the issue. I was able to apply this patch to /usr/share/glib-2.0/gdb/gobject.py on RHEL 7.0 system.  With it applied, all I get is 'gobject.py: gdb was not built with custom backtrace support, disabling.' message and not the backtrace error output.
  https://bugzilla.gnome.org/show_bug.cgi?id=613732
  https://git.gnome.org/browse/glib/commit/?id=91d4659bbf8cf88d8be905c7e0abbedce931b688




That second, and as stated in https://bugzilla.gnome.org/show_bug.cgi?id=613732 more elegant method is:
  https://bugzilla.gnome.org/show_bug.cgi?id=623552
  https://git.gnome.org/browse/glib/commit/?id=20cda557e5766cc34af8efb3a6eb4cfcea149ea7

Comment 15 James Hartsock 2015-01-09 18:48:58 UTC
Test with RHEL 7.0 without glib2-devel, no error
~~~
# rpm -qa | grep -e ^gdb -e ^glib2
gdb-7.6.1-51.el7.x86_64
glib2-2.36.3-5.el7.x86_64
gdbm-devel-1.10-8.el7.x86_64
gdbm-1.10-8.el7.x86_64

# gcore 11583
[New LWP 12764]
<snip>
[New LWP 11612]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f0ca4c01bdd in poll () from /lib64/libc.so.6
Saved corefile core.11583
~~~

Test with RHEL 7.0 and glib2-devel installed to get initial issue
~~~
# rpm -qa | grep -e ^gdb -e ^glib2
gdb-7.6.1-51.el7.x86_64
glib2-2.36.3-5.el7.x86_64
glib2-devel-2.36.3-5.el7.x86_64
gdbm-devel-1.10-8.el7.x86_64
gdbm-1.10-8.el7.x86_64

# gcore 11583
[New LWP 12764]
<snip>
[New LWP 11612]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.3600.3-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.3600.3-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
0x00007f0ca4c01bdd in poll () from /lib64/libc.so.6
Saved corefile core.11583
~~~




Now RHEL 7.1 beta -- can see that still get the "gobject.py: gdb was not built with custom backtrace support, disabling."" warning, but this is still better.  
~~~
# rpm -qa | grep -e ^gdb -e ^glib2
glib2-devel-2.40.0-4.el7.x86_64
gdb-7.6.1-64.el7.x86_64
gdbm-1.10-8.el7.x86_64
glib2-2.40.0-4.el7.x86_64

# gcore 27448
[New LWP 27518]
<snip>
[New LWP 27465]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
gobject.pyc: gdb was not built with custom backtrace support, disabling.
0x00007f14fb2a99ed in poll () from /lib64/libc.so.6
Saved corefile core.27448
~~~


So does the BZ need to be re-assigned to address the remaining warning or should it just be closed since the traceback is no longer printed in RHEL 7.1?

Comment 16 Jan Kratochvil 2015-01-11 20:46:31 UTC
Comment 13 describes that glib2-2.40.0 does not contain the full fix.

glib2-devel-2.40.0-4.el7 does not contain the backport of <https://git.gnome.org/browse/glib/commit/?id=20cda557e5766cc34af8efb3a6eb4cfcea149ea7> therefore Comment 15's behavior is expected.  This Bug is not devel_acked for RHEL-7.1, therefore it is not fixed, as expected.

Comment 19 Colin Walters 2015-04-16 22:27:47 UTC
This was already fixed as part of the rebase to 2.42 in bug 1203755.

Comment 22 errata-xmlrpc 2015-11-19 08:13:46 UTC
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-2015-2116.html


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