Bug 1411094

Summary: gdb: backtrace is broken on i686
Product: [Fedora] Fedora Reporter: Hironobu Ishii <ishii.hironobu>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 25CC: gbenson, jan.kratochvil, palves, pmuldoon, sergiodj, tom
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: gdb-7.12-35.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-11 07:23:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Hironobu Ishii 2017-01-08 10:58:16 UTC
Description of problem:
On i686 (or 32-bit machine), bt does not work.
Applying following upstream commit solved this bug in my environment.
  Fix some error-handling bugs in python frame filters
  http://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=30a7bb833cbd848b1814f18b91dfdafba4e86839

Version-Release number of selected component (if applicable):
gdb-7.12-29.fc25

How reproducible:
Always, but it seems to depend on core complexity or something.

Steps to Reproduce:
1. Run firefox and gcore firefox.
2. gdb /usr/lib/firefox/firefox core.XXX
3. bt in gdb

Actual results:
(gdb) bt
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set: 
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set: 
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set: 
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set: 
#0  0xffffffff in #1  0xffffffff in 
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set: 
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set: 
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set: 
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set: 
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set: 

Expected results:
This log was collected after applying the upstream patch.
(gdb) bt
#0  0xb7730d05 in __kernel_vsyscall ()
#1  0xb73f655f in poll () at ../sysdeps/unix/syscall-template.S:84
#2  0xb6123f4c in poll (__timeout=-1, __nfds=5, __fds=0xa2930100)
    at /usr/include/bits/poll2.h:46
#3  0xb6123f4c in g_poll (fds=0xa2930100, nfds=5, timeout=-1) at gpoll.c:124
#4  0xb2cb07ba in PollWrapper(GPollFD*, guint, gint) (ufds=ufds@entry=0xa2930100, nfsd=nfsd@entry=5, timeout_=timeout_@entry=-1)
    at /usr/src/debug/firefox-50.1.0/firefox-50.1.0/widget/gtk/nsAppShell.cpp:42
#5  0xb61136e8 in g_main_context_poll (priority=<optimized out>, n_fds=5, fds=0xa2930100, timeout=<optimized out>, context=0xb712da90) at gmain.c:4228
#6  0xb61136e8 in g_main_context_iterate (context=context@entry=0xb712da90, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3924
#7  0xb6113837 in g_main_context_iteration (context=0xb712da90, may_block=1)
    at gmain.c:3990
#8  0xb2cb0847 in nsAppShell::ProcessNextNativeEvent(bool) (this=0xa9749b50, mayWait=true)
    at /usr/src/debug/firefox-50.1.0/firefox-50.1.0/widge/gtk/nsAppShell.cpp:270

Additional info:
This bug is also repoted in debian.
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814558

Comment 1 Jan Kratochvil 2017-01-08 12:00:22 UTC
FAIL->PASS for i686 host (not for x86_64 -m32):
  gdb.python/py-framefilter-thread.exp: bt with filters

Comment 2 Fedora Update System 2017-01-08 12:44:45 UTC
gdb-7.12-35.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-e84f443a20

Comment 3 Fedora Update System 2017-01-09 02:25:04 UTC
gdb-7.12-35.fc25 has been pushed to the Fedora 25 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-2017-e84f443a20

Comment 4 Fedora Update System 2017-01-11 07:23:23 UTC
gdb-7.12-35.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.