[PATCH weston v4 1/9] protocol: add weston-debug.xml
Daniel Stone
daniel at fooishbar.org
Mon Oct 23 10:31:53 UTC 2017
Hi all,
On 12 October 2017 at 13:13, Emre Ucan <eucan at de.adit-jv.com> wrote:
> + <interface name="weston_debug_v1" version="1">
> + <description summary="weston internal debugging">
> + This is a generic debugging interface for Weston internals, the global
> + object advertized through wl_registry.
> +
> + WARNING: This interface by design allows a denial-of-service attack. It
> + should not be offered in production, or proper authorization mechnisms
> + must be enforced.
> +
> + The idea is for a client to provide a file descriptor that the server
> + uses for printing debug information. The server uses the file
> + descriptor in blocking writes mode, which exposes the denial-of-service
> + risk. The blocking mode is necessary to ensure all debug messages can
> + be easily printed in place. It also ensures message ordering if a
> + client subcribes to more than one debug stream.
This is pretty unpleasant indeed. My worry is that enabling the debug
interface could substantially change timing characteristics with
blocking writes, as the compositor waits on the clients. Wrapping
weston_debug_scope_write() or weston_debug_stream_write() with time
queries would at least allow us to emit a 'your client is making the
compositor slower' message.
Cheers,
Daniel
More information about the wayland-devel
mailing list