FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 05-28-2010, 12:32 AM
Gui Jianfeng
 
Default crash can't handle virsh dump file

Hi all,

I made use of "virsh dump" to generate a dumpfile, but crash seems fails at initializing time.
I decode the dumpfile and found there's a "block" header section, but seems crash doesn't support
such section so it failed. Am i missing something?

--
Regards
Gui Jianfeng

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 05-28-2010, 09:19 AM
Gui Jianfeng
 
Default crash can't handle virsh dump file

Gui Jianfeng wrote:
> Hi all,
>
> I made use of "virsh dump" to generate a dumpfile, but crash seems fails at initializing time.
> I decode the dumpfile and found there's a "block" header section, but seems crash doesn't support
> such section so it failed. Am i missing something?

Any one can help? How can i make use of crash checking the dumpfile?

--
Regards
Gui Jianfeng

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 05-28-2010, 09:32 AM
Gui Jianfeng
 
Default crash can't handle virsh dump file

Paolo Bonzini wrote:
> On 05/28/2010 11:19 AM, Gui Jianfeng wrote:
>> Gui Jianfeng wrote:
>>> Hi all,
>>>
>>> I made use of "virsh dump" to generate a dumpfile, but crash seems
>>> fails at initializing time.
>>> I decode the dumpfile and found there's a "block" header section, but
>>> seems crash doesn't support
>>> such section so it failed. Am i missing something?
>>
>> Any one can help? How can i make use of crash checking the dumpfile?
>
> Something like the attached should do it (untested because I don't know
> where the crash upstream repo is, though I have likely asked this already).

Thanks for sharing, i'll try it.

Thanks,
Gui

>
> Thanks,
>
> Paolo
>

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 05-28-2010, 09:37 AM
Paolo Bonzini
 
Default crash can't handle virsh dump file

On 05/28/2010 11:19 AM, Gui Jianfeng wrote:

Gui Jianfeng wrote:

Hi all,

I made use of "virsh dump" to generate a dumpfile, but crash seems
fails at initializing time. I decode the dumpfile and found there's
a "block" header section, but seems crash doesn't support such
section so it failed. Am i missing something?


Any one can help? How can i make use of crash checking the dumpfile?


Sorry, I attached a stale version of the patch.

Dump files do not include disk state, so the bare minimum handling of
block sections should suffice.


Paolo
diff --git a/qemu-load.c b/qemu-load.c
index 7acff62..9e35866 100644
--- a/qemu-load.c
+++ b/qemu-load.c
@@ -243,6 +243,33 @@ ram_init_load (struct qemu_device_list *dl,
&ram, section_id, instance_id);
}

+
+#define BLK_MIG_FLAG_EOS 2
+
+static uint32_t
+block_load (struct qemu_device *d, FILE *fp, enum qemu_save_section sec)
+{
+ uint64_t header;
+
+ header = get_be64 (fp);
+ assert (header == BLK_MIG_FLAG_EOS);
+}
+
+static struct qemu_device *
+block_init_load (struct qemu_device_list *dl,
+ uint32_t section_id, uint32_t instance_id,
+ uint32_t version_id, bool live, FILE *fp)
+{
+ static struct qemu_device_vtbl block = {
+ "block",
+ block_load,
+ NULL
+ };
+
+ return device_alloc (dl, sizeof (struct qemu_device),
+ &block, section_id, instance_id);
+}
+
/* cpu_common loader. */

