Patchwork kvm segfaulting

login
register
mail settings
Submitter Paolo Bonzini
Date Feb. 13, 2013, 3:24 p.m.
Message ID <511BB031.9030307@redhat.com>
Download mbox | patch
Permalink /patch/220167/
State New
Headers show

Comments

Paolo Bonzini - Feb. 13, 2013, 3:24 p.m.
Il 13/02/2013 15:30, Stefan Priebe - Profihost AG ha scritto:
> I added this:
> -trace events=/tmp/events,file=/root/qemu.123.trace
> 
> and put the events in the events file as i couldn't handle \n in my app
> starting the kvm process. But even when doing an fstrim the trace file
> stays at 24 bytes - is this correct?

Right... it would eventually flush, but not if qemu-kvm crash.

Answering your other question, the patch subsumes the other.  But if the
provisioning mode is writesame_16, this hunk alone will most likely fix
the crash:


Paolo
Stefan Priebe - Profihost AG - Feb. 13, 2013, 7:08 p.m.
Hi,

Am 13.02.2013 16:24, schrieb Paolo Bonzini:
> Il 13/02/2013 15:30, Stefan Priebe - Profihost AG ha scritto:
>> I added this:
>> -trace events=/tmp/events,file=/root/qemu.123.trace
>>
>> and put the events in the events file as i couldn't handle \n in my app
>> starting the kvm process. But even when doing an fstrim the trace file
>> stays at 24 bytes - is this correct?
>
> Right... it would eventually flush, but not if qemu-kvm crash.
>
> Answering your other question, the patch subsumes the other.  But if the
> provisioning mode is writesame_16, this hunk alone will most likely fix
> the crash:

I've now added your "big" one but removed all you sent me in the past. 
Let's see what happens tomorrow morning. GMT+1

Thanks!

Greets,
Stefan
Stefan Priebe - Profihost AG - Feb. 14, 2013, 7:55 a.m.
Hi,

no VM crashed this morning.

Stefan

Am 13.02.2013 16:24, schrieb Paolo Bonzini:
> Il 13/02/2013 15:30, Stefan Priebe - Profihost AG ha scritto:
>> I added this:
>> -trace events=/tmp/events,file=/root/qemu.123.trace
>>
>> and put the events in the events file as i couldn't handle \n in my app
>> starting the kvm process. But even when doing an fstrim the trace file
>> stays at 24 bytes - is this correct?
> 
> Right... it would eventually flush, but not if qemu-kvm crash.
> 
> Answering your other question, the patch subsumes the other.  But if the
> provisioning mode is writesame_16, this hunk alone will most likely fix
> the crash:
> 
> diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
> index d411586..4a0673c 100644
> --- a/hw/scsi-disk.c
> +++ b/hw/scsi-disk.c
> @@ -178,6 +178,9 @@ static void scsi_aio_complete(void *opaque, int ret)
>      assert(r->req.aiocb != NULL);
>      r->req.aiocb = NULL;
>      bdrv_acct_done(s->qdev.conf.bs, &r->acct);
> +    if (r->req.io_canceled) {
> +        goto done;
> +    }
> 
>      if (ret < 0) {
>          if (scsi_handle_rw_error(r, -ret)) {
> 
> Paolo
>

Patch

diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index d411586..4a0673c 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -178,6 +178,9 @@  static void scsi_aio_complete(void *opaque, int ret)
     assert(r->req.aiocb != NULL);
     r->req.aiocb = NULL;
     bdrv_acct_done(s->qdev.conf.bs, &r->acct);
+    if (r->req.io_canceled) {
+        goto done;
+    }

     if (ret < 0) {
         if (scsi_handle_rw_error(r, -ret)) {