Project

General

Profile

Actions

Bug #253

closed

lttng-ust file descriptors can be closed by "misbehaving" daemon apps

Added by Mathieu Desnoyers almost 12 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
06/05/2012
Due date:
% Done:

100%

Estimated time:

Description

It seems to be usual for daemon apps to close all file descriptors at startup in addition to call daemon(), so they don't end up keeping some extra file descriptors (in addition to the usual 0, 1, 2) open. One example is start-stop-daemon, which does that for the child it launches: it closes all FD from 0 to 255. However, given that this happens in the main of the application, after execution of the liblttng-ust constructors, we would need to either:

- find a clever way to handle concurrent FD close. However, this can be an issue, since the close could occur at any step of the comm protocol between sessiond and lttng-ust.
- or create a wrapper provided by UST to applications so they can close all FDs but those that belong to UST. However, with this approach, we need to consider that lttng-ust can be dlopen'd by the application, and should not be a dependency of the app binary per se.


Related issues 1 (0 open1 closed)

Has duplicate LTTng-UST - Bug #626: assertion in libust cause application to quitResolvedMathieu Desnoyers09/05/2013

Actions
Actions

Also available in: Atom PDF