Bug 226872 - [RHEL4] Gdb does not accurately output the backtrace.
Summary: [RHEL4] Gdb does not accurately output the backtrace.
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.0
Hardware: ia64
OS: Linux
Target Milestone: ---
: ---
Assignee: Dave Anderson
QA Contact: Brian Brock
Depends On: 222826
Blocks: 231327
TreeView+ depends on / blocked
Reported: 2007-02-01 20:06 UTC by Jan Kratochvil
Modified: 2007-11-30 22:07 UTC (History)
4 users (show)

Fixed In Version: RHBA-2007-0791
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-11-15 16:19:13 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0791 0 normal SHIPPED_LIVE Updated kernel packages available for Red Hat Enterprise Linux 4 Update 6 2007-11-14 18:25:55 UTC

Comment 2 Dave Anderson 2007-02-23 16:30:42 UTC
After applying the same patch as RHEL5.1 BZ #222826:

--- linux-2.6.9/mm/memory.c.orig
+++ linux-2.6.9/mm/memory.c
@@ -2037,8 +2037,8 @@ static int __init gate_vma_init(void)
        gate_vma.vm_mm = NULL;
        gate_vma.vm_start = FIXADDR_USER_START;
        gate_vma.vm_end = FIXADDR_USER_END;
-       gate_vma.vm_page_prot = PAGE_READONLY;
-       gate_vma.vm_flags = 0;
+       gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
+       gate_vma.vm_page_prot = __P101;
        return 0;

The gcore program still shows that strange (misspelled) message:

  # gcore 3917
  warning: The current VSYSCALL page code requires an existing execuitable.
  Use "add-symbol-file-from-memory" to load the VSYSCALL page by hand

But things work as expected.  The /proc/<pid>/maps gate page looks
like this:

  # cat /proc/3917/maps | grep a000000000000000
    a000000000000000-a000000000020000 r-xp 00000000 00:00 0

The gcore-generated core file contains the segment:

  # readelf -a core.3917
   LOAD           0x00000000002d9140 0xa000000000000000 0x0000000000000000
                  0x0000000000020000 0x0000000000020000  R E    1

And gdb works OK:

 # gdb doit core.3917
 GNU gdb Red Hat Linux (
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for details.
 This GDB was configured as "ia64-redhat-linux-gnu"...Using host libthread_db
 library "/lib/tls/libthread_db.so.1".

 Reading symbols from shared object read from target memory...done.
 Loaded system supplied DSO at 0xa000000000000000
 Core was generated by `/var/tmp/doit'.

 warning: svr4_current_sos: Can't read pathname for load map: Input/output error

 Reading symbols from /lib/tls/libc.so.6.1...done.
 Loaded symbols for /lib/tls/libc.so.6.1
 Reading symbols from /lib/ld-linux-ia64.so.2...done.
 Loaded symbols for /lib/ld-linux-ia64.so.2
 #0  0xa000000000010641 in __kernel_syscall_via_break ()
 (gdb) bt
 #0  0xa000000000010641 in __kernel_syscall_via_break ()
 #1  0x20000000001c1b20 in read () from /lib/tls/libc.so.6.1
 #2  0x2000000000105910 in _IO_file_read_internal () from /lib/tls/libc.so.6.1
 #3  0x20000000001034f0 in _IO_new_file_underflow () from /lib/tls/libc.so.6.1
 #4  0x2000000000108820 in _IO_default_uflow_internal () from  /lib/tls/libc.so.6.1
 #5  0x2000000000108440 in __uflow () from /lib/tls/libc.so.6.1
 #6  0x20000000000d81c0 in _IO_vfscanf_internal () from /lib/tls/libc.so.6.1
 #7  0x20000000000e3e10 in scanf () from /lib/tls/libc.so.6.1
 #8  0x4000000000000830 in main () at doit.c:7

Comment 4 Dave Anderson 2007-02-27 19:50:23 UTC
Patch posted to RHKL:


Comment 5 RHEL Program Management 2007-04-18 22:34:23 UTC
This request was evaluated by Red Hat Kernel Team for inclusion in a Red
Hat Enterprise Linux maintenance release, and has moved to bugzilla 
status POST.

Comment 6 Jason Baron 2007-05-23 18:36:00 UTC
committed in stream U6 build 55.4. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/

Comment 9 errata-xmlrpc 2007-11-15 16:19:13 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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