Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jun 2025 06:38:17 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= <olivier@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org
Subject:   Re: git: 5c1ba994a8bc - main - Add a regression test for a libtpool bug
Message-ID:  <CAOtMX2h%2BhKnDvTjX8ZW0Z%2BEAMU-zm4XWxWfrfVqSoCBfiru_dQ@mail.gmail.com>
In-Reply-To: <CA%2Bq%2BTcriXQzqGFZH0hWtqyPZGrhO2RPCrXr%2ByhkqCJGznzOJQA@mail.gmail.com>
References:  <202506151602.55FG2SHe047772@gitrepo.freebsd.org> <CA%2Bq%2BTcriXQzqGFZH0hWtqyPZGrhO2RPCrXr%2ByhkqCJGznzOJQA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000c9131f063878d69d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Wed, Jun 25, 2025 at 11:54=E2=80=AFPM Olivier Cochard-Labb=C3=A9 <olivie=
r@freebsd.org>
wrote:

> Hi Alan,
>
>
> On Sun, Jun 15, 2025 at 6:02=E2=80=AFPM Alan Somers <asomers@freebsd.org>=
 wrote:
>
>> The branch main has been updated by asomers:
>>
>> URL:
>> https://cgit.FreeBSD.org/src/commit/?id=3D5c1ba994a8bcb6676ea3d1bb21b072=
b90e2d3ae9
>>
>> commit 5c1ba994a8bcb6676ea3d1bb21b072b90e2d3ae9
>> Author:     Alan Somers <asomers@FreeBSD.org>
>> AuthorDate: 2024-05-07 17:48:33 +0000
>> Commit:     Alan Somers <asomers@FreeBSD.org>
>> CommitDate: 2025-06-15 16:01:37 +0000
>>
>>     Add a regression test for a libtpool bug
>>
>>
>>
> It seems this commit is the cause of preventing all my (freshly installed=
)
> ZFS systems from booting than stop with:
>
> Mounting local filesystems:.
> ld-elf.so.1: Shared object "libtpool.so.2" not found, required by "zfs"
>
> Because liptpool.so.2 isn=E2=80=99t no more in /lib (belong to the / data=
set), but
> in another dataset (/usr/lib) but it needs to use zfs to mount this one.
>
> Could the added include<src.opts.mk> in its Makefile modified the
> installed directory of libtpool.so.2 ?
>
> Here is the bisect script used:
>
> #!/bin/sh
> set -eu
> WRKDIR=3D/tmp/bisec
> mkdir -p $WRKDIR/lib $WRKDIR/usr/lib $WRKDIR/usr/include
> make -C cddl/lib/libtpool
> make -C cddl/lib/libtpool install DESTDIR=3D$WRKDIR
> if [ -f $WRKDIR/lib/libtpool.so.2 ]; then
>     rm -rf $WRKDIR
>     exit 0
> else
>     rm -rf $WRKDIR
>     exit 1
> fi
>
> And my bisect session pointed me to this commit.
> git bisect start HEAD 9ce5410b9094 --
> git bisect run /tmp/bisec.libtpool.sh
> git bisect reset
>
> Regards,
> Olivier
>

Wow!  That change was definitely not intended.  And I"m very sorry for the
breakage.  Could you please try this patch?

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index cab8949b635b..aa8883cf9b7c 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -51,6 +51,9 @@
 #   xargs -n1 | sort | uniq -d;
 # done

+# 20250626: For 11 days 15.0-CURRENT installed libtpool to the wrong
location
+MOVED_LIBS+=3Dusr/lib/libtpool.so.2
+
 # 20250623: fscandir() renamed to fdscandir()
 OLD_FILES+=3Dusr/share/man/man3/fscandir.3.gz
 OLD_FILES+=3Dusr/share/man/man3/fscandir_b.3.gz
diff --git a/cddl/lib/libtpool/Makefile b/cddl/lib/libtpool/Makefile
index 3ab625dd306b..e14eea509708 100644
--- a/cddl/lib/libtpool/Makefile
+++ b/cddl/lib/libtpool/Makefile
@@ -3,6 +3,7 @@


 LIB=3D   tpool
+SHLIBDIR?=3D      /lib
 LIBADD=3D        spl
 PACKAGE=3D       libzfs

--000000000000c9131f063878d69d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote gmail_quote_container"><div dir=
=3D"ltr" class=3D"gmail_attr">On Wed, Jun 25, 2025 at 11:54=E2=80=AFPM Oliv=
ier Cochard-Labb=C3=A9 &lt;<a href=3D"mailto:olivier@freebsd.org">olivier@f=
reebsd.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div style=3D=
"font-family:&quot;courier new&quot;,monospace">Hi Alan,</div><div style=3D=
"font-family:&quot;courier new&quot;,monospace"><br></div></div><br><div cl=
ass=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Jun 15, 2=
025 at 6:02=E2=80=AFPM Alan Somers &lt;<a href=3D"mailto:asomers@freebsd.or=
g" target=3D"_blank">asomers@freebsd.org</a>&gt; wrote:<br></div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px s=
olid rgb(204,204,204);padding-left:1ex">The branch main has been updated by=
 asomers:<br>
