From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTmUJ-0007g9-GO for qemu-devel@nongnu.org; Fri, 06 Mar 2015 02:16:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTmUD-0008Vp-M9 for qemu-devel@nongnu.org; Fri, 06 Mar 2015 02:15:59 -0500 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]:35484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTmUD-0008Ut-9h for qemu-devel@nongnu.org; Fri, 06 Mar 2015 02:15:53 -0500 Received: by pabli10 with SMTP id li10so49412929pab.2 for ; Thu, 05 Mar 2015 23:15:52 -0800 (PST) From: "Halsey Pian" References: <009a01d057db$baf86640$30e932c0$@gmail.com> In-Reply-To: <009a01d057db$baf86640$30e932c0$@gmail.com> Date: Fri, 6 Mar 2015 15:15:51 +0800 Message-ID: <000001d057dd$62ea5e20$28bf1a60$@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01D05820.710F24C0" Content-Language: zh-cn Subject: Re: [Qemu-devel] [Bug] qemu_coroutine_enter abort and report error "Co-routine re-entered recursively" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: halsey.pian@gmail.com This is a multipart message in MIME format. ------=_NextPart_000_0001_01D05820.710F24C0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable =20 Qemu version: qemu-2.2.0 release Platform: x86_64 =20 =20 From: Halsey Pian [mailto:halsey.pian@gmail.com]=20 Sent: 2015=E5=B9=B43=E6=9C=886=E6=97=A5 15:04 To: qemu-devel@nongnu.org Cc: halsey.pian@gmail.com Subject: [Qemu-devel][Bug] qemu_coroutine_enter abort and report error = "Co-routine re-entered recursively" =20 Hi All, =20 I have two threads to write two seperate qcow2 files, but after a = while, the writing would be aborted in qemu_coroutine_enter, and report = error =E2=80=9C"Co-routine re-entered recursively=E2=80=9D . =20 Qemu should be thread safe, right? It seems that there are some = variables is not thread safe? Could you have a chance to look it? = Thanks! =20 Call stack: =20 #0 0x7ffff5e18989 __GI_raise(sig=3Dsig@entry=3D6) = (../nptl/sysdeps/unix/sysv/linux/raise.c:56) #1 0x7ffff5e1a098 __GI_abort() (abort.c:90) #2 0x7ffff728c034 qemu_coroutine_enter(co=3D0x7fffe0004800, = opaque=3D0x0) (qemu-coroutine.c:117) #3 0x7ffff727df39 = bdrv_co_io_em_complete(opaque=3D0x7ffff7fd6ae0, ret=3D0) (block.c:4847) #4 0x7ffff7270314 = thread_pool_completion_bh(opaque=3D0x7fffe0006ad0) (thread-pool.c:187) #5 0x7ffff726f873 aio_bh_poll(ctx=3D0x7fffe0001d00) = (async.c:82) #6 0x7ffff728340b aio_dispatch(ctx=3D0x7fffe0001d00) = (aio-posix.c:137) #7 0x7ffff72837b0 aio_poll(ctx=3D0x7fffe0001d00, = blocking=3Dtrue) (aio-posix.c:248) #8 ?? 0x00007ffff72795a8 in bdrv_prwv_co (bs=3D0x7fffdc0021c0, = offset=3D12071639552, qiov=3D0x7fffe67fa590, is_write=3Dtrue, = flags=3D(unknown: 0)) (block.c:2703) #9 ?? 0x00007ffff727966a in bdrv_rw_co (bs=3D0x7fffdc0021c0, = sector_num=3D23577421, buf=3D0x7fffe4629250 = "\234\b\335=C7=BC\254\213q\301\366\315=3D\005oI\301\245=3D\373\004+2?H\21= 2\025\035+\262\274C;X\301FaP\324\335\061=D2=9D&Y\316=3D\347\335\020\365\0= 03go=C9=BF\214\312S=3D\v2]\373\363C\311\341\334\r5k\346k\204\332\023\264\= 315=E9=99=8C\230\203J\222u\214\066", nb_sectors=3D128, is_write=3Dtrue, = flags=3D(unknown: 0)) (block.c:2726) #10 0x7ffff7279758 bdrv_write(bs=3D0x7fffdc0021c0, = sector_num=3D23577421, buf=3D0x7fffe4629250 = "\234\b\335=C7=BC\254\213q\301\366\315=3D\005oI\301\245=3D\373\004+2?H\21= 2\025\035+\262\274C;X\301FaP\324\335\061=D2=9D&Y\316=3D\347\335\020\365\0= 03go=C9=BF\214\312S=3D\v2]\373\363C\311\341\334\r5k\346k\204\332\023\264\= 315=E9=99=8C\230\203J\222u\214\066", nb_sectors=3D128) (block.c:2760) =20 =20 Best Regards Halsey Pian =20 ------=_NextPart_000_0001_01D05820.710F24C0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

 

