From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E5ABAC25B78 for ; Tue, 4 Jun 2024 15:26:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1717514761; bh=26XaNL6R5gyJ5y5VZOhX8JbOKvPm5SOw/QZEXiTW3tI=; h=To:Date:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=aADKODb0nAGO2QgvEocWvc/z4mZ8gD6oLsjaqtqjQnHOjJWCc62YMzo178gKJsSRN fFrFWGDOgDJsLNvgaPqPjnNr+3RRc7NyLe9EYKftAMI1xdd4sJk/HEiht9cUJle89p a4mE26k7f2yDK6bwgboaavzILZRPqb/rXvN+8oDqOdtAwYbmRD5KfmD8jzn90h3W4x f95QtxftZcnxmMgvDn40xpsneCMW33Gr7fQ9WtmKTQvXDLW9Kjp4a6X9SKc5bB7ctz Hn7hGrZFKxjiufUlpp1PV3uKNLUH07FmAxhtcTgDKOeqesPp7GqucaI7aaMDgjoG9i LbNh6izqlDZ8w== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4VtvZ15s7tz2svn; Tue, 4 Jun 2024 11:26:01 -0400 (EDT) Received: from smtp-fw-52002.amazon.com (smtp-fw-52002.amazon.com [52.119.213.150]) by lists.lttng.org (Postfix) with ESMTPS id 4VtvZ01jDRz2sq7 for ; Tue, 4 Jun 2024 11:26:00 -0400 (EDT) X-IronPort-AV: E=Sophos;i="6.08,214,1712620800"; d="scan'208,217";a="637164509" Thread-Topic: [lttng-dev] [lttng-relayd] is there existing cases for relayd to stream over Android usb based adb? Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.43.8.6]) by smtp-border-fw-52002.iad7.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2024 15:25:58 +0000 Received: from EX19MTAUWC001.ant.amazon.com [10.0.21.151:26081] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.23.252:2525] with esmtp (Farcaster) id ded56566-6005-4263-a4ce-3581d2aea46a; Tue, 4 Jun 2024 15:25:57 +0000 (UTC) X-Farcaster-Flow-ID: ded56566-6005-4263-a4ce-3581d2aea46a Received: from EX19D003ANC002.ant.amazon.com (10.37.240.215) by EX19MTAUWC001.ant.amazon.com (10.250.64.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Tue, 4 Jun 2024 15:25:57 +0000 Received: from EX19D003ANC001.ant.amazon.com (10.37.240.216) by EX19D003ANC002.ant.amazon.com (10.37.240.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1258.34; Tue, 4 Jun 2024 15:25:56 +0000 Received: from EX19D003ANC001.ant.amazon.com ([fe80::ed4e:7258:fa8c:17e8]) by EX19D003ANC001.ant.amazon.com ([fe80::ed4e:7258:fa8c:17e8%5]) with mapi id 15.02.1258.034; Tue, 4 Jun 2024 15:25:56 +0000 To: Mathieu Desnoyers , Kienan Stewart , "lttng-dev@lists.lttng.org" Thread-Index: AQHaslKH7CI0j5/u4E6iXx4NZ5jN4bGwJewAgAU3KcyAAmC3AIAAAmEo Date: Tue, 4 Jun 2024 15:25:55 +0000 Message-ID: <9c0522c7090b4523aac4166a232ca50a@amazon.com> References: <92cc12a956e1404691519a7f02b7607d@amazon.com>, <0d226e1c-ff15-47f1-a902-bad362053903@efficios.com> In-Reply-To: <0d226e1c-ff15-47f1-a902-bad362053903@efficios.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.187.170.41] MIME-Version: 1.0 Subject: Re: [lttng-dev] [lttng-relayd] is there existing cases for relayd to stream over Android usb based adb? 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: "Wu, Yannan via lttng-dev" Reply-To: "Wu, Yannan" Content-Type: multipart/mixed; boundary="===============2710909978227420475==" Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" --===============2710909978227420475== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_9c0522c7090b4523aac4166a232ca50aamazoncom_" --_000_9c0522c7090b4523aac4166a232ca50aamazoncom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The device is a rooted android device On the device: lttng-sessiond -d --no-kernel lttng create my-live-session --live lttng enable-event -u lttng start On the host: adb reverse tcp:5343 tcp:5343 The adb reverse will fail for "adb.exe: error: cannot bind to socket" In the reversed order, if set up adb reverse from the host first and create= the live session after, lttng-relayd on device cannot be started. Here is the error message: PERROR - 15:23:30.915938387 [9813/9829]: Failed to bind socket: Address alr= eady in use (in relay_socket_create() at /src/VodkaLttngTool/build/private/= source/src/bin/lttng-relayd/main.c:1036) Error: Health error occurred in relay_thread_listener Error: A file descriptor leak has been detected: 1 tracked file descriptors= are still being tracked ________________________________ From: Mathieu Desnoyers Sent: Tuesday, June 4, 2024 11:09:40 PM To: Wu, Yannan; Kienan Stewart; lttng-dev@lists.lttng.org Subject: RE: [EXTERNAL] [lttng-dev] [lttng-relayd] is there existing cases = for relayd to stream over Android usb based adb? CAUTION: This email originated from outside of the organization. Do not cli= ck links or open attachments unless you can confirm the sender and know the= content is safe. Hi Amanda, For each of the 4 commands described below, please clarify on which device they are executed, whether on the Android device or on the Development device. Please make sure to follow to the letter the commands proposed by Kienan: in the correct order, and on the appropriate device. Thanks, Mathieu On 2024-06-02 22:55, Wu, Yannan via lttng-dev wrote: > Yes. My test command is like below: > > 1. lttng-sessiond --d --no-kernel > 2. > > yannanwu@ue91e96f2951b5c:~/trees/lttng_test_run$ lttng create my-user= -space-live-session --live > Live session my-user-space-live-session created. > Traces will be output to tcp4://127.0.0.1:5342/ [data: 5343] > Live timer interval set to 1000000 us > > 3. After this, I could "ps -Ax|grep lttng" and see lttng-relayd > started. But once I start adb reverse, it will failed for failed > binding to socket. > 4. In the other order, if I start adb reverse first and lttng-create > later, lttng-create will not fail but lttng-relayd is not started. > By manually start lttng-relayd it will also failed for unable > binding to socket. > > Amanda > > ------------------------------------------------------------------------ > *From:* Kienan Stewart > *Sent:* Friday, May 31, 2024 3:12:16 AM > *To:* Wu, Yannan; lttng-dev@lists.lttng.org > *Subject:* RE: [EXTERNAL] [lttng-dev] [lttng-relayd] is there existing > cases for relayd to stream over Android usb based adb? > CAUTION: This email originated from outside of the organization. Do not > click links or open attachments unless you can confirm the sender and > know the content is safe. > > > > Hi Amanda, > > I'd like to confirm my understanding the situation. > > Android device > - Running lttng-sessiond with one or more configured sessions > > Development device > - Connected to the android device over usb using adb > > You want want the data captured on the android device to be streamed via > the usb connection rather than the other networks on the android device. > > Could you expand on the commands you used to set up the tracing sessions > and relay, and where each of those commands were run? > > It sounds to me like you might want to be doing something like the > following: > > (Development device) Start lttng-relayd: > - tcp://0.0.0.0:5342 and :5343 will be bound on the development devic= e > - tcp://127.0.0.1:5344 will be available for the live reader > > (Development device) Create the reverses for the following ports: 5342 > and 5343 > - At this point :5342 and :5343 should be available on the android > device and reach the relayd running on the development device > > (Android device) Start lttng-sessiond > (Android device) Create session(s): `lttng create -U tcp://localhost/ > - Using `-U/--set-url`, no relayd will be spawned on the android devi= ce > (Android device) Start session(s) > > This setup should have the relayd running on the development and writing > the traces there and/or viewing them with a live viewer. On the android > device, the UST applications (if any) will connect to the local sessiond > and consumers, which will shuttle the information over :5342 and :5343 > to the developer device via the reverse sockets. > > Please note that I didn't have time to test this, so there might be some > mistakes. As I requested above, clear details of the exact commands you > use for the tracing setup would be very helpful to have the clearest > understanding of what you're doing. > > hope this helps, > kienan > > On 5/30/24 1:53 AM, Wu, Yannan via lttng-dev wrote: >> Hihi, there, >> >> I am currently working on enabling lttng live mode over android usb adb. >> Here is the situation, during debugging some network related issues, we >> dont want the trace data to be streamed via network to cause extra load >> to the system being profiled. Then we select to connect lttng-relayd >> with adb via port forwarding so that the data is "forward" to the host. >> >> *Here is the set up and the problem:* >> >> for the device: adb reverse tcp:5342 tcp:5342; adb reverse tcp:5343 >> tcp:5343; adb reverse tcp:5344 tcp:5344 >> Then starting up lttng with --live enabled. >> >> *What is expected:* >> lttng start streaming to the localhost. >> *What is seen: * >> the lttng-relayd failed to start. For unable binding to the socket. >> >> *The cause of this issue: * >> >> both adb reverse and lttng relayd need binding to the socket which is >> conflict with each other. >> >> >> So what I wanna ask is, for embedded system use cases, do we have >> successful use cases among team that could stream the trace data in live >> mode to the host with usb based adb? If not, any idea or suggestion to >> me on how to process forward? >> >> Amanda >> >> >> >> >> >> _______________________________________________ >> lttng-dev mailing list >> lttng-dev@lists.lttng.org >> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev > > > _______________________________________________ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com --_000_9c0522c7090b4523aac4166a232ca50aamazoncom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

The device is a rooted android device

On the device:

lttng-sessiond -d --no-kernel

lttng create my-live-session --live

lttng enable-event -u <mu customized event>

lttng start


On the host:

adb reverse tcp:5343 tcp:5343

The adb reverse will fail for "adb.exe: error: cannot bind= to socket"


In the reversed order, if set up adb reverse from the host first an= d create the live session after, lttng-relayd on device cannot be started.&= nbsp;
Here is the error message:

PERROR - 15:23:30.915938387 [9813/9829]: Failed to bind socket: Add= ress already in use (in relay_socket_create() at /src/VodkaLttngTool/build/= private/source/src/bin/lttng-relayd/main.c:1036)
Error: Health error occurred in relay_thread_listener
Error: A file descriptor leak has been detected: 1 tracked file des= criptors are still being tracked




From: Mathieu Desnoyers &= lt;mathieu.desnoyers@efficios.com>
Sent: Tuesday, June 4, 2024 11:09:40 PM
To: Wu, Yannan; Kienan Stewart; lttng-dev@lists.lttng.org
Subject: RE: [EXTERNAL] [lttng-dev] [lttng-relayd] is there existing= cases for relayd to stream over Android usb based adb?
 
CAUTION: This email originated from outside of the= organization. Do not click links or open attachments unless you can confir= m the sender and know the content is safe.



Hi Amanda,

For each of the 4 commands described below, please clarify on
which device they are executed, whether on the Android device
or on the Development device.

Please make sure to follow to the letter the commands proposed
by Kienan: in the correct order, and on the appropriate device.

Thanks,

Mathieu


On 2024-06-02 22:55, Wu, Yannan via lttng-dev wrote:
> Yes. My test command is like below:
>
>  1. lttng-sessiond --d --no-kernel
>  2.
>
>     yannanwu@ue91e96f2951b5c:~/trees/lttng_test_ru= n$ lttng create my-user-space-live-session --live
>     Live session my-user-space-live-session create= d.
>     Traces will be output to tcp4://127.0.0.1:5342= / [data: 5343]
>     Live timer interval set to 1000000 us
>
>  3. After this, I could "ps -Ax|grep lttng" and see ltt= ng-relayd
>     started. But once I start adb reverse, it will= failed for failed
>     binding to socket.
>  4. In the other order, if I start adb reverse first and lttng-cr= eate
>     later, lttng-create will not fail but lttng-re= layd is not started.
>     By manually start lttng-relayd it will also fa= iled for unable
>     binding to socket.
>
> Amanda
>
> ----------------------------------------------------------------------= --
> *From:* Kienan Stewart <kstewart@efficios.com>
> *Sent:* Friday, May 31, 2024 3:12:16 AM
> *To:* Wu, Yannan; lttng-dev@lists.lttng.org
> *Subject:* RE: [EXTERNAL] [lttng-dev] [lttng-relayd] is there existing=
> cases for relayd to stream over Android usb based adb?
> CAUTION: This email originated from outside of the organization. Do no= t
> click links or open attachments unless you can confirm the sender and<= br> > know the content is safe.
>
>
>
> Hi Amanda,
>
> I'd like to confirm my understanding the situation.
>
> Android device
>     - Running lttng-sessiond with one or more conf= igured sessions
>
> Development device
>     - Connected to the android device over usb usi= ng adb
>
> You want want the data captured on the android device to be streamed v= ia
> the usb connection rather than the other networks on the android devic= e.
>
> Could you expand on the commands you used to set up the tracing sessio= ns
> and relay, and where each of those commands were run?
>
> It sounds to me like you might want to be doing something like the
> following:
>
> (Development device) Start lttng-relayd:
>     - tcp://0.0.0.0:5342 and :5343 will be bound o= n the development device
>     - tcp://127.0.0.1:5344 will be available for t= he live reader
>
> (Development device) Create the reverses for the following ports: 5342=
> and 5343
>     - At this point :5342 and :5343 should be avai= lable on the android
> device and reach the relayd running on the development device
>
> (Android device) Start lttng-sessiond
> (Android device) Create session(s): `lttng create -U tcp://localhost/<= br> >     - Using `-U/--set-url`, no relayd will be spaw= ned on the android device
> (Android device) Start session(s)
>
> This setup should have the relayd running on the development and writi= ng
> the traces there and/or viewing them with a live viewer. On the androi= d
> device, the UST applications (if any) will connect to the local sessio= nd
> and consumers, which will shuttle the information over :5342 and :5343=
> to the developer device via the reverse sockets.
>
> Please note that I didn't have time to test this, so there might be so= me
> mistakes. As I requested above, clear details of the exact commands yo= u
> use for the tracing setup would be very helpful to have the clearest > understanding of what you're doing.
>
> hope this helps,
> kienan
>
> On 5/30/24 1:53 AM, Wu, Yannan via lttng-dev wrote:
>> Hihi, there,
>>
>> I am currently working on enabling lttng live mode over android us= b adb.
>> Here is the situation, during debugging some network related issue= s, we
>> dont want the trace data to be streamed via network to cause extra= load
>> to the system being profiled. Then we select to connect lttng-rela= yd
>> with adb via port forwarding so that the data is "forward&quo= t; to the host.
>>
>> *Here is the set up and the problem:*
>>
>> for the device:  adb reverse tcp:5342 tcp:5342; adb reverse t= cp:5343
>> tcp:5343; adb reverse tcp:5344 tcp:5344
>> Then starting up lttng with --live enabled.
>>
>> *What is expected:*
>> lttng start streaming to the localhost.
>> *What is seen: *
>> the lttng-relayd failed to start. For unable binding to the socket= .
>>
>> *The cause of this issue: *
>>
>> both adb reverse and lttng relayd need binding to the socket which= is
>> conflict with each other.
>>
>>
>> So what I wanna ask is, for embedded system use cases, do we have<= br> >> successful use cases among team that could stream the trace data i= n live
>> mode to the host with usb based adb? If not, any idea or suggestio= n to
>> me on how to process forward?
>>
>> Amanda
>>
>>
>>
>>
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> <https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

--_000_9c0522c7090b4523aac4166a232ca50aamazoncom_-- --===============2710909978227420475== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev --===============2710909978227420475==--