Bug 85108 - dbus-daemon: syslog when we disconnect a peer
Summary: dbus-daemon: syslog when we disconnect a peer
Status: RESOLVED MOVED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: git master
Hardware: Other All
: medium enhancement
Assignee: Simon McVittie
QA Contact: D-Bus Maintainers
URL:
Whiteboard:
Keywords: patch
Depends on: 83625
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-16 19:32 UTC by Simon McVittie
Modified: 2018-10-12 21:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
DBusError: factor out _dbus_set_error_va (2.26 KB, patch)
2014-10-16 19:32 UTC, Simon McVittie
Details | Splinter Review
DBusTransport: record abnormal disconnections (16.81 KB, patch)
2014-10-16 19:32 UTC, Simon McVittie
Details | Splinter Review
DBusTransport, DBusConnection: make the disconnection error available (9.02 KB, patch)
2014-10-16 19:32 UTC, Simon McVittie
Details | Splinter Review
dbus-daemon: log abnormal disconnections (1.35 KB, patch)
2014-10-16 19:33 UTC, Simon McVittie
Details | Splinter Review
Add a test-case for dbus-daemon kicking the sender of a corrupt message (3.51 KB, patch)
2014-10-16 19:33 UTC, Simon McVittie
Details | Splinter Review
tests: link shared test executables explicitly to our libdbus-1.la (1.15 KB, patch)
2014-10-16 19:34 UTC, Simon McVittie
Details | Splinter Review
Add public API by which a service can tell why it got disconnected (6.32 KB, patch)
2014-10-16 19:35 UTC, Simon McVittie
Details | Splinter Review
Distinguish between local and remote disconnection (3.74 KB, text/plain)
2014-10-16 19:36 UTC, Simon McVittie
Details

Description Simon McVittie 2014-10-16 19:32:01 UTC
Kicking a peer off the dbus-daemon ought to be an unusual circumstance, so we should probably log it.

The patches I'm about to attach will require the one from Bug #83625.
Comment 1 Simon McVittie 2014-10-16 19:32:22 UTC
Created attachment 107949 [details] [review]
DBusError: factor out _dbus_set_error_va
Comment 2 Simon McVittie 2014-10-16 19:32:38 UTC
Created attachment 107950 [details] [review]
DBusTransport: record abnormal disconnections

Normal disconnection is DBUS_ERROR_DISCONNECTED.
Comment 3 Simon McVittie 2014-10-16 19:32:50 UTC
Created attachment 107951 [details] [review]
DBusTransport, DBusConnection: make the disconnection  error available
Comment 4 Simon McVittie 2014-10-16 19:33:01 UTC
Created attachment 107952 [details] [review]
dbus-daemon: log abnormal disconnections
Comment 5 Simon McVittie 2014-10-16 19:33:30 UTC
Created attachment 107953 [details] [review]
Add a test-case for dbus-daemon kicking the sender of a  corrupt message

---

It isn't asserted, but this does print to stderr.
Comment 6 Simon McVittie 2014-10-16 19:34:21 UTC
Created attachment 107955 [details] [review]
tests: link shared test executables explicitly to our  libdbus-1.la

Otherwise they'll be linked to the system libdbus-1.so (via dbus-glib),
and that might be older than ours and contain less ABI.

---

Not really part of this bug, but working on this bug exposed this.

Alternatively, we could merge Bug #83115.
Comment 7 Simon McVittie 2014-10-16 19:35:45 UTC
Created attachment 107956 [details] [review]
Add public API by which a service can tell why it got  disconnected

This is not necessarily very informative because we don't communicate
error details across the stream before disconnecting the peer, so
one peer will have error details and the other will have
DBUS_ERROR_DISCONNECTED... but it's better than nothing!

---

This is mainly for peer-to-peer situations, because in the normal star topology, we assume that dbus-daemon will be Correct™ at all times. It might be useful to make it more visible if a recipient of Unix fds exceeds its fd limit, can't receive them, and responds by closing the connection, though.
Comment 8 Simon McVittie 2014-10-16 19:36:07 UTC
Created attachment 107957 [details]
Distinguish between local and remote disconnection

---

I'm in two minds about this one. Consider it optional.
Comment 9 GitLab Migration User 2018-10-12 21:21:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus/issues/116.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.