Fix: Wrong poll events on UST application socket
authorDavid Goulet <dgoulet@efficios.com>
Mon, 5 Nov 2012 21:49:40 +0000 (16:49 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 5 Nov 2012 22:31:18 +0000 (17:31 -0500)
commit622c9ecfa3a7665e2981aaa4881f58afe07106ce
treeda38c52c7e2740afdf15448067868f079fd09b48
parent845e16071c463a16a9c7726abf092909c3c6789d
Fix: Wrong poll events on UST application socket

The thread manage apps was adding UST sockets to the poll set with the
POLLIN event registered. However, the thread was not handling this event
which could ultimately cause an infinite loop if the application sends
data.

This has been observed with the bug386 when an application is stopped
and a lttng command is sent.

https://bugs.lttng.org/issues/386

Furthermore, a time window between the send and the reply recv of an UST
command was making the app manager loop actively because of a POLLIN
event on the socket caused by the reply from the application which is
finally handled a bit after by the client thread. This was not that
problematic but lead to a lot of repeated debug message and CPU time
lost.

This application thread is *only* handling error event usually triggered
by a close() on the UST socket thus OK to *not* wait for POLLIN/POLLOUT
event.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/main.c
This page took 0.024985 seconds and 4 git commands to generate.