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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 298BEC433B4 for ; Tue, 4 May 2021 14:44:16 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 36822613B4 for ; Tue, 4 May 2021 14:44:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36822613B4 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=lists.lttng.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lttng-dev-bounces@lists.lttng.org Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4FZMzx3XQ3z1gt6; Tue, 4 May 2021 10:44:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1620139454; bh=TSKIPxAP1OtYnDRiwQz9gMLYQskFy/r/dPi2Ylm4goo=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=hV1lV7lFiGbITBpsQJgN/lUt2IlgQMaXQ+jElcjQy55MbyNYupVg3FXPE3KFTW1Vn Y12sqD/UFUmXGdb+BQAF/+RrT1TTnIO8tVxahTITAuyYiS2LjLRYpWu+xo4BzCikkQ +CgyHyciC/QovAfhZsPLRYFoAOVsfxbgs66g1qISKgY8NSYV3N97oJJPOfIiNh7iLF SLHFuWD/VIWTRoYUr0z6V3ku7VahDFwVvtMEVl3bVgLLEf0uCmIW9LQ2IF41v5JXVY GDFm39jb0c21JFqPgl8phRiBu3RvLbuWBTUewTUrfxd97V6CT7Zc9gMc2SrtpK62fw g8mYxM9sMe5rQ== Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by lists.lttng.org (Postfix) with ESMTPS id 4FZMzv75jDz1h1p for ; Tue, 4 May 2021 10:44:11 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 857532E33F4 for ; Tue, 4 May 2021 10:44:05 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id eQkcp-qDAm94; Tue, 4 May 2021 10:44:05 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 0D2332E2E86; Tue, 4 May 2021 10:44:05 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 0D2332E2E86 X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ZHcS1bce_DML; Tue, 4 May 2021 10:44:05 -0400 (EDT) Received: from joraj-alpa (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) by mail.efficios.com (Postfix) with ESMTPSA id B8B1C2E32EF; Tue, 4 May 2021 10:44:04 -0400 (EDT) Date: Tue, 4 May 2021 10:44:03 -0400 To: Eqbal Cc: lttng-dev@lists.lttng.org Message-ID: <20210504144403.GB346954@joraj-alpa> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [lttng-dev] lttng live event loss with babeltrace2 X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jonathan Rajotte-Julien via lttng-dev Reply-To: Jonathan Rajotte-Julien Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" On Mon, May 03, 2021 at 05:05:10PM -0700, Eqbal via lttng-dev wrote: > Hi, > > I have a lttng live session trace consumer application using libbabeltrace2 > where I create a graph to consume lttng live session traces and output to > another sink. I am running the graph in a loop at some polling interval as > long as I get BT_GRAPH_RUN_STATUS_AGAIN status. What I am noticing is that > if my polling interval is large enough I tend to lose either all or some of > the events. I experimented with various polling intervals and it seems if > the polling interval is less than *DELAYUS *from "lttng-create > --live=DELAYUS" option then I am able to get all the events, otherwise I > tend to lose events. > > Here are the steps I follow: > 1. start session daemon and relay daemon > 2. create a live session (with default delay of 1s), enable events and start > 3. Start my application (hello world example from lttng docs) Not sure if you modified it in any way, but be careful with short lived apps since an app can terminate before lttng-ust have a chance to register. > 4. Start the consumer application built using libbabeltrace that connects > to the live session hmm. Note that when attaching to a session it does not start at the beginning of the trace collected by lttng-relayd, it start at the last received data from lttng-relayd from the lttng-consumerd (LTTNG_VIEWER_SEEK_LAST). Hence I would recommend that these steps be inversed: 4. Start the consumer application built using libbabeltrace that connects to the live session 3. Start my application (hello world example from lttng docs) > > I noticed that the events are actually persisted in the ~/lttng-traces by > the relay daemon, but it does not reach babeltrace consumer application. I > have noticed the same behavior with babeltrace2 cli. > > I would like to understand what is the reason for such behavior and if > playing with the polling interval in relation to the DELAYUS value is the > right thing to do. I think I reproduced the issue but I'm not completely sure it is the same problem. Please file an issue on the bug tracker [1] with as much information as possible, the exact lttng commands used, the current behaviour and the expected behaviour. I'll add my findings if relevant. But I think it might be a weird handling of how we handle the first "empty" retry and the subsequent get phase. After the initial phase everything seems to work as expected. [1] https://bugs.lttng.org/ -- Jonathan Rajotte-Julien EfficiOS _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev