Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2058503ybl; Thu, 29 Aug 2019 03:00:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSHlBtTTk4nxNYhaAHMNjfu6k/lywtIR3gvmJKO04PYGTufvuL4HzxmoCoMDDflFxpJjll X-Received: by 2002:a62:27c5:: with SMTP id n188mr10004567pfn.58.1567072838942; Thu, 29 Aug 2019 03:00:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567072838; cv=none; d=google.com; s=arc-20160816; b=rKTCwIfEQVT6zxZEkANU6dbnrCVcwtd2C+s0+z23dkTMBO9iZbc2Nqzd52ifuy/RA7 V1yPfY66NiKhnW67RKmQPaiFkdpTDSWmGO+xefg2A22gSwqmcE+elIjkJqa2iXUqRpka z+k99l6qIEGKc5+WZP1FSMI0O7pgCjElu7hKAnTdB1OT5WyshnrfPjXbWXCtD3msznaL FCtesQ7aWlX/dNznI0WU2/UbFfuZItHSBHJaoLKfXKV6wDi8H0dzl+danv4zY1wB0P3t tnFHf0rJDhmpCu2VrnLj5t8dNSXYzo1Vxg5RWlffCMYbzfLep0cLiUv8UT4Zo6vNLItH J8OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=1lC+hH9Gwx+bNHkwBGuwqMYJcIp0XDfnrsTRuI7bdjo=; b=ppPBFWraTXvZP8kBadjIMhKYp1mASlvKYBhpDLn3L8rmIj7XmvzgFcSYaKvAPjwAAr JgfuCgi8wdjgL0A6hXFEBEASNT/zDDBKtQ7IWSE5186aAIamE83XFWkYG4Ctey+6Rnmd kr4RKbiOpHDN2VLSgpMQ7NI+AHiShzRIvUZWjLKJW0OqmIHctddOObd6X/HmhzZ9ioVY ko5DtbXO2kQZF7c9PbMXeWdexfVLFtLIVY9Ol17dQdCLYP2pA2/fwCfgAoELgLh3gENZ Tuyg7IC1V2dC2+PSYwqQN6YqSvkwOZbHJL91uam8yFX7ZO8kJO0Ha0ObBsp6SmIGgAsQ sp2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=jULKQIJj; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x26si1512137pgl.351.2019.08.29.03.00.05; Thu, 29 Aug 2019 03:00:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=jULKQIJj; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725782AbfH2J74 (ORCPT + 99 others); Thu, 29 Aug 2019 05:59:56 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:42922 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfH2J7z (ORCPT ); Thu, 29 Aug 2019 05:59:55 -0400 Received: by mail-lf1-f68.google.com with SMTP id u13so2012667lfm.9 for ; Thu, 29 Aug 2019 02:59:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=1lC+hH9Gwx+bNHkwBGuwqMYJcIp0XDfnrsTRuI7bdjo=; b=jULKQIJjcaORvjGcebXlcKU8ghD3G8S3WiXzUvKbuW8ktGUfL/SItKHqss0QH2Fi27 lZ/fWYomnY4NW2U/D6Inc2+3rPU8+4YrOennXq6E6g4iTZ0Ebx7F0qUGpZLoLliYvprL o9nQgky7vSkh92XHMbOrMmFgocUjbyV2ksmM13JFraVeJrx81kkKI9KCIr69iuLJaIMW iZsA2p0Elofmv9d9OriKn4TF976WHI8FHsJzYj/6ovBvPCqNnnzI3wnU35wyv+NZwTFH 5Z8GLMMmPBAYCLqFskU1t9w34Ft8LXmv4Op9Jlvp9qU3qHg1fMtrA0TP9v1rUsVKyDOQ 7nDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=1lC+hH9Gwx+bNHkwBGuwqMYJcIp0XDfnrsTRuI7bdjo=; b=EBCwRIVRFixXaiMKagm5jQLh7SLBdTFcPaDOI1BMqfm9JaK1T5vBxI3uc3i32cGXbg JLacZuOhYs59HbErXjD3frVfq1y0bYq4DwawpjvmjEc+Ctg480X1NJ6c0bFR0LBoUUo3 oW3MrLS5CzSwmTit+/GmwjqCGTCX0pL9loPh7oKBbWW2OXpEHlfWaAvBtOGWghrwAUBz SN2QJKg9koIV5tbMbcvmfAHsBgW0KbWCW0b8D2KAiEXuoTiqQsfx/PeVCru8Z1G6rEl4 7bXloZZORMyOr4Xw5lRrHnUduRXm70lNqEkiBAgPQa+GFaKZEj9DDqSVwx8X+hqUri/e 9G1A== X-Gm-Message-State: APjAAAVFw8tG9z2TIGPOrIvbBQeD6g/7Sje5+7fnhyIJ8RfFYcuTlaHR XT6wuFD3nz5uGuCJvNshrmKxpw== X-Received: by 2002:ac2:4901:: with SMTP id n1mr5778781lfi.0.1567072794078; Thu, 29 Aug 2019 02:59:54 -0700 (PDT) Received: from mlowasrzechonek2133 ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id p9sm276337lji.107.2019.08.29.02.59.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 02:59:53 -0700 (PDT) Date: Thu, 29 Aug 2019 11:59:51 +0200 From: "michal.lowas-rzechonek@silvair.com" To: "Gix, Brian" Cc: "linux-bluetooth@vger.kernel.org" Subject: Re: [PATCH BlueZ] mesh: Log D-Bus method call errors Message-ID: <20190829095951.nzzqqhgvblhogf4e@mlowasrzechonek2133> Mail-Followup-To: "Gix, Brian" , "linux-bluetooth@vger.kernel.org" References: <20190820075654.2195-1-michal.lowas-rzechonek@silvair.com> <685bc703108f5329b861f5c5f87301b44bddd8e0.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <685bc703108f5329b861f5c5f87301b44bddd8e0.camel@intel.com> User-Agent: NeoMutt/20180716 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Brian, On 08/28, Gix, Brian wrote: > On Tue, 2019-08-20 at 09:56 +0200, Michał Lowas-Rzechonek wrote: > > If a system is misconfigured, mesh daemon might not have permissions to > > call application methods. > > > > This patch causes mesh daemon to log such errors, instead of failing > > silently. > > Some of these Replies for error checking are warranted, I think... > Particularily when there is required information that needs to be sent > to the Application during Provisioning, for instance. > > But sometimes we expect the application to be "away" for normal > reasons (it is intended as a foreground app, for instance) where I am > not sure we want to require the response... For instance the method > calls in model.c that occur when a remote node has sent a message. Yes, these calls were my primary concern here. Note that D-Bus calls do *not* happen if the application is not attached (node->owner is NULL). > The Non-Reply version of send (towards the apps) was actually a design > decision, since we don't want the *daemon* to exhast d-bus resources, > depending on replies from Apps that are ignoring the messages we are > sending. > > This could negatively impact the daemon's ability to > interact with perhaps better behaved applications. I think every > reply required message persists for up to 30 seconds. True. Since most of the application-side methods do not return anything (and rightly so, because "Any discrete OTA message might be lost"), the application is free to do whatever is pleases with the payload, including dropping it. Still, I think that the none of the call handlers on the application side should *ever* return errors/timeouts over D-Bus. I'm arguing that such an application is misbehaving, so it probably should be promptly detached. That would protect the daemon. > I think our rule of thumb should be requiring a response when the > daemon needs to know that the App has successfully handled critical > information so for instance YES for: > > AddNodeComplete() > JoinComplete() > RequestProvData() Agreed. regards -- Michał Lowas-Rzechonek Silvair http://silvair.com Jasnogórska 44, 31-358 Krakow, POLAND