Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 226872

Summary: [RHEL4] Gdb does not accurately output the backtrace.
Product: Red Hat Enterprise Linux 4 Reporter: Jan Kratochvil <jan.kratochvil>
Component: kernelAssignee: Dave Anderson <anderson>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: cagney, jan.kratochvil, jburke, roland
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0791 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-15 16:19:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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;
 }
 __initcall(gate_vma_init);


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 (6.3.0.0-1.132.EL4rh)
 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
 (gdb)




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

http://post-office.corp.redhat.com/archives/rhkernel-list/2007-February/msg00477.html

Comment 5 RHEL Product and 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.

http://rhn.redhat.com/errata/RHBA-2007-0791.html