[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Crash-utility] [PATCH] Account for the changed type of the domain.vcpu field in Xen4




----- Original Message -----
> On Friday 07 of January 2011 16:27:55 Dave Anderson wrote:
> > ----- Original Message -----
> >
> > > The 'vcpu' field changed from a fixed array to a pointer to an array.
> > > Change xen_hyper_store_domain_context to account for this change.
> >
> > Presuming this tests OK on older hypervisor dumps, this looks OK.
> > Queued for the next release based upon testing.
> 
> Hi Dave,
> 
> older Xen hypervisors didn't have the "max_vcpus" field in struct domain, so
> there is in fact no change for them.
> 
> However, thinking about it some more, this might be affected by the increase
> of XEN_HYPER_MAX_VIRT_CPUS. Although I haven't seen a failure, let me check
> first whether a crash session on a dump from Xen 3.3 attempts to read past
> array boundaries.

As it turns out, my tests didn't work out on any of my sample hypervisor dumps,
presumably due to this patch, the XEN_HYPER_MAX_VIRT_CPUS patch, or both (?).

As one example, here's what the invocation, and then the "vcpus" command, look like
with crash-5.1.1:

  crash 5.1.1
  Copyright (C) 2002-2010  Red Hat, Inc.
  Copyright (C) 2004, 2005, 2006  IBM Corporation
  Copyright (C) 1999-2006  Hewlett-Packard Co
  Copyright (C) 2005, 2006  Fujitsu Limited
  Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
  Copyright (C) 2005  NEC Corporation
  Copyright (C) 1999, 2002, 2007  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 (GDB) 7.0
  Copyright (C) 2009 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-unknown-linux-gnu"...
  
     KERNEL: xen-syms-2.6.18-89.el5
  DEBUGINFO: ./xen-syms-2.6.18-89.el5.debug
   DUMPFILE: xen-5.2-x86_64-vmcore
       CPUS: 4
    DOMAINS: 4
     UPTIME: 00:01:36
    MACHINE: Dual-Core AMD Opteron(tm) Processor 2218  (2600 Mhz)
     MEMORY: 1 GB
    PCPU-ID: 0
       PCPU: ffff828c80217f28
    VCPU-ID: 0
       VCPU: ffff83003f01e080  (VCPU_RUNNING)
  DOMAIN-ID: 0
     DOMAIN: ffff83003f202080  (DOMAIN_RUNNING)
      STATE: CRASH
  
  crash> vcpus
     VCID  PCID       VCPU       ST T DOMID      DOMAIN     
        0     0 ffff83003f002080 RU I 32767 ffff83003f25a080
  >     1     1 ffff83003f208080 RU I 32767 ffff83003f25a080
  >     2     2 ffff83003f25c080 RU I 32767 ffff83003f25a080
  >     3     3 ffff83003fff8080 RU I 32767 ffff83003f25a080
  >*    0     0 ffff83003f01e080 RU 0     0 ffff83003f202080
        1     1 ffff83003f01c080 BL 0     0 ffff83003f202080
        2     2 ffff83003f01a080 BL 0     0 ffff83003f202080
        3     3 ffff83003f018080 BL 0     0 ffff83003f202080
  crash> 

