lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
* Kernel tracing from inside a Docker container
@ 2024-11-07  7:42 Dirk Eibach via lttng-dev
  0 siblings, 0 replies; 7+ messages in thread
From: Dirk Eibach via lttng-dev @ 2024-11-07  7:42 UTC (permalink / raw)
  To: lttng-dev

Hi,

sorry, Outlook is messing up my plaintext mails, so I am switching to
my gmail account.

> lttng-modules exposes its control ABI through the virtual file /proc/lttng.
>
> Does you container have access to that file ?

The container is running in privileged mode.
root@9348eb19e6f4:/# ls -l /proc/lttng
-rw------- 1 root root 0 Nov  6 16:05 /proc/lttng

> Note that if you give access to that file within the container, then the container
> can observe detailed information about kernel internals (including related to
> other containers).

This is a development-only system, so the security implications are acceptable.

I have observed one more thing. When I start the session daemon with
the -vvv option I get:
root@9348eb19e6f4:/# lttng list --kernel
DBG1 - 07:31:23.811796947 [Client management]: Wait for client
response (in thread_manage_clients() at client.c:2576)
DBG1 - 07:31:23.811867247 [Client management]: Receiving data from
client ... (in thread_manage_clients() at client.c:2604)
DBG1 - 07:31:23.811945247 [Client management]: Processing client
command 'LTTNG_LIST_TRACEPOINTS' (14) (in process_client_msg() at
client.c:1016)
Error: Failed to load kmod library resources
Warning: No kernel tracer available
DBG1 - 07:31:23.812076447 [Client management]: Missing llm header,
creating one. (in process_client_msg() at client.c:2381)
DBG1 - 07:31:23.812085547 [Client management]: Sending response (size:
24, retcode: Kernel tracer not available (33)) (in
thread_manage_clients() at client.c:2683)
DBG1 - 07:31:23.812156547 [Client management]: Accepting client
command ... (in thread_manage_clients() at client.c:2534)
Error: Unable to list kernel events: Kernel tracer not available

Regards
Dirk

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Kernel tracing from inside a Docker container
@ 2024-11-07  8:03 Dirk Eibach via lttng-dev
  2024-11-07 14:27 ` Mathieu Desnoyers via lttng-dev
  0 siblings, 1 reply; 7+ messages in thread
From: Dirk Eibach via lttng-dev @ 2024-11-07  8:03 UTC (permalink / raw)
  To: lttng-dev

Hi,

sorry, Outlook is messing up my plaintext mails, so I am switching to
my gmail account.

> lttng-modules exposes its control ABI through the virtual file /proc/lttng.
>
> Does you container have access to that file ?

The container is running in privileged mode.
root@9348eb19e6f4:/# ls -l /proc/lttng
-rw------- 1 root root 0 Nov  6 16:05 /proc/lttng

> Note that if you give access to that file within the container, then the container
> can observe detailed information about kernel internals (including related to
> other containers).

This is a development-only system, so the security implications are acceptable.

I have observed one more thing. When I start the session daemon with
the -vvv option I get:
root@9348eb19e6f4:/# lttng list --kernel
DBG1 - 07:31:23.811796947 [Client management]: Wait for client
response (in thread_manage_clients() at client.c:2576)
DBG1 - 07:31:23.811867247 [Client management]: Receiving data from
client ... (in thread_manage_clients() at client.c:2604)
DBG1 - 07:31:23.811945247 [Client management]: Processing client
command 'LTTNG_LIST_TRACEPOINTS' (14) (in process_client_msg() at
client.c:1016)
Error: Failed to load kmod library resources
Warning: No kernel tracer available
DBG1 - 07:31:23.812076447 [Client management]: Missing llm header,
creating one. (in process_client_msg() at client.c:2381)
DBG1 - 07:31:23.812085547 [Client management]: Sending response (size:
24, retcode: Kernel tracer not available (33)) (in
thread_manage_clients() at client.c:2683)
DBG1 - 07:31:23.812156547 [Client management]: Accepting client
command ... (in thread_manage_clients() at client.c:2534)
Error: Unable to list kernel events: Kernel tracer not available

Regards
Dirk

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <9cd16ae1-a2c8-4279-b8df-82ab5be5b31e.9610e98a-1b50-4bc4-83bb-532efa96e9a9.ca90a335-62b6-4541-8ae3-a07498ba9de9@emailsignatures365.codetwo.com>]

end of thread, other threads:[~2024-11-07 16:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-07  7:42 Kernel tracing from inside a Docker container Dirk Eibach via lttng-dev
  -- strict thread matches above, loose matches on Subject: below --
2024-11-07  8:03 Dirk Eibach via lttng-dev
2024-11-07 14:27 ` Mathieu Desnoyers via lttng-dev
2024-11-07 14:58   ` Dirk Eibach via lttng-dev
2024-11-07 16:00     ` Dirk Eibach via lttng-dev
2024-11-07 16:16       ` Michael Jeanson via lttng-dev
     [not found] <9cd16ae1-a2c8-4279-b8df-82ab5be5b31e.9610e98a-1b50-4bc4-83bb-532efa96e9a9.ca90a335-62b6-4541-8ae3-a07498ba9de9@emailsignatures365.codetwo.com>
     [not found] ` <GV1PR10MB65629CEE94282989CBD614C297532@GV1PR10MB6562.EURPRD10.PROD.OUTLOOK.COM>
2024-11-06 15:55   ` Mathieu Desnoyers via lttng-dev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).