From patchwork Thu Jun 16 13:48:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 9283 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D63D3C43334 for ; Thu, 16 Jun 2022 13:49:13 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.groups.io with SMTP id smtpd.web09.18163.1655387346331806704 for ; Thu, 16 Jun 2022 06:49:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QPiVka1M; spf=pass (domain: gmail.com, ip: 209.85.221.43, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f43.google.com with SMTP id c21so1983029wrb.1 for ; Thu, 16 Jun 2022 06:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PfZZCRPZPD4SUOVAKZl6a30wIvMwQ+X32uJssyguZ7c=; b=QPiVka1MZKUJeRyQN78U4peWilK/aX4oyMNQzZUj+TUYTtc8pm6DkdJOkP0kUMA5Ky dojkSbl79IEcdgHlJLLCU3mch/3QaJjRi/1T3N5yFEmyjKxq5HLUfArfb/ySAt8i52kC eTFRTTxd5zRziSI5g4SkUjST21uYlChVESA+DFf2NoOrmU5cS0u7UyjWvJyH82kR9Hn8 EIMkG9fj8LzLZp1k3YBMjiOP3Y5/8zdLtOglGZB5WHzmdJcsmvwMJEUNRxy69OUG0bgX 6IpzCmvZzF+7h1ya93nREUa74i4WhmYRS4HSLxfnQLxtk2USZyi11jZBjGUCtQ8H9XWU FUvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PfZZCRPZPD4SUOVAKZl6a30wIvMwQ+X32uJssyguZ7c=; b=NGcUQl4iZYUaxvopYs59jrdHUlr4LrVVWwWJ0YU7vUocn448wwSba8Cd6REDbswz26 3WaNiW8+47l35y3W8Zye8RMKt29BcoxrqZs8OlrQqCxbWiUOy7nIG5KJUSY4rQ94TXQm XhDzuT8jZQbnIe/Ym3qpEk72JjOMC6GudowcR6hurQvkWfF+5DirxAfx+IESUlKekrq0 682+F6VIJLMuvLR5+62gn4VI4JG5KrnBxtBUS1qUDodvpsUgdGiUDc6N9wtvpOmjrvPw Q1Nj1Hl3+1omzrA5jW/+J3a1qdBPTA2vxvsQ3PiO9RGJ28SeNhofxzD5HUvf4VzQj4e2 48yg== X-Gm-Message-State: AJIora95NABt89dFGA09vuf6r7ANnGL/r31SijTVphSsqNJQ0v+KLf0D AyzlNVNoheJn7OuxJ6/6P7M3Vi8cIWA= X-Google-Smtp-Source: AGRyM1tuvGnTnLL5ohR/x26WwAN95mIpf8Er0FrjP40zgXzR8LZQfO6kxRbjH40b5KZZRx7djiWCXQ== X-Received: by 2002:a5d:6d8b:0:b0:218:4de1:25a0 with SMTP id l11-20020a5d6d8b000000b002184de125a0mr4970894wrs.8.1655387344678; Thu, 16 Jun 2022 06:49:04 -0700 (PDT) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id v184-20020a1cacc1000000b0039c454067ddsm2395679wme.15.2022.06.16.06.49.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 06:49:04 -0700 (PDT) From: Martin Jansa X-Google-Original-From: Martin Jansa To: bitbake-devel@lists.openembedded.org Cc: Richard Purdie Subject: [1.46][PATCH 1/4] tinfoil/data_smart: Allow variable history emit() to function remotely Date: Thu, 16 Jun 2022 15:48:47 +0200 Message-Id: <20220616134850.3471187-1-Martin.Jansa@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 16 Jun 2022 13:49:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13768 From: Richard Purdie We can't access the emit() function of varhistory currently as the datastore parameter isn't handled correctly, nor is the output stream. Add a custom wrapper for this function which handles the two details correctly. Signed-off-by: Richard Purdie --- lib/bb/command.py | 12 ++++++++++++ lib/bb/tinfoil.py | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/lib/bb/command.py b/lib/bb/command.py index 98c945ed..b8429b27 100644 --- a/lib/bb/command.py +++ b/lib/bb/command.py @@ -20,6 +20,7 @@ Commands are queued in a CommandQueue from collections import OrderedDict, defaultdict +import io import bb.event import bb.cooker import bb.remotedata @@ -478,6 +479,17 @@ class CommandsSync: d = command.remotedatastores[dsindex].varhistory return getattr(d, method)(*args, **kwargs) + def dataStoreConnectorVarHistCmdEmit(self, command, params): + dsindex = params[0] + var = params[1] + oval = params[2] + val = params[3] + d = command.remotedatastores[params[4]] + + o = io.StringIO() + command.remotedatastores[dsindex].varhistory.emit(var, oval, val, o, d) + return o.getvalue() + def dataStoreConnectorIncHistCmd(self, command, params): dsindex = params[0] method = params[1] diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py index 28f1e562..8bec8cba 100644 --- a/lib/bb/tinfoil.py +++ b/lib/bb/tinfoil.py @@ -53,6 +53,10 @@ class TinfoilDataStoreConnectorVarHistory: def remoteCommand(self, cmd, *args, **kwargs): return self.tinfoil.run_command('dataStoreConnectorVarHistCmd', self.dsindex, cmd, args, kwargs) + def emit(self, var, oval, val, o, d): + ret = self.tinfoil.run_command('dataStoreConnectorVarHistCmdEmit', self.dsindex, var, oval, val, d.dsindex) + o.write(ret) + def __getattr__(self, name): if not hasattr(bb.data_smart.VariableHistory, name): raise AttributeError("VariableHistory has no such method %s" % name) From patchwork Thu Jun 16 13:48:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 9284 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F34AFCCA47E for ; Thu, 16 Jun 2022 13:49:13 +0000 (UTC) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mx.groups.io with SMTP id smtpd.web08.17891.1655387347562174527 for ; Thu, 16 Jun 2022 06:49:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HiMMJvXe; spf=pass (domain: gmail.com, ip: 209.85.128.41, mailfrom: martin.jansa@gmail.com) Received: by mail-wm1-f41.google.com with SMTP id m16-20020a7bca50000000b0039c8a224c95so910159wml.2 for ; Thu, 16 Jun 2022 06:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=duyNTGMvZE0oxJFURy56BK1PgpgJuqZ6WzON69fN5Fs=; b=HiMMJvXe9/33kldujCIvrmRUvpWMluINKfZ/0q6U44XZuZ0XDY775QvX7uq9aWwqwL gTcvLcNzyoNskRgCv4tt+WJpsZyh5E3xXBqe2sOYkbIADalW8zKnkEFcJl3nBzN081M+ yeEFRWfTkccoj1828OAW6vfI6qVttWcy/e605P82iEMPfumEbWgjsTE/Yeb2bNgTtOBF hr4VYUcw/EdFjRwBWOIUwB3fQABmov0T/VGhHxFvh9kFFUGkpz2Il+iSMgkPjtUM4vSi 8kMrQcjonBVwYOVQb8bS/lEGv3G4QBcyw5Zk3+c/NRfIuvkXv9SWhzlSc1UxHBy2gIZA 1cQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=duyNTGMvZE0oxJFURy56BK1PgpgJuqZ6WzON69fN5Fs=; b=3fLMjMw2FDotSXzuhRgKXCWVNMherozvJU8QLWdeMc7sTkQFN3DOTnFnCSaOjMg7YL NSElgcQ4/pWyRyxt3iueXQywRNFmCby5VJPQf+6Zf3w1nz8gFTILe2TpmK9Bj0GVw1dk Us/kDEq7cGfz+JMbyb4IxVAZ/9XAIXYceyvrI/Q8I1HWTGjb9ACiype5YstIWRRwBSQp eYPurfEKw0VvKwYxXK1oxSENl1kUgD5h8y6tjkOjnPMl7nCv5nVVnKePUabAXWAN6mW0 5gHuD5YNsUyWIcfcgovxDcZ0EdX2/yU8zd1wYR/pEm4qumZiXIa1Zz946J7ubBevGW74 3zVA== X-Gm-Message-State: AJIora/l27kgDFBMJax+cXFrOIG9rrtOauZQjHJR2I/hbcaqWuOtuZa2 7gq1ONcZ2lwNghv5X2/ghh1k8ppjS38= X-Google-Smtp-Source: AGRyM1vGY3pIktA2ZLWXfJea1H9kWoZMPC1F8pcTTmnOHkt0QUkm74PZsGC9/H++8ApCvEje6rA3mQ== X-Received: by 2002:a05:600c:2054:b0:39c:3f73:3552 with SMTP id p20-20020a05600c205400b0039c3f733552mr5204991wmg.15.1655387345935; Thu, 16 Jun 2022 06:49:05 -0700 (PDT) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id v12-20020a5d678c000000b0020c5253d90asm1957391wru.86.2022.06.16.06.49.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 06:49:05 -0700 (PDT) From: Martin Jansa X-Google-Original-From: Martin Jansa To: bitbake-devel@lists.openembedded.org Cc: Richard Purdie Subject: [1.46][PATCH 2/4] bin/bitbake-getvar: Add a new command to query a variable value (with history) Date: Thu, 16 Jun 2022 15:48:48 +0200 Message-Id: <20220616134850.3471187-2-Martin.Jansa@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220616134850.3471187-1-Martin.Jansa@gmail.com> References: <20220616134850.3471187-1-Martin.Jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 16 Jun 2022 13:49:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13769 From: Richard Purdie We've talked about having this for long enough. Add a command which queries a single variable value with history. This saves "bitbake -e | grep" and avoids the various pitfalls that has. It also provides a neat example of using tinfoil to make such a query. Parameters to limit the output to just the value, to limit to a variable flag and to not expand the output are provided. [YOCTO #10748] Signed-off-by: Richard Purdie --- bin/bitbake-getvar | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 bin/bitbake-getvar diff --git a/bin/bitbake-getvar b/bin/bitbake-getvar new file mode 100755 index 00000000..0eddfe29 --- /dev/null +++ b/bin/bitbake-getvar @@ -0,0 +1,48 @@ +#! /usr/bin/env python3 +# +# Copyright (C) 2021 Richard Purdie +# +# SPDX-License-Identifier: GPL-2.0-only +# + +import argparse +import io +import os +import sys + +bindir = os.path.dirname(__file__) +topdir = os.path.dirname(bindir) +sys.path[0:0] = [os.path.join(topdir, 'lib')] + +import bb.tinfoil + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Bitbake Query Variable") + parser.add_argument("variable", help="variable name to query") + parser.add_argument("-r", "--recipe", help="Recipe name to query", default=None, required=False) + parser.add_argument('-u', '--unexpand', help='Do not expand the value (with --value)', action="store_true") + parser.add_argument('-f', '--flag', help='Specify a variable flag to query (with --value)', default=None) + parser.add_argument('--value', help='Only report the value, no history and no variable name', action="store_true") + args = parser.parse_args() + + if args.unexpand and not args.value: + print("--unexpand only makes sense with --value") + sys.exit(1) + + if args.flag and not args.value: + print("--flag only makes sense with --value") + sys.exit(1) + + with bb.tinfoil.Tinfoil(tracking=True) as tinfoil: + if not args.recipe: + tinfoil.prepare(quiet=2, config_only=True) + d = tinfoil.config_data + else: + tinfoil.prepare(quiet=2) + d = tinfoil.parse_recipe(args.recipe) + if args.flag: + print(str(d.getVarFlag(args.variable, args.flag, expand=(not args.unexpand)))) + elif args.value: + print(str(d.getVar(args.variable, expand=(not args.unexpand)))) + else: + bb.data.emit_var(args.variable, d=d, all=True) From patchwork Thu Jun 16 13:48:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 9285 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6F7BC3F2D4 for ; Thu, 16 Jun 2022 13:49:13 +0000 (UTC) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.groups.io with SMTP id smtpd.web11.17873.1655387348455523470 for ; Thu, 16 Jun 2022 06:49:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HbeRASou; spf=pass (domain: gmail.com, ip: 209.85.221.45, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f45.google.com with SMTP id w17so1958565wrg.7 for ; Thu, 16 Jun 2022 06:49:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5Z/+9Q9P8Pd+cpUlHbyLDcQ987zCspEEfE31i9WyVkY=; b=HbeRASouj1Hcqg8DcpTtH/RsMiv/U643bL5L1vEGleLLclUuDvrE27IHdnudtAPaCF ETxA5/1VG/XESQ/FMhfkjRfRJQdl9F+Srgx8EGZecsud1rx5JHNIiuWsYuIP6JyOsvuK fSRAFTmGn1Q6CpysyUxNkdUZuzBtfs2O5l3NuRyyGO1dZ+Zk9OPpbyuPZFONK9sITM4S Nr2W8IdV0JV/ZBJYZ8xlE2/AwovtlksDGRhKxk8f9iUh2BCoTrXNWxEdAoj+fuifslRQ pfJtPrzBJHgRBBiTaeqQmk4pv8uBsgMB8kCnKh6/txUQFRyOmNo23TPCmKNXR8xfxMzr /iwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5Z/+9Q9P8Pd+cpUlHbyLDcQ987zCspEEfE31i9WyVkY=; b=Z0ktOZxj5wc1YF789lv/qPqe9w36u8/B+ZUs7DYP1TI7d71VnRh9u1QA/Ym6WHkivx Pdc3++1PQE6VGuz/dMuMPVWvyCLABMrluuLFuF5l2RUOtPC9Vot8WPVsrmX1JcEmpffO 90oxpxtAqtMt6T+mGfbhjqlaiuheFx9BGWZSVPqlU/OwnzftZPs0exS6/QYAee5Yvs8a 8pRLOG4qbVNaIo/a5FU1E7033JGsfrz9lDNoR426s0p1vuPX1uKz1ckZUsmi2cmOX1lV ia3JWqw1+zuOERMU+Cx6I93XbuOng3q+W/kvk22XAncD+hQGd48itp4BX9CoqkY5N4ww 95zQ== X-Gm-Message-State: AJIora8ZnqcNaInFwou1EAhSeoj102XqZy4gjX9iIrUWPG37tNxb7Pz3 /z04niVQjEl9RCLSUTf9umf2fLQIn64= X-Google-Smtp-Source: AGRyM1uBvDPhwdrQzLnDunf+2ypHYhobsXaMdyfYgRHPDqra7/mFczbEtmbn7EgCqVD4izPw+NQunw== X-Received: by 2002:adf:d1e7:0:b0:215:2126:dede with SMTP id g7-20020adfd1e7000000b002152126dedemr4774892wrd.297.1655387347074; Thu, 16 Jun 2022 06:49:07 -0700 (PDT) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id m188-20020a1c26c5000000b0039c4945c753sm5988313wmm.39.2022.06.16.06.49.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 06:49:06 -0700 (PDT) From: Martin Jansa X-Google-Original-From: Martin Jansa To: bitbake-devel@lists.openembedded.org Cc: Ross Burton , Ross Burton , Alexandre Belloni , Richard Purdie , Anuj Mittal Subject: [1.46][PATCH 3/4] knotty: display active tasks when printing keepAlive() message Date: Thu, 16 Jun 2022 15:48:49 +0200 Message-Id: <20220616134850.3471187-3-Martin.Jansa@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220616134850.3471187-1-Martin.Jansa@gmail.com> References: <20220616134850.3471187-1-Martin.Jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 16 Jun 2022 13:49:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13770 From: Ross Burton In interactive bitbake sessions it is obvious what tasks are running when one of them hangs or otherwise takes a long time. However, in non-interactive sessions (such as automated builds) bitbake just prints a message saying that it is "still alive" with no clues as to what tasks are active still. By simply listing the active tasks when printing the keep alive message, we don't need to parse the bitbake log to identify which of the tasks is still active and has presumably hung. Signed-off-by: Ross Burton Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit 30f6c3f175617beea8e8bb75dcf255611e3fc2fd) Signed-off-by: Anuj Mittal Signed-off-by: Richard Purdie --- lib/bb/ui/knotty.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py index e70c2464..71c5a3e9 100644 --- a/lib/bb/ui/knotty.py +++ b/lib/bb/ui/knotty.py @@ -227,7 +227,9 @@ class TerminalFilter(object): def keepAlive(self, t): if not self.cuu: - print("Bitbake still alive (%ds)" % t) + print("Bitbake still alive (no events for %ds). Active tasks:" % t) + for t in self.helper.running_tasks: + print(t) sys.stdout.flush() def updateFooter(self): From patchwork Thu Jun 16 13:48:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 9282 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6642CCA47A for ; Thu, 16 Jun 2022 13:49:13 +0000 (UTC) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mx.groups.io with SMTP id smtpd.web09.18166.1655387349566663526 for ; Thu, 16 Jun 2022 06:49:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=q3gDWFTk; spf=pass (domain: gmail.com, ip: 209.85.128.52, mailfrom: martin.jansa@gmail.com) Received: by mail-wm1-f52.google.com with SMTP id z9so809896wmf.3 for ; Thu, 16 Jun 2022 06:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ofrl6iRRWZ07K8HObjlrKvIGGakVB3gHx50TBprsnuE=; b=q3gDWFTkPNsvqYkt6E50P6CoVqlS9aZ1OzSxdOIjoCmzjrSdgekXurHCc56EdsD6b/ XuZqZuLzGMmOe0bv3xJ6dR5raGSV2e0GvLoKQEYf0sO75bpXmv7FNfur5wZW1NTus5cF GREVVlJSZmK2syNwTdVeQqvMMQUjwnq+PGW4whFrOIR/Nx3k2V5JXKDe32AWPEmmCnkd LK9RgBRObdHewEuHivu4DqC/vAzbJi6h8NhebWdGxMLw3nnr/toRbfh8gcKFMmfJH2Kr Y7VbMDUfzePh87lhEuW5BAJ2oqVYe4yiSe4DZVQk7MoLcFiL8xxVuyHqsF1Jeg5kdc/H SK6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ofrl6iRRWZ07K8HObjlrKvIGGakVB3gHx50TBprsnuE=; b=LZ6ZKevXYo/Z1tGXak6DbCjAl+eTL0z7oOcdMQzUsc+y7nU/OgdvjA7ccPfkv5W83Y ft+vbGoHHlC9dp2aA8VdOqQq77yHjit35m7bDCd+inLPg7XtXsue3b4yo9xKI/3UPUKD YTxkun59LpfK5YARf0MSTae6FajMlijXx7B38qT5qsqUvxocBlJh4wJ7J3bCWdy1htMi /GluKHtxTUwpDInDCTcuGbByXEjWmVwoYojkVb/8qCdwj0dxh6fmH/Zbvz82fkfHHKnl +Bb6CshoJP+FaJFsGiRbYqLVowHSAeE2rWchemfHh6j6oX1K4rCjpLa4B1jy0rmj2Xvl 7EIA== X-Gm-Message-State: AJIora9JgrojfzX2+R/028QBMfPaAijdJfCxAAuDRFzqkrmy1rccpZa7 Pi74/UpibSS3UP4Jfr+XPVvSREmdQlM= X-Google-Smtp-Source: AGRyM1udRVjlq9/K1nl3lejx0LKlsh6vghsHlx88Cat/TQjBDVNsrc/LhPPYYyjA7mP82FyF5s2wQQ== X-Received: by 2002:a05:600c:1d1c:b0:39c:7ac8:1faa with SMTP id l28-20020a05600c1d1c00b0039c7ac81faamr5195113wms.202.1655387348178; Thu, 16 Jun 2022 06:49:08 -0700 (PDT) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id by13-20020a056000098d00b0021a39a56a73sm1347299wrb.106.2022.06.16.06.49.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 06:49:07 -0700 (PDT) From: Martin Jansa X-Google-Original-From: Martin Jansa To: bitbake-devel@lists.openembedded.org Cc: Ross Burton , Ross Burton , Alexandre Belloni , Richard Purdie , Anuj Mittal Subject: [1.46][PATCH 4/4] knotty: reduce keep-alive timeout from 5000s (83 minutes) to 10 minutes Date: Thu, 16 Jun 2022 15:48:50 +0200 Message-Id: <20220616134850.3471187-4-Martin.Jansa@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220616134850.3471187-1-Martin.Jansa@gmail.com> References: <20220616134850.3471187-1-Martin.Jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 16 Jun 2022 13:49:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13771 From: Ross Burton The keep alive timeout is excessively long at 83 minutes (5000 seconds), reduce this to 10 minutes: this should be long enough that it rarely triggers in normal builds, but when it does it has useful information. Signed-off-by: Ross Burton Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit dcf52157d3635925491783be656c6b76d1efe1a4) Signed-off-by: Anuj Mittal Signed-off-by: Richard Purdie --- lib/bb/ui/knotty.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py index 71c5a3e9..d1f74389 100644 --- a/lib/bb/ui/knotty.py +++ b/lib/bb/ui/knotty.py @@ -599,7 +599,8 @@ def main(server, eventHandler, params, tf = TerminalFilter): warnings = 0 taskfailures = [] - printinterval = 5000 + printintervaldelta = 10 * 60 # 10 minutes + printinterval = printintervaldelta lastprint = time.time() termfilter = tf(main, helper, console_handlers, params.options.quiet) @@ -609,7 +610,7 @@ def main(server, eventHandler, params, tf = TerminalFilter): try: if (lastprint + printinterval) <= time.time(): termfilter.keepAlive(printinterval) - printinterval += 5000 + printinterval += printintervaldelta event = eventHandler.waitEvent(0) if event is None: if main.shutdown > 1: @@ -640,7 +641,7 @@ def main(server, eventHandler, params, tf = TerminalFilter): if isinstance(event, logging.LogRecord): lastprint = time.time() - printinterval = 5000 + printinterval = printintervaldelta if event.levelno >= bb.msg.BBLogFormatter.ERROR: errors = errors + 1 return_value = 1