file descriptor passing in D-Bus: how much is actually used?

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Oct 16 12:13:22 PDT 2014


On 08/10/14 15:47, Colin Walters wrote:
> Unrelated to the actual numbers, one thing I have seen from a lot of
> field reports is sudden failures when people hit limits.  Things like
> appending strings dynamically as message arguments, rather than as a
> single argument of "as".
> 
> The former works until you hit 255 of them, then it explodes in your
> face...
> 
> Maybe emit something to the system log when an app hits ~20% of the
> upper limit?  It's always ugly to log app design failures via logging,
> but it gives people a chance to see something before it all falls apart.
>  (There has to be other precedent here I'm sure)

I misread this when you first sent it to the list. To be clear, is your
suggestion this?

- in libdbus on the client side, track how close a message is getting
  to the protocol-specified limits
- considerably below the protocol-specified-limit, still inside
  libdbus, warn to syslog, or maybe stderr

I'm pretty sure I don't like that, for a couple of reasons:

- libraries shouldn't typically log to syslog (least astonishment!)
- people who are using a large fixed number of arguments get
  false-positive logging even though they are in no danger of
  exceeding the limit

(This also can't do anything about arbitrary limits in the dbus-daemon,
because there's no way to discover those.)

    S



More information about the dbus mailing list