<br>
URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D5c1ba994a8bcb6676=
ea3d1bb21b072b90e2d3ae9" rel=3D"noreferrer" target=3D"_blank">https://cgit.=
FreeBSD.org/src/commit/?id=3D5c1ba994a8bcb6676ea3d1bb21b072b90e2d3ae9</a><b=
r>
<br>
commit 5c1ba994a8bcb6676ea3d1bb21b072b90e2d3ae9<br>
Author:=C2=A0 =C2=A0 =C2=A0Alan Somers &lt;asomers@FreeBSD.org&gt;<br>
AuthorDate: 2024-05-07 17:48:33 +0000<br>
Commit:=C2=A0 =C2=A0 =C2=A0Alan Somers &lt;asomers@FreeBSD.org&gt;<br>
CommitDate: 2025-06-15 16:01:37 +0000<br>
<br>
=C2=A0 =C2=A0 Add a regression test for a libtpool bug<br>
<br><br></blockquote><div><br></div><div style=3D"font-family:&quot;courier=
 new&quot;,monospace">It seems this commit is the cause of preventing all m=
y (freshly installed) ZFS systems from booting than stop with:</div><div st=
yle=3D"font-family:&quot;courier new&quot;,monospace"><br></div><div style=
=3D"font-family:&quot;courier new&quot;,monospace">Mounting local filesyste=
ms:.<br>ld-elf.so.1: Shared object &quot;libtpool.so.2&quot; not found, req=
uired by &quot;zfs&quot;</div><div style=3D"font-family:&quot;courier new&q=
uot;,monospace"><br></div><div style=3D"font-family:&quot;courier new&quot;=
,monospace">Because liptpool.so.2 isn=E2=80=99t no more in /lib (belong to =
the / dataset), but in another dataset (/usr/lib) but it needs to use zfs t=
o mount this one.</div><div style=3D"font-family:&quot;courier new&quot;,mo=
nospace"><br></div><div style=3D"font-family:&quot;courier new&quot;,monosp=
ace">Could the added include&lt;<a href=3D"http://src.opts.mk" target=3D"_b=
lank">src.opts.mk</a>&gt; in its Makefile modified the installed directory =
of=C2=A0libtpool.so.2 ?</div><div style=3D"font-family:&quot;courier new&qu=
ot;,monospace"><br></div><div style=3D"font-family:&quot;courier new&quot;,=
monospace">Here is the bisect script used:</div><div style=3D"font-family:&=
quot;courier new&quot;,monospace"><br>#!/bin/sh<br>set -eu<br>WRKDIR=3D/tmp=
/bisec<br>mkdir -p $WRKDIR/lib $WRKDIR/usr/lib $WRKDIR/usr/include<br>make =
-C cddl/lib/libtpool<br>make -C cddl/lib/libtpool install DESTDIR=3D$WRKDIR=
<br>if [ -f $WRKDIR/lib/libtpool.so.2 ]; then<br>=C2=A0 =C2=A0 rm -rf $WRKD=
IR<br>=C2=A0 =C2=A0 exit 0<br>else<br>=C2=A0 =C2=A0 rm -rf $WRKDIR<br>=C2=
=A0 =C2=A0 exit 1<br>fi</div><div style=3D"font-family:&quot;courier new&qu=
ot;,monospace"><br></div><div style=3D"font-family:&quot;courier new&quot;,=
monospace">And my bisect session pointed me to this commit.</div><div style=
=3D"font-family:&quot;courier new&quot;,monospace">git bisect start HEAD 9c=
e5410b9094 -- <br>git bisect run /tmp/<a href=3D"http://bisec.libtpool.sh" =
target=3D"_blank">bisec.libtpool.sh</a><br>git bisect reset</div><div style=
=3D"font-family:&quot;courier new&quot;,monospace"><br></div><div style=3D"=
font-family:&quot;courier new&quot;,monospace">Regards,</div><div style=3D"=
font-family:&quot;courier new&quot;,monospace">Olivier</div></div></div></d=
iv></blockquote><div><br></div><div>Wow!=C2=A0 That change was definitely n=
ot intended.=C2=A0 And I&quot;m very sorry for the breakage.=C2=A0 Could yo=
u please try this patch?</div><div><br></div><div>diff --git a/ObsoleteFile=
s.inc b/ObsoleteFiles.inc<br>index cab8949b635b..aa8883cf9b7c 100644<br>---=
 a/ObsoleteFiles.inc<br>+++ b/ObsoleteFiles.inc<br>@@ -51,6 +51,9 @@<br>=C2=
=A0# =C2=A0 xargs -n1 | sort | uniq -d;<br>=C2=A0# done<br>=C2=A0<br>+# 202=
50626: For 11 days 15.0-CURRENT installed libtpool to the wrong location<br=
>+MOVED_LIBS+=3Dusr/lib/libtpool.so.2<br>+<br>=C2=A0# 20250623: fscandir() =
renamed to fdscandir()<br>=C2=A0OLD_FILES+=3Dusr/share/man/man3/fscandir.3.=
gz<br>=C2=A0OLD_FILES+=3Dusr/share/man/man3/fscandir_b.3.gz<br>diff --git a=
/cddl/lib/libtpool/Makefile b/cddl/lib/libtpool/Makefile<br>index 3ab625dd3=
06b..e14eea509708 100644<br>--- a/cddl/lib/libtpool/Makefile<br>+++ b/cddl/=
lib/libtpool/Makefile<br>@@ -3,6 +3,7 @@<br>=C2=A0<br>=C2=A0<br>=C2=A0LIB=
=3D =C2=A0 tpool<br>+SHLIBDIR?=3D =C2=A0 =C2=A0 =C2=A0/lib<br>=C2=A0LIBADD=
=3D =C2=A0 =C2=A0 =C2=A0 =C2=A0spl<br>=C2=A0PACKAGE=3D =C2=A0 =C2=A0 =C2=A0=
 libzfs<br><br></div></div></div>

--000000000000c9131f063878d69d--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2h%2BhKnDvTjX8ZW0Z%2BEAMU-zm4XWxWfrfVqSoCBfiru_dQ>