From nobody Fri May 3 18:41:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 14902522002211016.3679062831516; Wed, 22 Mar 2017 23:56:40 -0700 (PDT) Received: from localhost ([::1]:54553 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqwfm-0008Mf-NK for importer@patchew.org; Thu, 23 Mar 2017 02:56:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqwf5-00083v-9y for qemu-devel@nongnu.org; Thu, 23 Mar 2017 02:55:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqwf1-0002QV-OK for qemu-devel@nongnu.org; Thu, 23 Mar 2017 02:55:55 -0400 Received: from out1.zte.com.cn ([202.103.147.172]:57228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqwf1-0002Md-4m for qemu-devel@nongnu.org; Thu, 23 Mar 2017 02:55:51 -0400 Received: from unknown (HELO mse01.zte.com.cn) (10.30.3.20) by localhost with (AES256-SHA encrypted) SMTP; 23 Mar 2017 06:51:04 -0000 Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id v2N6tSDJ035930; Thu, 23 Mar 2017 14:55:28 +0800 (GMT-8) (envelope-from wang.guang55@zte.com.cn) Received: from localhost.localdomain ([10.74.120.79]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2017032314553309-17258 ; Thu, 23 Mar 2017 14:55:33 +0800 X-scanvirus: By SEG_CYREN AntiVirus Engine X-scanresult: CLEAN X-MAILFROM: X-RCPTTO: X-FROMIP: 10.30.3.20 X-SEG-Scaned: 1 X-Received: unknown,10.30.3.20,20170323145104 From: Guang Wang To: berrange@redhat.com Date: Fri, 24 Mar 2017 07:14:23 +0800 Message-Id: <1490310863-12890-1-git-send-email-wang.guang55@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2017-03-23 14:55:33, Serialize by Router on notes_smtp/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2017-03-23 14:55:28, Serialize complete at 2017-03-23 14:55:28 X-MAIL: mse01.zte.com.cn v2N6tSDJ035930 X-HQIP: 127.0.0.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 202.103.147.172 Subject: [Qemu-devel] [PATCH RESEND] migration: Fix colo hang in socket_accept_incoming_migration X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wang guang , zhang.zhanghailiang@huawei.com, zhangchen.fnst@cn.fujitsu.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Wang guang Due to the feature of accept channel does not support QIO_CHANNEL_FEATURE_S= HUTDOWN. when failover,channel_shutdown could not shut down the channel. So the colo_process_incoming_thread will hang at recvmsg. This patch just call qio_channel_socket_new to get channel, Which set QIO_CHANNEL_FEATURE_SHUTDOWN already. Signed-off-by: Wang Guang Signed-off-by: zhanghailiang --- io/channel-socket.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/io/channel-socket.c b/io/channel-socket.c index f546c68..64b36f5 100644 --- a/io/channel-socket.c +++ b/io/channel-socket.c @@ -331,16 +331,10 @@ qio_channel_socket_accept(QIOChannelSocket *ioc, { QIOChannelSocket *cioc; =20 - cioc =3D QIO_CHANNEL_SOCKET(object_new(TYPE_QIO_CHANNEL_SOCKET)); - cioc->fd =3D -1; + cioc =3D qio_channel_socket_new(); cioc->remoteAddrLen =3D sizeof(ioc->remoteAddr); cioc->localAddrLen =3D sizeof(ioc->localAddr); =20 -#ifdef WIN32 - QIO_CHANNEL(cioc)->event =3D CreateEvent(NULL, FALSE, FALSE, NULL); -#endif - - retry: trace_qio_channel_socket_accept(ioc); cioc->fd =3D qemu_accept(ioc->fd, (struct sockaddr *)&cioc->remoteAddr, --=20 1.8.3.1