All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] prserv: add --status, and make --start notice a dead server
@ 2026-09-15 16:06 Babanpreet Singh
  2026-09-15 16:06 ` [PATCH v2 1/3] prserv/tests: run ScriptTests on a free port with one database Babanpreet Singh
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Babanpreet Singh @ 2026-09-15 16:06 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Richard Purdie, Michael Opdenacker, Babanpreet Singh

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-15 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 16:06 [PATCH v2 0/3] prserv: add --status, and make --start notice a dead server Babanpreet Singh
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

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.