[Crash-utility] The problems when running SuSE 12 on VirtualBox

Nan Xiao xiaonan830818 at gmail.com
Tue Nov 17 01:55:34 UTC 2015


Hi Dietmar & Dave,

Thanks very much for your time and answer! But for question 3, there
is still no answer.

I just execute "crash" with no parameters in the command line, and want to debug
Dom0:

# crash
......
WARNING: could not find MAGIC_START!
WARNING: cannot read linux_banner string
crash: /var/tmp/vmlinux-3.12.49-6-xen.gz_JWv5bU and /dev/mem do not match!
......

So why does this operation fail?
Best Regards
Nan Xiao


On Mon, Nov 16, 2015 at 10:48 PM, Dave Anderson <anderson at redhat.com> wrote:
>
>
> ----- Original Message -----
>> Am Montag 16 November 2015, 14:01:35 schrieb Nan Xiao:
>> > Hi Dave,
>> >
>> > >> (2) "machine type mismatch"
>> > >> WARNING: machine type mismatch:
>> > >> crash utility: X86_64
>> > >> /var/tmp/xen-4.5.1_10-1.gz_E5lLat: X86
>> > >>
>> > >> But according to "uname -a":
>> > >>
>> > >>  # uname -a
>> > >> Linux linux-6ev3 3.12.49-6-xen #1 SMP Mon Oct 26 16:05:37 UTC 2015
>> > >> (11560c3) x86_64 x86_64 x86_64 GNU/Linux
>> > >>
>> > >> The running SuSE is also a 64-bit OS, so whether can remove these
>> > >> warnings?
>> >
>> > > The mismatch message says that "/var/tmp/xen-4.5.1_10-1.gz_E5lLat" is an X86
>> > > 32-bit binary.  You cannot use a 32-bit xen binary with a 64-bit crash utility
>> > > binary.
>> >
>> > > Run "gunzip xen-4.5.1_10-1.gz", and then run "file" on the uncompressed file.
>> > > If it's a 32-bit binary, and the dumpfile came from that kernel, then you need
>> > > to use a 32-bit crash utility binary.  If the dumpfile came from a 64-bit kernel,
>> > > then you're using the wrong xen binary.
>> >
>> > According to this
>> > post(http://lists.xen.org/archives/html/xen-users/2015-10/msg00141.html),
>> > although the xen file is 32-bit, it is the correct file for running on
>> > 64-bit OS. So I am not sure it should be considered as a bug.
>>
>> No it's not a bug.
>> The file you mentioned is only used for booting the hypervisor. For debugging
>> the hypervisor a statically linked hypervisor file has to be used.
>>
>> On SLES11 SP4  I have for booting the xen hypervisor:
>> # file xen-4.4.2_12-23.1
>> xen-4.4.2_12-23.1_x2: ELF 32-bit LSB executable, Intel 80386, version 1
>> (SYSV), statically linked, stripped
>>
>> For working with crash and the vmcore:
>> # file xen-syms-4.4.2_12-23.1
>> xen-syms-4.4.2_12-23.1_x2: ELF 64-bit LSB executable, x86-64, version 1
>> (SYSV), statically linked, not stripped
>
>
> Hi Dietmar,
>
> Thanks for clarifying that.  I should have noticed he was trying to use the
> actual xen binary instead of the xen-syms file --  which is specified in the
> crash(8) man page.
>
> And I wasn't even aware that the actual xen binary is a 32-bit image -- good
> to know...
>
> Thanks,
>   Dave
>
>
>
>
>
>
>>
>> >
>> > >> (3)
>> > >>
>> > >> WARNING: could not find MAGIC_START!
>> > >> WARNING: cannot read linux_banner string
>> > >> crash: /var/tmp/vmlinux-3.12.49-6-xen.gz_FjRFMJ and /dev/mem do not
>> > >> match!
>> > >>
>> > >> How can I fix this issue and run crash on SuSE?
>> >
>> > > For starters, make sure the kernel, the dumpfile, and the crash binary
>> > > are all
>> > > 32-bit or all 64-bit, whichever is appropriate.
>> >
>> >  # which crash
>> > /usr/bin/crash
>> >
>> > # file /usr/bin/crash
>> > /usr/bin/crash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
>> > dynamically linked (uses shared libs), for GNU/Linux 3.0.0,
>> > BuildID[sha1]=e6f9921f98c5b4daedd8dac798c139b77676b588, stripped
>> >
>> > Using "crash /boot/vmlinux-3.12.49-6-xen.gz /proc/kcore" works OK:
>>
>> This is expected as this is similar to the xen behaviour.
>> For booting:
>> # file vmlinuz-3.0.101-63-xen
>> vmlinuz-3.0.101-63-xen: Linux/x86 Kernel, Setup Version 0x20b, bzImage,
>> Version 3.0.101, Version 3.0.101-63, RO-rootFS, swap_dev 0x3, Normal VGA
>>
>> And for debugging:
>> # file vmlinux-3.0.101-63-xen
>> vmlinux-3.0.101-63-xen: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
>> statically linked, not stripped
>>
>> Dietmar.
>>
>> >
>> > # file /proc/kcore
>> > /proc/kcore: ELF 64-bit LSB core file x86-64, version 1 (SYSV),
>> > SVR4-style, from 'root=UUID=ed63d5d7-1d2f-45ea-a77b-5b3ae05c1c2e
>> > resume=/dev/sda1 splash=silent q'
>> >
>> >  # crash /boot/vmlinux-3.12.49-6-xen.gz /proc/kcore
>> >
>> > crash 7.1.3
>> > Copyright (C) 2002-2014  Red Hat, Inc.
>> > Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
>> > Copyright (C) 1999-2006  Hewlett-Packard Co
>> > Copyright (C) 2005, 2006, 2011, 2012  Fujitsu Limited
>> > Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
>> > Copyright (C) 2005, 2011  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.6
>> > Copyright (C) 2013 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: /boot/vmlinux-3.12.49-6-xen.gz
>> >    DEBUGINFO: /usr/lib/debug/boot/vmlinux-3.12.49-6-xen.debug
>> >     DUMPFILE: /proc/kcore
>> >         CPUS: 1
>> >         DATE: Mon Nov 16 00:59:02 2015
>> >       UPTIME: 04:55:39
>> > LOAD AVERAGE: 0.08, 0.03, 0.05
>> >        TASKS: 241
>> >     NODENAME: linux-6ev3
>> >      RELEASE: 3.12.49-6-xen
>> >      VERSION: #1 SMP Mon Oct 26 16:05:37 UTC 2015 (11560c3)
>> >      MACHINE: x86_64  (2596 Mhz)
>> >       MEMORY: 855.2 MB
>> >          PID: 7472
>> >      COMMAND: "crash"
>> >         TASK: ffff880019ab6540  [THREAD_INFO: ffff880002dcc000]
>> >          CPU: 0
>> >        STATE: TASK_RUNNING (ACTIVE)
>> >
>> > So I think all the files are 64-bits.
>> >
>> > Thanks!
>> > Best Regards
>> > Nan Xiao
>> >
>> >
>> > On Fri, Nov 13, 2015 at 10:54 PM, Dave Anderson <anderson at redhat.com>
>> > wrote:
>> > >
>> > >
>> > > ----- Original Message -----
>> > >> Hi all,
>> > >>
>> > >> Firstly, I am not sure whether posting this issue on this mailing list
>> > >> is appropriate, if not,
>> > >> please forgive me, thanks!
>> > >>
>> > >> I install SuSE Enterprise Linux 12 (Xen version) on VirtualBox, and want
>> > >> to use crash.
>> > >> Executing "crash" command, and the output likes this:
>> > >>
>> > >> # crash
>> > >>
>> > >> crash 7.1.3
>> > >> Copyright (C) 2002-2014  Red Hat, Inc.
>> > >> Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
>> > >> Copyright (C) 1999-2006  Hewlett-Packard Co
>> > >> Copyright (C) 2005, 2006, 2011, 2012  Fujitsu Limited
>> > >> Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
>> > >> Copyright (C) 2005, 2011  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.
>> > >>
>> > >> crash: /boot/symtypes-3.12.49-6-xen.gz: original filename unknown
>> > >>   Use "-f /boot/symtypes-3.12.49-6-xen.gz" on command line to prevent
>> > >> this message.
>> > >>
>> > >> crash: /boot/symtypes-3.12.49-6-default.gz: original filename unknown
>> > >>   Use "-f /boot/symtypes-3.12.49-6-default.gz" on command line to
>> > >> prevent this message.
>> > >>
>> > >> crash: /boot/xen-4.5.1_10-1.gz: original filename unknown
>> > >>   Use "-f /boot/xen-4.5.1_10-1.gz" on command line to prevent this
>> > >>   message.
>> > >>
>> > >> WARNING: machine type mismatch:
>> > >> crash utility: X86_64
>> > >> /var/tmp/xen-4.5.1_10-1.gz_E5lLat: X86
>> > >>
>> > >> crash: /boot/xen-4.5.gz: original filename unknown
>> > >>   Use "-f /boot/xen-4.5.gz" on command line to prevent this message.
>> > >>
>> > >> WARNING: machine type mismatch:
>> > >> crash utility: X86_64
>> > >> /var/tmp/xen-4.5.gz_0BL7f2: X86
>> > >>
>> > >> crash: /boot/xen-4.gz: original filename unknown
>> > >>   Use "-f /boot/xen-4.gz" on command line to prevent this message.
>> > >>
>> > >> WARNING: machine type mismatch:
>> > >> crash utility: X86_64
>> > >> /var/tmp/xen-4.gz_PW97tB: X86
>> > >>
>> > >> crash: /boot/xen-dbg-4.5.1_10-1.gz: original filename unknown
>> > >>   Use "-f /boot/xen-dbg-4.5.1_10-1.gz" on command line to prevent this
>> > >>   message.
>> > >>
>> > >> WARNING: machine type mismatch:
>> > >> crash utility: X86_64
>> > >> /var/tmp/xen-dbg-4.5.1_10-1.gz_zcILOa: X86
>> > >>
>> > >> crash: /boot/xen-dbg-4.5.gz: original filename unknown
>> > >>   Use "-f /boot/xen-dbg-4.5.gz" on command line to prevent this message.
>> > >>
>> > >> WARNING: machine type mismatch:
>> > >> crash utility: X86_64
>> > >> /var/tmp/xen-dbg-4.5.gz_AEpJfK: X86
>> > >>
>> > >> crash: /boot/xen-dbg-4.gz: original filename unknown
>> > >>   Use "-f /boot/xen-dbg-4.gz" on command line to prevent this message.
>> > >>
>> > >> WARNING: machine type mismatch:
>> > >> crash utility: X86_64
>> > >> /var/tmp/xen-dbg-4.gz_np36Nj: X86
>> > >>
>> > >> crash: /boot/xen-dbg.gz: original filename unknown
>> > >>   Use "-f /boot/xen-dbg.gz" on command line to prevent this message.
>> > >>
>> > >> WARNING: machine type mismatch:
>> > >> crash utility: X86_64
>> > >> /var/tmp/xen-dbg.gz_1tAiuT: X86
>> > >>
>> > >> crash: /boot/xen.gz: original filename unknown
>> > >>   Use "-f /boot/xen.gz" on command line to prevent this message.
>> > >>
>> > >> WARNING: machine type mismatch:
>> > >> crash utility: X86_64
>> > >> /var/tmp/xen.gz_htZLuv: X86
>> > >>
>> > >> crash: /boot/symvers-3.12.49-6-xen.gz: original filename unknown
>> > >>   Use "-f /boot/symvers-3.12.49-6-xen.gz" on command line to prevent
>> > >> this message.
>> > >>
>> > >> GNU gdb (GDB) 7.6
>> > >> Copyright (C) 2013 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"...
>> > >>
>> > >> WARNING: could not find MAGIC_START!
>> > >> WARNING: cannot read linux_banner string
>> > >> crash: /var/tmp/vmlinux-3.12.49-6-xen.gz_FjRFMJ and /dev/mem do not
>> > >> match!
>> > >>
>> > >> Usage:
>> > >>
>> > >>  crash [OPTION]... NAMELIST MEMORY-IMAGE[@ADDRESS]     (dumpfile form)
>> > >>  crash [OPTION]... [NAMELIST]                          (live system
>> > >>  form)
>> > >>
>> > >> Enter "crash -h" for details.
>> > >>
>> > >> My question are as follows:
>> > >>
>> > >> (1) There are so may warnings like this:
>> > >>
>> > >> crash: xxxxxx: original filename unknown
>> > >>   Use "-f xxxxxx" on command line to prevent this message.
>> > >>
>> > >> Do I need to add somay "-f xxxxxx" options on command line? Is there
>> > >> any better method?
>> > >
>> > > The message above simply mean that the original filename of the
>> > > compressed
>> > > file was not stored in the file's header.  That means that whoever
>> > > created
>> > > the compressed file used "gzip -n" or "--no-name":
>> > >
>> > >   $ man gzip
>> > >   ... [ cut ] ...
>> > >
>> > >      -n --no-name
>> > >           When  compressing,  do not save the original file name and time
>> > >           stamp by default. (The original name is always saved if the
>> > >           name
>> > >           had to be truncated.) When decompressing, do not restore the
>> > >           original file name if present (remove only the gzip suffix from
>> > >           the compressed file name) and do not restore the original time
>> > >           stamp
>> > >           if present (copy it from the compressed file). This option is
>> > >           the
>> > >           default when decompressing.
>> > >   ...
>> > >
>> > >> (2) "machine type mismatch"
>> > >> WARNING: machine type mismatch:
>> > >> crash utility: X86_64
>> > >> /var/tmp/xen-4.5.1_10-1.gz_E5lLat: X86
>> > >>
>> > >> But according to "uname -a":
>> > >>
>> > >>  # uname -a
>> > >> Linux linux-6ev3 3.12.49-6-xen #1 SMP Mon Oct 26 16:05:37 UTC 2015
>> > >> (11560c3) x86_64 x86_64 x86_64 GNU/Linux
>> > >>
>> > >> The running SuSE is also a 64-bit OS, so whether can remove these
>> > >> warnings?
>> > >
>> > > The mismatch message says that "/var/tmp/xen-4.5.1_10-1.gz_E5lLat" is an
>> > > X86
>> > > 32-bit binary.  You cannot use a 32-bit xen binary with a 64-bit crash
>> > > utility
>> > > binary.
>> > >
>> > > Run "gunzip xen-4.5.1_10-1.gz", and then run "file" on the uncompressed
>> > > file.
>> > > If it's a 32-bit binary, and the dumpfile came from that kernel, then you
>> > > need
>> > > to use a 32-bit crash utility binary.  If the dumpfile came from a 64-bit
>> > > kernel,
>> > > then you're using the wrong xen binary.
>> > >
>> > >> (3)
>> > >>
>> > >> WARNING: could not find MAGIC_START!
>> > >> WARNING: cannot read linux_banner string
>> > >> crash: /var/tmp/vmlinux-3.12.49-6-xen.gz_FjRFMJ and /dev/mem do not
>> > >> match!
>> > >>
>> > >> How can I fix this issue and run crash on SuSE?
>> > >
>> > > For starters, make sure the kernel, the dumpfile, and the crash binary are all
>> > > 32-bit or all 64-bit, whichever is appropriate.
>> > >
>> > > Dave
>> > >
>> > >>
>> > >> Thanks very much in advance!
>> > >> Best Regards
>> > >> Nan Xiao
>> > >>
>> > >> --
>> > >> Crash-utility mailing list
>> > >> Crash-utility at redhat.com
>> > >> https://www.redhat.com/mailman/listinfo/crash-utility
>> > >>
>> > >
>> > > --
>> > > Crash-utility mailing list
>> > > Crash-utility at redhat.com
>> > > https://www.redhat.com/mailman/listinfo/crash-utility
>> >
>> > --
>> > Crash-utility mailing list
>> > Crash-utility at redhat.com
>> > https://www.redhat.com/mailman/listinfo/crash-utility
>> >
>>
>> --
>> Company details: http://ts.fujitsu.com/imprint.html
>>
>> --
>> Crash-utility mailing list
>> Crash-utility at redhat.com
>> https://www.redhat.com/mailman/listinfo/crash-utility
>>
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility




More information about the Crash-utility mailing list