[Crash-utility] crash-4.0-2.10 ppc64 4-level pagetable fixes
Dave Anderson
anderson at redhat.com
Tue Nov 8 19:17:37 UTC 2005
Badari Pulavarty wrote:
> Hi Dave,
>
> Here are the fixes to make crash understand PPC64 4-level pagetable
> layout.
>
> I am not a PPC64 expert, I coded up looking at the ppc64 kernel
> pagetable handling code. It seems to work fine for most part.
>
> But I do get occasional, "user virtual" translation failures.
> I think I screwed up PMD calculations. I am not able to spot
> the problem. Can some one help ?
>
> Thanks,
> Badari
It's possible that the virtual address that you're examining
is not backed by physical memory (yet). If you do a "vtop"
on the address that gives you the error, you may see it's
simply not mapped.
For example, I created a little program call "bogus" that
does a malloc of 1000000, prints the beginning address
of the region, and then pauses:
main()
{
char *buf;
buf = malloc(1000000);
printf("buf: %lx\n", buf);
pause();
}
When I run it, it prints "buf: 2a95586010". If I look at
it with crash, the first page of data is instantiated, i.e.
it was already in place before the malloc() call, but if
I go to any page beyond that, it does this:
crash> set 13474
PID: 13474
COMMAND: "bogus"
TASK: 100310f57f0 [THREAD_INFO: 10005394000]
CPU: 1
STATE: TASK_INTERRUPTIBLE
crash> rd 2a95586010
2a95586010: 0000000000000000 ........
crash> rd 2a95587010
rd: invalid user virtual address: 2a95587010 type: "64-bit UVADDR"
crash> vtop 2a95587010
VIRTUAL PHYSICAL
2a95587010 (not mapped)
PGD: 279cb550 => 365fa067
PMD: 365fa550 => 27ce6067
PTE: 27ce6c38 => 0
VMA START END FLAGS FILE
1003c5898d8 2a95584000 2a9567c000 100073
crash>
Dave
>
> elm3b157:~/crash-4.0-2.10.new # ./crash
>
> crash 4.0-2.10
> Copyright (C) 2002, 2003, 2004, 2005 Red Hat, Inc.
> Copyright (C) 2004, 2005 IBM Corporation
> Copyright (C) 1999-2005 Hewlett-Packard Co
> Copyright (C) 2005 Fujitsu Limited
> Copyright (C) 2005 NEC Corporation
> Copyright (C) 1999, 2002 Silicon Graphics, Inc.
> Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
> This program 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. Enter "help copying" to see the conditions.
> This program has absolutely no warranty. Enter "help warranty" for
> details.
>
> GNU gdb 6.1
> 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 "powerpc64-unknown-linux-gnu"...
>
> KERNEL: /usr/src/linux-2.6.14/vmlinux
> DUMPFILE: /dev/mem
> CPUS: 4
> DATE: Tue Nov 8 11:02:01 2005
> UPTIME: 06:41:51
> LOAD AVERAGE: 0.08, 0.03, 0.06
> TASKS: 103
> NODENAME: elm3b157
> RELEASE: 2.6.14
> VERSION: #1 SMP Thu Nov 3 13:22:57 PST 2005
> MACHINE: ppc64 (1655 Mhz)
> MEMORY: 3.7 GB
> PID: 32605
> COMMAND: "crash"
> TASK: c0000000e304e040 [THREAD_INFO: c0000000934c8000]
> CPU: 0
> STATE: TASK_RUNNING (ACTIVE)
>
> crash> set
> PID: 32605
> COMMAND: "crash"
> TASK: c0000000e304e040 [THREAD_INFO: c0000000934c8000]
> CPU: 1
> STATE: TASK_RUNNING (ACTIVE)
> crash> vm
> PID: 32605 TASK: c0000000e304e040 CPU: 1 COMMAND: "crash"
> MM PGD RSS TOTAL_VM
> c0000000dc048080 c000000093e2f000 137464k 76800k
> VMA START END FLAGS FILE
> c0000000e3c16ee8 100000 103000 75
> c0000000d7b92ee8 10000000 10590000
> 1875 /root/crash-4.0-2.10.new/crash
> c0000000d7b92870 1059f000 1069a000
> 101873 /root/crash-4.0-2.10.new/crash
> c0000000d7b92420 1069a000 11858000 100073
> c0000000e3979cc0 40000000000 4000001d000
> 875 /lib64/ld-2.3.3.so
> c0000000e23f57b8 4000001d000 40000022000 100073
> c0000000e23f5700 4000002d000 40000030000
> 100873 /lib64/ld-2.3.3.so
> c0000000ebf55648 40000048000 400000ba000
> 75 /lib64/tls/libm.so.6
> c0000000e3c162b0 400000ba000 400000c8000
> 70 /lib64/tls/libm.so.6
> c0000000ebf554d8 400000c8000 400000cf000
> 100073 /lib64/tls/libm.so.6
> c0000000ebf55368 400000cf000 40000130000
> 75 /lib64/libncurses.so.5.4
> c0000000ebf55d78 40000130000 4000013f000
> 70 /lib64/libncurses.so.5.4
> c0000000ebf55a98 4000013f000 40000156000
> 100073 /lib64/libncurses.so.5.4
> c0000000ebf55420 40000156000 40000159000 100073
> c0000000ebf552b0 40000159000 4000015d000
> 75 /lib64/libdl.so.2
> c0000000ebf55e30 4000015d000 40000169000
> 70 /lib64/libdl.so.2
> c0000000ebf55870 40000169000 4000016d000
> 100073 /lib64/libdl.so.2
> c0000000e3979d78 4000016d000 40000184000
> 75 /lib64/libz.so.1.2.1
> c0000000ebf55590 40000184000 4000018d000
> 70 /lib64/libz.so.1.2.1
> c0000000e39791f8 4000018d000 40000194000
> 100073 /lib64/libz.so.1.2.1
> c0000000ebf557b8 40000194000 40000195000 100073
> c0000000e3979590 40000195000 400002d6000
> 75 /lib64/tls/libc.so.6
> c0000000e39797b8 400002d6000 400002e5000
> 70 /lib64/tls/libc.so.6
> c0000000e23f5870 400002e5000 40000303000
> 100073 /lib64/tls/libc.so.6
> c0000000e3979c08 40000303000 40000307000 100073
> c0000000e1308e30 40000307000 4000033a000
> 71 /usr/lib/locale/en_US.utf8/LC_CTYPE
> c0000000d7b92700 4000033a000 4000035a000 100073
> c0000000eb825b50 4000035a000 40000361000
> 75 /lib64/tls/libthread_db.so.1
> c0000000eb825368 40000361000 4000036a000
> 70 /lib64/tls/libthread_db.so.1
> c0000000eb825870 4000036a000 40000372000
> 100073 /lib64/tls/libthread_db.so.1
> crash> rd -u 100000
> 100000: 7f454c4602020100 .ELF....
> crash> rd -u 40000169000
> rd: invalid user virtual address: 40000169000 type: "64-bit UVADDR"
>
> ------------------------------------------------------------------------------------------------------------------------
> Name: crash-ppc64-4level.patch
> crash-ppc64-4level.patch Type: text/x-patch
> Encoding: 7bit
>
> ------------------------------------------------------------------------------------------------------------------------
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20051108/c62c9042/attachment.htm>
More information about the Crash-utility
mailing list