ACK: [SRU][R][PATCH 1/1] UBUNTU: SAUCE: [Packaging] Serialise dtbs_install to work around uutils install(1) race

Mehmet Basaran mehmet.basaran at canonical.com
Thu Sep 3 15:08:42 UTC 2026


Acked-by: Mehmet Basaran <mehmet.basaran at canonical.com>

-------------- next part --------------
Edoardo Canepa via kernel-team <kernel-team at lists.ubuntu.com> writes:

> BugLink: https://bugs.launchpad.net/bugs/2166356
>
> Ubuntu 26.04 "Resolute" ships rust-coreutils as the default provider of
> /usr/bin/install, and uutils' `install -D` has an unfixed race where
> concurrent invocations sharing a parent directory can both see
> NotFound from stat_at() before either issues mkdir_at(); the loser
> then gets EEXIST and uutils reports it as
> "install: cannot create directory ...", exiting non-zero.
>
> This trips scripts/Makefile.dtbinst on parallel kernel builds. Its
> per-file recipe is:
>
>     quiet_cmd_dtb_install = INSTALL $@
>           cmd_dtb_install = install -D -m 0644 $< $@
>
> Under `-j`, all .dtb files inside a directory (device-tree/apple/,
> device-tree/nuvoton/, etc.) run their own `install -D` concurrently
> and race on creating the parent directory.  Observed on Launchpad
> builders for linux 7.0.0-37.37:
>
>     INSTALL .../device-tree/nuvoton/ma35d1-iot-512m.dtb
>     INSTALL .../device-tree/nuvoton/ma35d1-som-256m.dtb
>     INSTALL .../device-tree/nuvoton/nuvoton-npcm845-evb.dtb
>     install: cannot create directory '.../device-tree/nuvoton'
>     make[4]: *** [scripts/Makefile.dtbinst:23: .../nuvoton/ma35d1-iot-512m.dtb] Error 1
>
> Upstream uutils tracking:
>
>     uutils/coreutils#12355 install -D loses some files to EEXIST
>     uutils/coreutils#12429 install: fix EEXIST race losing files in parallel install -D
>
> PR #12429 is open but not yet merged into uutils main, and no fix has
> propagated into rust-coreutils on Resolute.
>
> Neither `INSTALL=` override nor a kernel-side patch is trivially
> available here: scripts/Makefile.dtbinst hardcodes literal `install`
> (no $(INSTALL) variable is defined anywhere in the tree), and Resolute
> ships no GNU install binary to point at even if the recipe were
> parametric.
>
> Work around the race by forcing -j1 for just the dtbs_install
> sub-make.  The other build steps ($(bldimg), modules, headers_install,
> modules_install) keep full parallelism.  The impact is a few seconds
> on affected arches (arm64, armhf) because dtbs_install is I/O-bound
> and short even single-threaded.
>
> Revert this once uutils PR #12429 is merged and lands in Resolute's
> rust-coreutils.
>
> Signed-off-by: Edoardo Canepa <edoardo.canepa at canonical.com>
> ---
>  debian/rules.d/2-binary-arch.mk | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index a249f782bca8..c51730c63e0e 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -179,7 +179,12 @@ endif
>  		$(pkgdir)/boot/System.map-$(abi_release)-$*
>
>  ifeq ($(do_dtbs),true)
> -	$(kmake) O=$(build_dir) $(conc_level) dtbs_install \
> +	# Force -j1: rust-coreutils' install(1) has an unfixed EEXIST race in
> +	# `install -D` when parallel invocations share a parent directory,
> +	# breaking dtbs_install on Resolute Launchpad builders (e.g. inside
> +	# device-tree/apple/, device-tree/nuvoton/).  See uutils/coreutils
> +	# #12355 and PR #12429.  Restore $(conc_level) once that fix ships.
> +	$(kmake) O=$(build_dir) -j1 dtbs_install \
>  		INSTALL_DTBS_PATH=$(pkgdir)/usr/lib/firmware/$(abi_release)-$*/device-tree
>  endif
>
> --
> 2.53.0
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 873 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20260903/72fd3642/attachment.sig>


More information about the kernel-team mailing list