Here's with your patches applied:

  crash 5.1.1
  Copyright (C) 2002-2010  Red Hat, Inc.
  Copyright (C) 2004, 2005, 2006  IBM Corporation
  Copyright (C) 1999-2006  Hewlett-Packard Co
  Copyright (C) 2005, 2006  Fujitsu Limited
  Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
  Copyright (C) 2005  NEC Corporation
  Copyright (C) 1999, 2002, 2007  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 (GDB) 7.0
  Copyright (C) 2009 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-unknown-linux-gnu"...
  
  crash: invalid kernel virtual address: 0  type: "fill_vcpu_struct"
  WARNING: cannot fill vcpu struct.
  crash: invalid kernel virtual address: 0  type: "fill_vcpu_struct"
  WARNING: cannot fill vcpu struct.
  crash: invalid kernel virtual address: 0  type: "fill_vcpu_struct"
  WARNING: cannot fill vcpu struct.
  crash: invalid kernel virtual address: 0  type: "fill_vcpu_struct"
  WARNING: cannot fill vcpu struct.
  crash: invalid kernel virtual address: 0  type: "fill_vcpu_struct"
  
  ... [ repeats ~7000 times ] ...
  
  crash: invalid kernel virtual address: 0  type: "fill_vcpu_struct"
  WARNING: cannot fill vcpu struct.
  crash: invalid kernel virtual address: 0  type: "fill_vcpu_struct"
  WARNING: cannot fill vcpu struct.
  crash: invalid kernel virtual address: 0  type: "fill_vcpu_struct"
  WARNING: cannot fill vcpu struct.
  crash: invalid kernel virtual address: 0  type: "fill_vcpu_struct"
  WARNING: cannot fill vcpu struct.
     KERNEL: xen-syms-2.6.18-89.el5
  DEBUGINFO: ./xen-syms-2.6.18-89.el5.debug
   DUMPFILE: xen-5.2-x86_64-vmcore
       CPUS: 4
    DOMAINS: 4
     UPTIME: 00:01:36
    MACHINE: Dual-Core AMD Opteron(tm) Processor 2218  (2600 Mhz)
     MEMORY: 1 GB
    PCPU-ID: 0
       PCPU: ffff828c80217f28
    VCPU-ID: 0
       VCPU: ffff83003f01e080  (VCPU_RUNNING)
  DOMAIN-ID: 0
     DOMAIN: ffff83003f202080  (DOMAIN_RUNNING)
      STATE: CRASH
  
  crash> vcpus
     VCID  PCID       VCPU       ST T DOMID      DOMAIN     
  WARNING: cannot get context from domain address.
    -1363873424    63       1101       RU  ?????         0       
  WARNING: cannot get context from domain address.
    -1363873424    63    3faeb4f020    RU  ?????         0       
  WARNING: cannot get context from domain address.
    -1363873424    63    3faeb4f020    RU  ?????         0       
  WARNING: cannot get context from domain address.
    -1363873424    63       1101       RU  ?????         0       
  WARNING: cannot get context from domain address.
    -1363873424    63    3faeb4f020    RU  ?????         0       
  WARNING: cannot get context from domain address.
    -1363873424    63    3faeb4f020    RU  ?????         0       
        0     0 ffff83003f002080 RU I 32767 ffff83003f25a080
  >     1     1 ffff83003f208080 RU I 32767 ffff83003f25a080
  >     2     2 ffff83003f25c080 RU I 32767 ffff83003f25a080
  >     3     3 ffff83003fff8080 RU I 32767 ffff83003f25a080
  WARNING: cannot get context from domain address.
        0     0 ffff83003fffc000 RU  ?????         0       
  WARNING: cannot get context from domain address.
    1073725539     0 ffff83003df5b000 RU  ?????         0       
  WARNING: cannot get context from domain address.
    1039511651     0 ffff83003df5a000 RU  ?????         0       
  WARNING: cannot get context from domain address.
    1039511651     0     f5800000     RU  ?????         0       
  WARNING: cannot get context from domain address.
    1039511651     0 ffffffff00ff0001 RU  ?????         0       
  WARNING: cannot get context from domain address.
    1868722030 536901988 ffff828c80193ae3 ??  ????? 7473697373612067
  WARNING: cannot get context from domain address.
    1059435008 -32000 ffff83003f25b200 RU  ????? ffff83003f25b210
  WARNING: cannot get context from domain address.
    1059435008 -32000 ffff83003f25b200 RU  ????? ffff83003f25b210
  WARNING: cannot get context from domain address.
    1059435024 -32000 ffff83003f25b210 RU  ????? ffff83003f25b220
  WARNING: cannot get context from domain address.
    1059435024 -32000 ffff83003f25b210 RU  ????? ffff83003f25b220
  WARNING: cannot get context from domain address.
    1059435040 -32000 ffff83003f25b220 ??  ????? ffff83003f25b230
  WARNING: cannot get context from domain address.
    1059435040 -32000 ffff83003f25b220 ??  ????? ffff83003f25b230
  WARNING: cannot get context from domain address.
    1059435056 -32000 ffff83003f25b230 ??  ????? ffff83003f25b240
  WARNING: cannot get context from domain address.
    1059435056 -32000 ffff83003f25b230 ??  ????? ffff83003f25b240
  WARNING: cannot get context from domain address.
    1059435072 -32000 ffff83003f25b240 ??  ?????         0       
  WARNING: cannot get context from domain address.
    1059435072 -32000 ffff83003f25b240 ??  ?????         0       
  WARNING: cannot get context from domain address.
    1059435072 -32000 ffffffff00ff0001 ??  ?????         0       
  WARNING: cannot get context from domain address.
    1868722030 536901988 ffff828c80193ae3 ??  ????? 7473697373612067
  WARNING: cannot get context from domain address.
    -976795563 -32768 ffff828c8016a400 ??  ????? 8348fb8948530000
  WARNING: cannot get context from domain address.
    -976795563 -32768 ffff828c8016a2a0 ??  ????? 8348fb8948530000
  WARNING: cannot get context from domain address.
    418153288 610044232 ffff828c80168c30 ??  ????? e52148ffff8000c5
  WARNING: cannot get context from domain address.
    418153288 610044232 ffffffff00ff0001 ??  ????? e52148ffff8000c5
  WARNING: cannot get context from domain address.
    1868722030 536901988 ffff828c80193ae3 ??  ????? 7473697373612067
  WARNING: cannot get context from domain address.
    1059435248 -32000 ffff83003f25b2f0 RU  ?????         0       
  WARNING: cannot get context from domain address.
    1059435248 -32000 ffff83003f25b2f0 RU  ?????         0       
  WARNING: cannot get context from domain address.
    1059435248 -32000       1101       RU  ?????         0       
  WARNING: cannot get context from domain address.
    1059435248 -32000    3faeb4f020    RU  ?????         0       
  WARNING: cannot get context from domain address.
    1059435248 -32000    3faeb4f020    RU  ?????         0       
  >*    0     0 ffff83003f01e080 RU 0     0 ffff83003f202080
        1     1 ffff83003f01c080 BL 0     0 ffff83003f202080
        2     2 ffff83003f01a080 BL 0     0 ffff83003f202080
        3     3 ffff83003f018080 BL 0     0 ffff83003f202080
        3     3         f        BL 0     0 ffff83003f202080
  WARNING: cannot get context from domain address.
    979304547     0 ffff83003ffe0000 RU  ?????         0       
  WARNING: cannot get context from domain address.
    1073610851     0 ffff83003df59000 RU  ?????         0       
  WARNING: cannot get context from domain address.
    1039503459     0 ffff83003df58000 RU  ?????         0       
  WARNING: cannot get context from domain address.
    1039503459     0     f5800000     RU  ?????         0       
    1059070176 -32000 ffff83003ffe8a80 ?? 0     0 ffff83003f202080
    1059070176 -32000     9af910b0     ?? 0     0 ffff83003f202080
    1059070176 -32000       10000      ?? 0     0 ffff83003f202080
    1059070176 -32000  100ff0000000000 ?? 0     0 ffff83003f202080
    1059070176 -32000       10000      ?? 0     0 ffff83003f202080
    1059070176 -32000  100ff0000000000 ?? 0     0 ffff83003f202080
    1059070176 -32000       10000      ?? 0     0 ffff83003f202080
    1059070176 -32000   ff0000000000   ?? 0     0 ffff83003f202080
    1059070176 -32000     56a4591b     ?? 0     0 ffff83003f202080
    1059070176 -32000     56a45cf0     ?? 0     0 ffff83003f202080
    1059070176 -32000     56a45d07     ?? 0     0 ffff83003f202080
    1059070176 -32000      ff0001      ?? 0     0 ffff83003f202080
    1059070176 -32000         2        ?? 0     0 ffff83003f202080
    1059070176 -32000        40        ?? 0     0 ffff83003f202080
    1059070176 -32000         4        ?? 0     0 ffff83003f202080
  WARNING: cannot get context from domain address.
    955024200 12633928 ffff828c8014a460 ??  ????? fb894810246c8948
  WARNING: cannot get context from domain address.
    955024200 12633928        61        ??  ????? fb894810246c8948
  WARNING: cannot get context from domain address.
    955024200 12633928         1        ??  ????? fb894810246c8948
  WARNING: cannot get context from domain address.
    955024200 12633928 ffff828c8014a760 ??  ????? fd894808245c8948
  WARNING: cannot get context from domain address.
    955024200 12633928 ffffffff00ff0001 ??  ????? fd894808245c8948
  WARNING: cannot get context from domain address.
    1868722030 536901988 ffff828c80193ae3 ??  ????? 7473697373612067
  WARNING: cannot get context from domain address.
    1059074560 -32000 ffff83003f203200 RU  ????? ffff83003f203210
  WARNING: cannot get context from domain address.
    1059074560 -32000 ffff83003f203200 RU  ????? ffff83003f203210
  WARNING: cannot get context from domain address.
    1059074576 -32000 ffff83003f203210 RU  ????? ffff83003f203220
  WARNING: cannot get context from domain address.
    1059074576 -32000 ffff83003f203210 RU  ????? ffff83003f203220
  WARNING: cannot get context from domain address.
    1059074592 -32000 ffff83003f203220 ??  ????? ffff83003f203230
  WARNING: cannot get context from domain address.
    1059074592 -32000 ffff83003f203220 ??  ????? ffff83003f203230
  WARNING: cannot get context from domain address.
    1059074608 -32000 ffff83003f203230 ??  ????? ffff83003f203240
  WARNING: cannot get context from domain address.
    1059074608 -32000 ffff83003f203230 ??  ????? ffff83003f203240
  WARNING: cannot get context from domain address.
    1059074624 -32000 ffff83003f203240 ??  ?????         0       
  WARNING: cannot get context from domain address.
    1059074624 -32000 ffff83003f203240 ??  ?????         0       
  WARNING: cannot get context from domain address.
    1059074624 -32000 ffffffff00ff0001 ??  ?????         0       
  WARNING: cannot get context from domain address.
    1868722030 536901988 ffff828c80193ae3 ??  ????? 7473697373612067
  WARNING: cannot get context from domain address.
    -976795563 -32768 ffff828c8016a400 ??  ????? 8348fb8948530000
  WARNING: cannot get context from domain address.
    -976795563 -32768 ffff828c8016a2a0 ??  ????? 8348fb8948530000
  WARNING: cannot get context from domain address.
    418153288 610044232 ffff828c80168c30 ??  ????? e52148ffff8000c5
  WARNING: cannot get context from domain address.
    418153288 610044232 ffffffff00ff0001 ??  ????? e52148ffff8000c5
  WARNING: cannot get context from domain address.
    1868722030 536901988 ffff828c80193ae3 ??  ????? 7473697373612067
  WARNING: cannot get context from domain address.
    1059074800 -32000 ffff83003f2032f0 RU  ?????         0       
  WARNING: cannot get context from domain address.
    1059074800 -32000 ffff83003f2032f0 RU  ?????         0       
  WARNING: cannot get context from domain address.
    1059074800 -32000       1101       RU  ?????         0       
  WARNING: cannot get context from domain address.
    1059074800 -32000    3faeb4f020    RU  ?????         0       
  WARNING: cannot get context from domain address.
    1059074800 -32000    3faeb4f020    RU  ?????         0       
  crash> 

The same kind of thing happens with all my sample dumpfiles.

I did have to remove a couple superfluous lines from the 3rd (init_tss) and
5th (domain.vcpu) patches, but they shouldn't have any bearing:

  # diff init_tss.patch 3.patch
  10d9
  < XEN_HYPER_MEMBER_OFFSET_INIT(cpu_info_guest_cpu_user_regs, "cpu_info", "guest_cpu_user_regs");
  12d10
  < XEN_HYPER_MEMBER_OFFSET_INIT(cpu_info_processor_id, "cpu_info", "processor_id");
  # diff domain_vcpu.patch 5.patch
  5d4
  < XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_shutting_down, "domain", "is_shutting_down");
  #

Anyway, I didn't look into this at all, but I'm going to hold all 5 patches
until this gets resolved.  If you want, I can make the xen-syms/vmcore pair
available.

Thanks,
  Dave


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]