Fix: Python agent: do not register twice to same port
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 5 Sep 2015 17:38:01 +0000 (13:38 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 9 Sep 2015 21:55:54 +0000 (17:55 -0400)
commit162646081173a4edd1d105bbdf7430d41673623b
treeac174f30aeefb8b6129fe58c61a702e70d42ae83
parentdda59359695cd45d92cd3761c14245d1359d1784
Fix: Python agent: do not register twice to same port

It is possible that one of the session daemons left its agent.port
file on the file system, for example when killed with SIGKILL. It
is also common that both those session daemons use the same port for
listening to agent connections. In this case, if one session daemon
is running, but two agent.port files exist, the Python agent would
connect its two threads to the same session daemon, leading to
everything done twice: list shows events twice, tracing records
events twice, etc.

This patch ensures that if two agent.port files are found and have
the same content, only one thread is used.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-python-agent/lttngust/agent.py
This page took 0.024892 seconds and 4 git commands to generate.