From: Babanpreet Singh <bbnpreetsingh@gmail.com>
To: bitbake-devel@lists.openembedded.org
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>,
Michael Opdenacker <michael.opdenacker@rootcommit.com>,
Babanpreet Singh <bbnpreetsingh@gmail.com>
Subject: [PATCH v2 0/3] prserv: add --status, and make --start notice a dead server
Date: Tue, 15 Sep 2026 16:06:30 +0000 [thread overview]
Message-ID: <20260915160633.7-1-bbnpreetsingh@gmail.com> (raw)
v1 of --status failed bitbake-selftest on the autobuilder: test_2 found
a stale pidfile for the server test_1 had just started. The daemon dies
somewhere between writing its pidfile and serving, and --start cannot
tell, because it returns once the intermediate fork exits. The old
start/stop pair never noticed a dead server since --stop treats a stale
pidfile as success. Every autobuilder run that carried v1 failed the
same way (26 runs on 20 workers, on Richard's and Mathieu's
master-next) while it passes here. Binding 8585 before --start gives
the identical symptom, but the workers' prserv.log is not published so
I do not know what kills it there.
1/3 ScriptTests picks a free port and keeps one database directory
for the class instead of 8585 and a directory per test.
2/3 --start waits until the daemon has bound and opened its database,
and exits 1 with the daemon's error and the logfile path if it
fails first. The daemon removes its pidfile on failure. New test:
--start on a busy port fails and leaves no pidfile.
3/3 --status, as in v1, with the tests on the class port.
If the daemon still dies on the autobuilder, test_1 fails with the
reason in the log rather than test_2 with a stale pidfile.
Tested on top of 046a90b0e: prserv.tests 10/10 at the tip and at each
intermediate commit, ScriptTests 20 runs in a row clean, and the rest of
bitbake-selftest module by module with BB_SKIP_NETTESTS=yes, all OK
except hashserv.tests, which hangs on this host with or without these
patches.
Babanpreet Singh (3):
prserv/tests: run ScriptTests on a free port with one database
prserv: make --start fail when the server does not come up
prserv: add --status to list running servers
bin/bitbake-prserv | 7 +++++
lib/prserv/serv.py | 76 ++++++++++++++++++++++++++++++++++++++++-----
lib/prserv/tests.py | 54 +++++++++++++++++++++++++++-----
3 files changed, 122 insertions(+), 15 deletions(-)
--
2.43.0
next reply other threads:[~2026-09-15 16:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 16:06 Babanpreet Singh [this message]
2026-09-15 16:06 ` [PATCH v2 1/3] prserv/tests: run ScriptTests on a free port with one database Babanpreet Singh
2026-09-15 16:06 ` [PATCH v2 2/3] prserv: make --start fail when the server does not come up Babanpreet Singh
2026-09-15 16:06 ` [PATCH v2 3/3] prserv: add --status to list running servers Babanpreet Singh
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=20260915160633.7-1-bbnpreetsingh@gmail.com \
--to=bbnpreetsingh@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=michael.opdenacker@rootcommit.com \
--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.