From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
"bitbake-devel@lists.openembedded.org"
<bitbake-devel@lists.openembedded.org>
Subject: RE: [bitbake-devel] [PATCH 03/15] knotty: Ping the server/cooker periodically
Date: Fri, 30 Dec 2022 15:44:28 +0000 [thread overview]
Message-ID: <616e8bd535e74fd39d8ed3dab0840249@axis.com> (raw)
In-Reply-To: <20221229170728.880367-4-richard.purdie@linuxfoundation.org>
> -----Original Message-----
> From: bitbake-devel@lists.openembedded.org <bitbake-devel@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 29 december 2022 18:07
> To: bitbake-devel@lists.openembedded.org
> Subject: [bitbake-devel] [PATCH 03/15] knotty: Ping the server/cooker periodically
>
> We've seeing failures where the UI hangs if the server disappears. Ping
Change " We've seeing" to either "We're seeing" or "We've seen".
> the cooker/server if we've not had any events in the last minute so we can
> check if it is still alive.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> lib/bb/ui/knotty.py | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
> index 61cf0a37f4..ab1a367be0 100644
> --- a/lib/bb/ui/knotty.py
> +++ b/lib/bb/ui/knotty.py
> @@ -625,7 +625,8 @@ def main(server, eventHandler, params, tf = TerminalFilter):
>
> printintervaldelta = 10 * 60 # 10 minutes
> printinterval = printintervaldelta
> - lastprint = time.time()
> + pinginterval = 1 * 60 # 1 minutes
Change "1 minutes" to "1 minute".
> + lastevent = lastprint = time.time()
>
> termfilter = tf(main, helper, console_handlers, params.options.quiet)
> atexit.register(termfilter.finish)
> @@ -637,6 +638,14 @@ def main(server, eventHandler, params, tf = TerminalFilter):
> printinterval += printintervaldelta
> event = eventHandler.waitEvent(0)
> if event is None:
> + if (lastevent + pinginterval) <= time.time():
> + ret, error = server.runCommand(["ping"])
> + if error or not ret:
> + termfilter.clearFooter()
> + print("No reply after pinging server (%s, %s), exiting." % (str(error), str(ret)))
> + return_value = 3
> + main.shutdown = 2
> + lastevent = time.time()
> if main.shutdown > 1:
> break
> if not parseprogress:
> @@ -644,6 +653,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
> event = eventHandler.waitEvent(0.25)
> if event is None:
> continue
> + lastevent = time.time()
> helper.eventHandler(event)
> if isinstance(event, bb.runqueue.runQueueExitWait):
> if not main.shutdown:
> --
> 2.37.2
//Peter
next prev parent reply other threads:[~2022-12-30 15:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-29 17:07 [PATCH 00/15] Bitbake server thread enabling Richard Purdie
2022-12-29 17:07 ` [PATCH 01/15] command: Tweak finishAsyncCommand ordering to avoid races Richard Purdie
2022-12-29 17:07 ` [PATCH 02/15] cooker: Ensure commands clean up any parser processes Richard Purdie
2022-12-29 17:07 ` [PATCH 03/15] knotty: Ping the server/cooker periodically Richard Purdie
2022-12-30 15:44 ` Peter Kjellerstedt [this message]
2022-12-29 17:07 ` [PATCH 04/15] event: Add enable/disable heartbeat code Richard Purdie
2022-12-29 17:07 ` [PATCH 05/15] server/process: Run idle commands in a separate idle thread Richard Purdie
2022-12-29 17:07 ` [PATCH 06/15] server/process: Improve idle loop exit code Richard Purdie
2022-12-29 17:07 ` [PATCH 07/15] process: Improve client disconnect/idle sync Richard Purdie
2022-12-29 17:07 ` [PATCH 08/15] process: Improve async command execution with idle interaction Richard Purdie
2022-12-29 17:07 ` [PATCH 09/15] knotty: Avoid looping with tracebacks Richard Purdie
2022-12-29 17:07 ` [PATCH 10/15] event: Always use threadlock Richard Purdie
2022-12-29 17:07 ` [PATCH 11/15] server/process: Improve exception logging Richard Purdie
2022-12-29 17:07 ` [PATCH 12/15] cooker/cookerdata: Rework the way the datastores are reset Richard Purdie
2022-12-29 17:07 ` [PATCH 13/15] cooker: Ensure we clean up active idle handlers Richard Purdie
2022-12-29 17:07 ` [PATCH 14/15] cache: Drop reciever side counting for SiggenRecipeInfo Richard Purdie
2022-12-30 15:46 ` [bitbake-devel] " Peter Kjellerstedt
2022-12-29 17:07 ` [PATCH 15/15] server/process: Add debug to show which handlers are active Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=616e8bd535e74fd39d8ed3dab0840249@axis.com \
--to=peter.kjellerstedt@axis.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.