Re: [Qemu-devel] question: a dead loop in qemu when do blockJobAbort and vm suspend coinstantaneously

2018-06-11 Thread l00284672
As my previos reply said, the mirror_exit is done in aio_poll(qemu_get_aio_context(), true).  In mirror_exit, the bs willl be free by bdrv_unref.  So it will make a Null pointer access in the follow-up procedure in bdrv_set_aio_context. So we should add bdrv_ref for it to avoid bs freed in mirror_

Re: [Qemu-devel] question: a dead loop in qemu when do blockJobAbort and vm suspend coinstantaneously

2018-06-11 Thread Fam Zheng
On Mon, 06/11 11:31, l00284672 wrote: > I tried your patch with my modification below can slove this problem. > > void blk_set_aio_context(BlockBackend *blk, AioContext *new_context) > { >     BlockDriverState *bs = blk_bs(blk); >     ThrottleGroupMember *tgm = &blk->public.throttle_group_member;

Re: [Qemu-devel] question: a dead loop in qemu when do blockJobAbort and vm suspend coinstantaneously

2018-06-11 Thread l00284672
ping On 2018/6/11 11:31, l00284672 wrote: I tried your patch with my modification below can slove this problem. void blk_set_aio_context(BlockBackend *blk, AioContext *new_context) {     BlockDriverState *bs = blk_bs(blk);     ThrottleGroupMember *tgm = &blk->public.throttle_group_member;   

Re: [Qemu-devel] question: a dead loop in qemu when do blockJobAbort and vm suspend coinstantaneously

2018-06-10 Thread l00284672
I tried your patch with my modification below can slove this problem. void blk_set_aio_context(BlockBackend *blk, AioContext *new_context) {     BlockDriverState *bs = blk_bs(blk);     ThrottleGroupMember *tgm = &blk->public.throttle_group_member;     if (bs) {     if (tgm->throttle_state) {

Re: [Qemu-devel] question: a dead loop in qemu when do blockJobAbort and vm suspend coinstantaneously

2018-06-10 Thread l00284672
Thanks for your reply. I tried your patch but it didn't work for qemu crashed.  The qemu crash bt is below: (gdb) bt #0  bdrv_detach_aio_context (bs=bs@entry=0x55a96b79ca30) #1  0x55a9688249ae in bdrv_set_aio_context (bs=bs@entry=0x55a96b79ca30,     new_context=new_context@entry=0x55a96b76

Re: [Qemu-devel] question: a dead loop in qemu when do blockJobAbort and vm suspend coinstantaneously

2018-06-10 Thread Fam Zheng
On Sat, 06/09 17:10, l00284672 wrote: > Hi, I found a dead loop in qemu when do blockJobAbort and vm suspend > coinstantaneously. > > The qemu bt is below: > > #0  0x7ff58b53af1f in ppoll () from /lib64/libc.so.6 > #1  0x007fdbd9 in ppoll (__ss=0x0, __timeout=0x7ffcf7055390, > __nfds=

[Qemu-devel] question: a dead loop in qemu when do blockJobAbort and vm suspend coinstantaneously

2018-06-09 Thread l00284672
Hi, I found a dead loop in qemu when do blockJobAbort and vm suspend coinstantaneously. The qemu bt is below: #0  0x7ff58b53af1f in ppoll () from /lib64/libc.so.6 #1  0x007fdbd9 in ppoll (__ss=0x0, __timeout=0x7ffcf7055390, __nfds=, __fds=) at /usr/include/bits/poll2.h:77 #2  qemu