struct qemu_device_cpu_common {
@@ -551,6 +578,7 @@ const struct qemu_device_loader devices_x86_64[] = {
{ "cpu_common", cpu_common_init_load },
{ "kvm-tpr-opt", kvm_tpr_opt_init_load },
{ "cpu", cpu_init_load_64 },
+ { "block", block_init_load },
{ "ram", ram_init_load },
{ "timer", timer_init_load },
{ NULL }
@@ -560,6 +588,7 @@ const struct qemu_device_loader devices_x86_32[] = {
{ "cpu_common", cpu_common_init_load },
{ "kvm-tpr-opt", kvm_tpr_opt_init_load },
{ "cpu", cpu_init_load_32 },
+ { "block", block_init_load },
{ "ram", ram_init_load },
{ "timer", timer_init_load },
{ NULL }
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 05-28-2010, 10:34 PM
Dave Anderson
 
Default crash can't handle virsh dump file

----- "Gui Jianfeng" <guijianfeng@cn.fujitsu.com> wrote:

> Paolo Bonzini wrote:
> > On 05/28/2010 11:19 AM, Gui Jianfeng wrote:
> >> Gui Jianfeng wrote:
> >>> Hi all,
> >>>
> >>> I made use of "virsh dump" to generate a dumpfile, but crash seems fails at initializing time.
> >>> I decode the dumpfile and found there's a "block" header section, but seems crash doesn't support
> >>> such section so it failed. Am i missing something?
> >>
> >> Any one can help? How can i make use of crash checking the dumpfile?
> >
> > Something like the attached should do it (untested because I don't know
> > where the crash upstream repo is, though I have likely asked this already).
>
> Thanks for sharing, i'll try it.
>
> Thanks,
> Gui
>
> >
> > Thanks,
> >
> > Paolo
> >

I missed all the excitement by taking today off. Can you let
us know how Paolo's patch worked for you?

Thanks,
Dave

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 05-31-2010, 03:11 AM
Gui Jianfeng
 
Default crash can't handle virsh dump file

Dave Anderson wrote:
> ----- "Gui Jianfeng" <guijianfeng@cn.fujitsu.com> wrote:
>
>> Paolo Bonzini wrote:
>>> On 05/28/2010 11:19 AM, Gui Jianfeng wrote:
>>>> Gui Jianfeng wrote:
>>>>> Hi all,
>>>>>
>>>>> I made use of "virsh dump" to generate a dumpfile, but crash seems fails at initializing time.
>>>>> I decode the dumpfile and found there's a "block" header section, but seems crash doesn't support
>>>>> such section so it failed. Am i missing something?
>>>> Any one can help? How can i make use of crash checking the dumpfile?
>>> Something like the attached should do it (untested because I don't know
>>> where the crash upstream repo is, though I have likely asked this already).
>> Thanks for sharing, i'll try it.
>>
>> Thanks,
>> Gui
>>
>>> Thanks,
>>>
>>> Paolo
>>>
>
> I missed all the excitement by taking today off. Can you let
> us know how Paolo's patch worked for you?

Paolo's patch doesn't work for me. I run "crash" with the patch applied,
crash crashed. Here is the debug output.

crash 5.0.3
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.

/home/guijf/core.dump: QEMU_VM_FILE_MAGIC
^Mplease wait... (scanning KVM dumpfile)
qemu_load: "block"
qemu_load: "ram"
qemu_load: "block"
qemu_load: "ram"
qemu_load: "block"
qemu_load: "ram"
qemu_load: "block"
qemu_load: "ram"
qemu_load: "block"
qemu_load: "ram"
qemu_load: "block"
qemu_load: "ram"
qemu_load: "block"
qemu_load: "ram"
qemu_load: "block"
qemu_load: "ram"
...
qemu_load: "block"
qemu_load: "ram"
qemu_load: "block"
qemu_load: "ram"
qemu_load: "block"
qemu_load: "ram"
qemu_load: "kvm-tpr-opt"
Segmentation fault (core dumped)

Thanks,
Gui

>
> Thanks,
> Dave
>
>

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 05-31-2010, 07:17 AM
Paolo Bonzini
 
Default crash can't handle virsh dump file

On 05/31/2010 05:11 AM, Gui Jianfeng wrote:

Dave Anderson wrote:

----- "Gui Jianfeng"<guijianfeng@cn.fujitsu.com> wrote:


Paolo Bonzini wrote:

On 05/28/2010 11:19 AM, Gui Jianfeng wrote:

Gui Jianfeng wrote:

Hi all,

I made use of "virsh dump" to generate a dumpfile, but crash seems fails at initializing time.
I decode the dumpfile and found there's a "block" header section, but seems crash doesn't support
such section so it failed. Am i missing something?

Any one can help? How can i make use of crash checking the dumpfile?

Something like the attached should do it (untested because I don't know
where the crash upstream repo is, though I have likely asked this already).

Thanks for sharing, i'll try it.

Thanks,
Gui


Thanks,

Paolo



I missed all the excitement by taking today off. Can you let
us know how Paolo's patch worked for you?


Paolo's patch doesn't work for me. I run "crash" with the patch applied,
crash crashed. Here is the debug output.


Ok, at least the loading worked though. I'll take a look.

Paolo

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 05-31-2010, 07:27 AM
Gui Jianfeng
 
Default crash can't handle virsh dump file

Paolo Bonzini wrote:
> On 05/31/2010 05:11 AM, Gui Jianfeng wrote:
>> Dave Anderson wrote:
>>> ----- "Gui Jianfeng"<guijianfeng@cn.fujitsu.com> wrote:
>>>
>>>> Paolo Bonzini wrote:
>>>>> On 05/28/2010 11:19 AM, Gui Jianfeng wrote:
>>>>>> Gui Jianfeng wrote:
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I made use of "virsh dump" to generate a dumpfile, but crash
>>>>>>> seems fails at initializing time.
>>>>>>> I decode the dumpfile and found there's a "block" header section,
>>>>>>> but seems crash doesn't support
>>>>>>> such section so it failed. Am i missing something?
>>>>>> Any one can help? How can i make use of crash checking the dumpfile?
>>>>> Something like the attached should do it (untested because I don't
>>>>> know
>>>>> where the crash upstream repo is, though I have likely asked this
>>>>> already).
>>>> Thanks for sharing, i'll try it.
>>>>
>>>> Thanks,
>>>> Gui
>>>>
>>>>> Thanks,
>>>>>
>>>>> Paolo
>>>>>
>>>
>>> I missed all the excitement by taking today off. Can you let
>>> us know how Paolo's patch worked for you?
>>
>> Paolo's patch doesn't work for me. I run "crash" with the patch applied,
>> crash crashed. Here is the debug output.
>
> Ok, at least the loading worked though. I'll take a look.

According to coredump, seems crash crashed at get_idt_base().
device_find_instance() fails to find "cpu" instance.

Thanks,
Gui

>
> Paolo
>
>

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 05-31-2010, 07:30 AM
Paolo Bonzini
 
Default crash can't handle virsh dump file

According to coredump, seems crash crashed at get_idt_base().
device_find_instance() fails to find "cpu" instance.


I think Dave already has a patch for this.

Paolo

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 05-31-2010, 07:45 AM
Gui Jianfeng
 
Default crash can't handle virsh dump file

Paolo Bonzini wrote:
>> According to coredump, seems crash crashed at get_idt_base().
>> device_find_instance() fails to find "cpu" instance.
>
> I think Dave already has a patch for this.
>

Hope to see it soon.

Thanks
Gui

> Paolo
>
>

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 08:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org