From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id hb/qBrfOLGd5xygAWB0awg (envelope-from ) for ; Thu, 07 Nov 2024 09:29:11 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=lists.lttng.org header.i=@lists.lttng.org header.a=rsa-sha256 header.s=default header.b=IBheKlVl; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D69C31E603; Thu, 7 Nov 2024 09:29:10 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=4.0.0 Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BD8491E601 for ; Thu, 7 Nov 2024 09:29:09 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1730989749; bh=nz593zUgAPPWIwoAI8HH6pgvm2mhA51kVI4Fa8s9F9E=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=IBheKlVlz178aBQLgvEUmpwjnWt8LYEhkdZ2ZT90ecOwgyeC5gPhgGhk7sjfSzHkz BbhchU9HTF7u9iRWukOUWlEAZbKb4JpLGIDB0ItxhAsn8cS5NA3Ba9xsatWnmtCm5v MTDqOczCQkq5wBcUzuGkue0hLXUxC/o49wS4L9hLejacXbqKDqxLiqBrTX5fZ+PWaT CNWUTWzAweq2gBIHlpY8E057y0DKaxokwLDt5BO+f12lDSOhj6+dPkXSPK8lBrSw/o AOjAJBWJRMC/ceIyy7k/zZctWUnLVWnwbnE9KNTCwQIACTEktNvRxR41A2SgV9zps8 1PbfM3di3CTNQ== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4XkkwP20Mcz1hqC; Thu, 7 Nov 2024 09:29:09 -0500 (EST) Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lists.lttng.org (Postfix) with ESMTPS id 4XkkwL02SDz1hc5 for ; Thu, 7 Nov 2024 09:29:05 -0500 (EST) Received: from [172.16.0.134] (96-127-217-162.qc.cable.ebox.net [96.127.217.162]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4XkkwK0RhVzxC7; Thu, 7 Nov 2024 09:29:05 -0500 (EST) Message-ID: <7f55ec8e-7af3-4af0-9ac9-f7ab4e00345f@efficios.com> Date: Thu, 7 Nov 2024 09:27:34 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Kernel tracing from inside a Docker container To: Dirk Eibach , lttng-dev@lists.lttng.org References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mathieu Desnoyers via lttng-dev Reply-To: Mathieu Desnoyers Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" On 2024-11-07 03:03, Dirk Eibach via lttng-dev wrote: > 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 I suspect that you have two choices here: 1) You modprobe all LTTng modules from your top level namespace (host system) before starting lttng-sessiond within the container, or 2) You ensure that the container has the ability to load kernel modules, and you make sure the lttng-modules .ko are available in the container's under /lib/modules/$(uname -r)/ directory. (and run depmod -a), then launch lttng-sessiond as root. Thanks, Mathieu > 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 -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com