On Wed, 9 Mar 2016 14:05:20 +0100
Christian Borntraeger <borntrae...@de.ibm.com> wrote:

> On 03/09/2016 02:02 PM, Christian Borntraeger wrote:
> > On 03/09/2016 01:55 PM, Paolo Bonzini wrote:
> >>
> >>
> >> On 09/03/2016 13:21, Christian Borntraeger wrote:
> >>> I have some random crashes at startup 
> >>>                 
> >>>                 Stack trace of thread 48326:
> >>>                 #0  0x000002aa2e0cce46 bdrv_co_do_rw (qemu-system-s390x)
> >>>                 #1  0x000002aa2e159e8e coroutine_trampoline 
> >>> (qemu-system-s390x)
> >>>                 #2  0x000003ffbc35150a __makecontext_ret (libc.so.6)
> >>>
> >>>
> >>> that I was able to bisect.
> >>> commit 2906cddfecff21af20eedab43288b485a679f9ac does crash regularly, 
> >>> 2906cddfecff21af20eedab43288b485a679f9ac^ does not.
> >>>
> >>> I will try to find somebody that looks into that - unless you have an 
> >>> idea.
> >>
> >> The only random idea is to move
> >>
> >>     vblk->dataplane_started = true
> >>
> >> to the beginning of virtio_blk_data_plane_start rather than the end.
> >>
> >> Paolo
> >>
> > 
> > Indeed
> > 
> > diff --git a/hw/block/dataplane/virtio-blk.c 
> > b/hw/block/dataplane/virtio-blk.c
> > index 36f3d2b..1908d59 100644
> > --- a/hw/block/dataplane/virtio-blk.c
> > +++ b/hw/block/dataplane/virtio-blk.c
> > @@ -195,6 +195,7 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane 
> > *s)
> >      if (vblk->dataplane_started || s->starting) {
> >          return;
> >      }
> > +    vblk->dataplane_started = true;
> >  
> >      s->starting = true;
> >      s->vq = virtio_get_queue(s->vdev, 0);
> > @@ -235,7 +236,6 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane 
> > *s)
> >    fail_guest_notifiers:
> >      s->disabled = true;
> >      s->starting = false;
> > -    vblk->dataplane_started = true;
> >  }
> >  
> >  /* Context: QEMU global mutex held */
> > 
> > seems to fix the issue. 
> 
> Hmmm, no another crash, just seems to happen less often. 

What about the proposal in <56c34414.90...@redhat.com>, i.e. move
setting the started flag out of dataplane entirely?


Reply via email to