diff mbox

kvm segfaulting

Message ID 511BB031.9030307@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini Feb. 13, 2013, 3:24 p.m. UTC
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

Comments

Stefan Priebe - Profihost AG Feb. 13, 2013, 7:08 p.m. UTC | #1
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. UTC | #2
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
>
diff mbox

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)) {