From: "Gix, Brian" <brian.gix@intel.com>
To: "michal.lowas-rzechonek@silvair.com"
<michal.lowas-rzechonek@silvair.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH BlueZ] mesh: Log D-Bus method call errors
Date: Thu, 29 Aug 2019 18:38:59 +0000 [thread overview]
Message-ID: <145b9b726c45fd37592b5a7a3504c911cd848409.camel@intel.com> (raw)
In-Reply-To: <20190829095951.nzzqqhgvblhogf4e@mlowasrzechonek2133>
Hi Michał,
On Thu, 2019-08-29 at 11:59 +0200, michal.lowas-rzechonek@silvair.com wrote:
> 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).
That is true, and we *expect* applications that are attached to handle the socket-signals (that drive d-bus) in
a timely manner... But I am not sure we have a way to enforce it.
Certainly, we can simulate a disconnection if an App ignores it's DBus socket signal, but again, we won't know
about that for 30 seconds which seems like forever... And an App could potentially have a large enough backlog
of messages negatively affecting the daemon before it and corrects it.
>
> > 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
next prev parent reply other threads:[~2019-08-29 18:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 7:56 [PATCH BlueZ] mesh: Log D-Bus method call errors Michał Lowas-Rzechonek
2019-08-28 16:22 ` Gix, Brian
2019-08-29 9:59 ` michal.lowas-rzechonek
2019-08-29 18:38 ` Gix, Brian [this message]
2019-08-29 19:56 ` michal.lowas-rzechonek
2019-08-29 20:07 ` Gix, Brian
2019-08-30 5:47 ` michal.lowas-rzechonek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=145b9b726c45fd37592b5a7a3504c911cd848409.camel@intel.com \
--to=brian.gix@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=michal.lowas-rzechonek@silvair.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox