From patchwork Wed Nov 18 23:48:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1402662 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cbzzz6cZ6z9sSs for ; Thu, 19 Nov 2020 10:49:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B1E7D86226; Wed, 18 Nov 2020 23:49:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iSRzaC95AWj6; Wed, 18 Nov 2020 23:49:10 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2F4C286151; Wed, 18 Nov 2020 23:49:10 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 149B4C0800; Wed, 18 Nov 2020 23:49:10 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5A936C07FF for ; Wed, 18 Nov 2020 23:49:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 114AA8458C for ; Wed, 18 Nov 2020 23:49:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4yAv9eKO8j9K for ; Wed, 18 Nov 2020 23:49:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 9D9AF86226 for ; Wed, 18 Nov 2020 23:49:07 +0000 (UTC) Received: from ovn.org (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 397C6100004; Wed, 18 Nov 2020 23:49:02 +0000 (UTC) Date: Wed, 18 Nov 2020 15:48:58 -0800 From: Ben Pfaff To: dev@openvswitch.org Message-ID: <20201118234858.GC3324419@ovn.org> MIME-Version: 1.0 Content-Disposition: inline Subject: [ovs-dev] ovsdb-idl conditional monitoring change bug X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" There appears to be some bug in the ovsdb-idl logic for sending updates to the condition for conditional monitoring, exposed by test 2128 "simple idl, monitor_cond_since, cluster disconnect - C - tcp". When I apply the following patch, which should only affect performance (it just reduces the number of iterations per main loop from 50 to 1), the test fails. When I examine the difference in the testsuite.log, I see that in the failing case, the "monitor_cond_change" that should be sent never does get sent. This is what's missing: test-ovsdb|jsonrpc|tcp:127.0.0.1:41441: send request, method="monitor_cond_change", params=[["monid","idltest"],["monid","idltest"],{"simple":[{"where":[["i","==",1]]}]}], id=11 I haven't figured out the root of the problem. I have spent a bit of time on this and I have to move on to other things. diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index fdb9d85f5ccc..8f4327f1c13d 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -920,7 +920,7 @@ ovsdb_idl_run(struct ovsdb_idl *idl) ovsdb_idl_send_cond_change(idl); jsonrpc_session_run(idl->session); - for (i = 0; jsonrpc_session_is_connected(idl->session) && i < 50; i++) { + for (i = 0; jsonrpc_session_is_connected(idl->session) && i < 1; i++) { struct jsonrpc_msg *msg; unsigned int seqno;