[patch] libabigail multithreaded trybuilder
Mark Wielaard
mark@klomp.org
Wed Aug 26 09:53:46 GMT 2026
Hi Frank,
On Tue, Aug 25, 2026 at 07:07:07PM -0400, Frank Ch. Eigler wrote:
> libabigail: try builder for multithreading against sibling elfutils
>
> Add libabigail-try-fedora-x86_64-mt so Dodji can exercise --enable-multithreading
> (plus asan/tsan) without a dedicated container: build thread-safe elfutils into
> a sibling euts prefix, then run the three combos sequentially with bunsen
> tagsuffix values. Leave master builders unchanged for now.
>
> Co-authored-by: Cursor <cursoragent@cursor.com>
The patch itself looks OK, but three comments:
- The commit message has too long lines, please keep < 78.
- You are sending this to a mailinglist, but have a a DKIM signature
that says not to add list headers. That will just make the email
bounce for anyone checking the dkim signature. Please drop the DKIM
header sigs for requiring empty List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive. (I didn't receive
it, I only noticed by looking at inbox).
- I assume you are using some genAI-LLM "agent" to "assist" you. I
think we should adopt a policy like other toolchain project which
says that is fine as long as it doesn't actually generate code. But
please loose the "Co-authored-by" tag. An genAI-LLM can never be the
author of a patch and the tag doesn't provide any useful
information, it is just advertisement for some proprietary "agent
shell".
> diff --git a/builder/master.cfg b/builder/master.cfg
> index 7316038a8c01..a143f9109332 100644
> --- a/builder/master.cfg
> +++ b/builder/master.cfg
> @@ -806,6 +806,7 @@ libabigail_try_scheduler = schedulers.AnyBranchScheduler(
> builderNames=["libabigail-try-alma-x86_64",
> "libabigail-try-fedora-arm64",
> "libabigail-try-fedora-x86_64",
> + "libabigail-try-fedora-x86_64-mt",
> # "libabigail-try-gentoo-sparc",
> # "libabigail-try-rawhide-x86_64",
> # "libabigail-try-debian-testing-x86_64",
OK.
> @@ -4976,6 +4977,148 @@ libabigail_factory_snapshot_html_doc.addStep(wait_snapshots_output_ready_step)
> libabigail_factory_snapshot_html_doc.addStep(libabigail_create_output_step)
> libabigail_factory_snapshot_html_doc.addStep(libabigail_create_publish_file_step)
>
> +# Multithreading try-factory: build thread-safe elfutils into a sibling
> +# prefix under %(prop:builddir)s/euts, then run libabigail mt / mtasan /
> +# mttsan sequentially (like gdb_factory's multiple check + bunsen tagsuffix
> +# cycles). No dedicated container; reuse fedora-latest. Master builders
> +# stay on the ordinary factory until this proves out on try branches.
> +libabigail_euts_env = {
> + 'LD_LIBRARY_PATH': util.Interpolate(
> + '%(prop:builddir)s/euts/lib64:%(prop:builddir)s/euts/lib'),
> + 'PKG_CONFIG_PATH': util.Interpolate(
> + '%(prop:builddir)s/euts/lib64/pkgconfig:%(prop:builddir)s/euts/lib/pkgconfig'),
I am not sure why this is necessary. libabigail has a --with-libdw=
and --with-elf= configure checks. Don't they setup this correctly
already?
> +}
> +# Checkout elfutils first (alwaysUseLatest main), then libabigail, so
> +# got_revision / bunsen source.* remain on the libabigail try commit.
> +libabigail_elfutils_git_step = steps.Git(
> + repourl=elfutils_repourl,
> + workdir='elfutils',
> + branch='main',
> + alwaysUseLatest=True,
> + mode='full', method='fresh',
> + retryFetch=True, retry=(30,3),
> + getDescription={'tags':True, 'always':True},
> + name="git checkout elfutils",
> + haltOnFailure=True)
Should this be a specific (latest, e.g. elfutils-0.196) release tag?
workdir='elfutils'. Good.
> +libabigail_euts_rm_step = steps.ShellCommand(
> + command=["rm", "-rf",
> + util.Interpolate("%(prop:builddir)s/elfutils-build"),
> + util.Interpolate("%(prop:builddir)s/euts")],
> + name="rm -rf elfutils-build euts",
> + haltOnFailure=True)
OK.
> +libabigail_euts_autoreconf_step = steps.ShellCommand(
> + workdir='elfutils',
> + command=["autoreconf", "-f", "-i"],
> + name="elfutils autoreconf", haltOnFailure=True)
You might want to add "-v"? workdir='elfutils'. Good. That is why
you cannot use the generic autoreconf_step (which I now notice also
doesn't have -v).
> +libabigail_euts_configure_step = steps.Configure(
> + workdir='elfutils-build',
> + command=["../elfutils/configure",
> + util.Interpolate("--prefix=%(prop:builddir)s/euts"),
> + "--enable-maintainer-mode",
> + "--enable-thread-safety"],
> + name="elfutils configure", haltOnFailure=True,
> + logfiles={"config.log": "config.log"})
Below for the libabigail configure you use configure_extra. Would that
make sense here too? e.g. --enable-sanitize-address and
--enable-sanitize-undefined if libabigail is configure that way too?
workdir='elfutils-build'. OK.
> +libabigail_euts_make_step = steps.Compile(
> + workdir='elfutils-build',
> + command=addOutputSync.withArgs(["make",
> + util.Interpolate('-j%(prop:ncpus)s')]),
> + name="elfutils make",
> + haltOnFailure=True)
OK. workdir='elfutils-build'.
> +libabigail_euts_install_step = steps.Compile(
> + workdir='elfutils-build',
> + command=["make", "install"],
> + name="elfutils make install",
> + haltOnFailure=True)
OK. workdir='elfutils-build'. Will install under euts.
> +def libabigail_mt_combo_steps(build_name, configure_extra, tagsuffix):
Can the build_name/tagsuffix be shared?
> + """One mt configure/build/check/distcheck/bunsen cycle in a sibling dir."""
> + s = []
> + s.append(steps.ShellCommand(
> + command=["rm", "-rf",
> + util.Interpolate("%(prop:builddir)s/" + build_name)],
> + name="rm -rf " + build_name,
> + haltOnFailure=True))
OK. This is done serially and the bunsen upload should already have been done.
> + configure_cmd = ["../build/configure",
> + util.Interpolate("--with-libdw=%(prop:builddir)s/euts"),
> + util.Interpolate("--with-elf=%(prop:builddir)s/euts"),
> + "--enable-multithreading"] + list(configure_extra)
OK. Adds --with-libdw= and --with-elf= and enables multithreading.
> + distcheck_flags = util.Interpolate(
> + "DISTCHECK_CONFIGURE_FLAGS="
> + "--with-libdw=%(prop:builddir)s/euts "
> + "--with-elf=%(prop:builddir)s/euts "
> + "--enable-multithreading"
> + + ((" " + " ".join(configure_extra)) if configure_extra else ""))
OK. Same for DISTCHECK_CONFIGURE_FLAGS.
> + s.append(steps.Configure(
> + workdir=build_name,
> + command=configure_cmd,
> + env=libabigail_euts_env,
> + name="configure " + build_name, haltOnFailure=True,
> + logfiles={"config.log": "config.log"}))
So question why both the env and the --with... configure flags are
needed here.
> + # distcheck's test-suite.log lives under $name-$version/_build/...;
> + # grep after each configure so combos stay independent of order.
> + s.append(steps.SetPropertyFromCommand(
> + workdir=build_name,
> + name="get version " + build_name,
> + command='grep PACKAGE_VERSION config.h | cut -f2 -d\\"',
> + property="package_version"))
There is an generic getversion_step defined. Could that be used here?
> + s.append(steps.Compile(
> + workdir=build_name,
> + command=addOutputSync.withArgs(["make",
> + util.Interpolate('-j%(prop:ncpus)s')]),
> + env=libabigail_euts_env,
> + name="make " + build_name,
> + haltOnFailure=True))
Is the env really needed?
> + s.append(steps.Test(
> + workdir=build_name,
> + command=addOutputSync.withArgs(
> + ["make", "check", "check-self-compare",
> + util.Interpolate('-j%(prop:ncpus)s')]),
> + env=libabigail_euts_env,
> + name="make check " + build_name,
> + haltOnFailure=False, flunkOnFailure=True,
> + logfiles={"test-suite.log": "tests/test-suite.log"}))
Same question.
> + s.append(steps.Test(
> + workdir=build_name,
> + command=addOutputSync.withArgs(
> + ["make", "distcheck-fast", distcheck_flags,
> + util.Interpolate('-j%(prop:ncpus)s')]),
> + env=libabigail_euts_env,
> + name="make distcheck " + build_name,
> + haltOnFailure=False, flunkOnFailure=True,
> + timeout=3600,
> + logfiles={"test-suite.log": util.Interpolate(
> + '%(prop:package_name)s-%(prop:package_version)s/'
> + '_build/sub/tests/test-suite.log')}))
Both Test steps have haltOnFailure=False, flunkOnFailure=True. Good.
Same question about the env. Isn't that what the configure arguments
setup? Nice capture of test-suite.log.
> + s.extend(bunsen_logfile_upload_cpio_steps(
> + ["*.trs", "*.log"],
> + workdir=build_name,
> + tagsuffix=tagsuffix))
So here, might it make sense to use build_name as tagsuffix?
> + # Drop the whole sibling build dir (includes any distcheck extract).
> + s.append(steps.ShellCommand(
> + command=["rm", "-rf",
> + util.Interpolate("%(prop:builddir)s/" + build_name)],
> + name="rm -rf " + build_name + " after bunsen",
> + haltOnFailure=False))
> + return s
Good cleanup.
> +libabigail_mt_factory = util.BuildFactory()
> +libabigail_mt_factory.addStep(libabigail_package_name_step)
> +libabigail_mt_factory.addStep(libabigail_elfutils_git_step)
> +libabigail_mt_factory.addStep(libabigail_git_step)
> +libabigail_mt_factory.addStep(libabigail_euts_rm_step)
> +libabigail_mt_factory.addStep(libabigail_euts_autoreconf_step)
> +libabigail_mt_factory.addStep(libabigail_euts_configure_step)
> +libabigail_mt_factory.addStep(libabigail_euts_make_step)
> +libabigail_mt_factory.addStep(libabigail_euts_install_step)
> +libabigail_mt_factory.addStep(autoreconf_step)
> +libabigail_mt_factory.addSteps(libabigail_mt_combo_steps(
> + "build-mt", [], "/mt"))
> +libabigail_mt_factory.addSteps(libabigail_mt_combo_steps(
> + "build-mtasan", ["--enable-asan"], "/mtasan"))
> +libabigail_mt_factory.addSteps(libabigail_mt_combo_steps(
> + "build-mttsan", ["--enable-tsan"], "/mttsan"))
> +libabigail_mt_factory.addStep(libabigail_euts_rm_step)
OK.
> +# Try-only multithreading builder: sibling thread-safe elfutils + sequential
> +# mt / mtasan / mttsan combos. Ordinary try-fedora-x86_64 is unchanged.
> +libabigail_try_fedora_x86_64_mt_builder = util.BuilderConfig(
> + name="libabigail-try-fedora-x86_64-mt",
> + collapseRequests=True,
> + properties={'container-file':
> + readContainerFile('fedora-latest')},
> + workernames=vm_workers,
> + tags=["libabigail-try", "fedora", "x86_64", "multithreading"],
> + factory=libabigail_mt_factory)
> +c['builders'].append(libabigail_try_fedora_x86_64_mt_builder)
> +
OK.
Thanks,
Mark
More information about the Buildbot
mailing list