Qemu version: qemu-2.2.0 = release

Platform: x86_64

 

 

From:= = Halsey Pian [mailto:halsey.pian@gmail.com]
Sent: = 2015
=E5=B9=B43=E6=9C=886=E6=97=A5 = 15:04
To: qemu-devel@nongnu.org
Cc: = halsey.pian@gmail.com
Subject: [Qemu-devel][Bug] = qemu_coroutine_enter abort and report error "Co-routine re-entered = recursively"

 

Hi All,

 

I have two threads to = write two seperate qcow2 files,  but after a while,  the = writing would be aborted in qemu_coroutine_enter, and report error = =E2=80=9C"Co-routine re-entered recursively=E2=80=9D = .

 

Qemu should be thread = safe, right? It seems that there are some variables is not thread safe? = Could you have a chance to look it? Thanks!

 

Call = stack:

 

#0 = 0x7ffff5e18989          = ;  __GI_raise(sig=3Dsig@entry=3D6) = (../nptl/sysdeps/unix/sysv/linux/raise.c:56)

#1 = 0x7ffff5e1a098          = ;  __GI_abort() (abort.c:90)

#2 = 0x7ffff728c034          = ;  qemu_coroutine_enter(co=3D0x7fffe0004800, opaque=3D0x0) = (qemu-coroutine.c:117)

#3 = 0x7ffff727df39          = ;  bdrv_co_io_em_complete(opaque=3D0x7ffff7fd6ae0, ret=3D0) = (block.c:4847)

#4 = 0x7ffff7270314          = ;  thread_pool_completion_bh(opaque=3D0x7fffe0006ad0) = (thread-pool.c:187)

#5 = 0x7ffff726f873          = ;   aio_bh_poll(ctx=3D0x7fffe0001d00) = (async.c:82)

#6 = 0x7ffff728340b          = ;  aio_dispatch(ctx=3D0x7fffe0001d00) = (aio-posix.c:137)

#7 = 0x7ffff72837b0          = ;  aio_poll(ctx=3D0x7fffe0001d00, blocking=3Dtrue) = (aio-posix.c:248)

#8 ??     0x00007ffff72795a8 = in bdrv_prwv_co (bs=3D0x7fffdc0021c0, offset=3D12071639552, = qiov=3D0x7fffe67fa590, is_write=3Dtrue, flags=3D(unknown: 0)) = (block.c:2703)

#9 ??     0x00007ffff727966a = in bdrv_rw_co (bs=3D0x7fffdc0021c0, sector_num=3D23577421, = buf=3D0x7fffe4629250 = "\234\b\335=C7=BC\254\213q\301\366\315=3D\005oI\301\245=3D\373\004+2= ?H\212\025\035+\262\274C;X\301FaP\324\335\061=D2=9D&Y\316=3D\347\335\= 020\365\003go=C9=BF\214\312S=3D\v2]\373\363C\311\341\334\r5k\346k\204\332= \023\264\315=E9=99=8C\230\203J\222u\214\066", = nb_sectors=3D128, is_write=3Dtrue, flags=3D(unknown: 0)) = (block.c:2726)

#10 = 0x7ffff7279758          = bdrv_write(bs=3D0x7fffdc0021c0, sector_num=3D23577421, = buf=3D0x7fffe4629250 = "\234\b\335=C7=BC\254\213q\301\366\315=3D\005oI\301\245=3D\373\004+2= ?H\212\025\035+\262\274C;X\301FaP\324\335\061=D2=9D&Y\316=3D\347\335\= 020\365\003go=C9=BF\214\312S=3D\v2]\373\363C\311\341\334\r5k\346k\204\332= \023\264\315=E9=99=8C\230\203J\222u\214\066", = nb_sectors=3D128) (block.c:2760)

 

 

Best = Regards

Halsey = Pian

 

------=_NextPart_000_0001_01D05820.710F24C0--