Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Apr 2013 21:21:02 -0500
From:      Brooks Davis <brooks@FreeBSD.org>
To:        Jeremy Chadwick <jdc@koitsu.org>
Cc:        svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org
Subject:   Re: svn commit: r249549 - in stable/9/sys: amd64/conf i386/conf
Message-ID:  <20130418022102.GB31612@lor.one-eyed-alien.net>
In-Reply-To: <20130417225603.GA13720@icarus.home.lan>
References:  <201304161609.r3GG9SID009937@svn.freebsd.org> <20130416161919.GA80626@icarus.home.lan> <20130417125433.GC30222@caravan.chchile.org> <20130417193538.GB9331@icarus.home.lan> <20130417194706.GA30583@lor.one-eyed-alien.net> <20130417225603.GA13720@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help

--u3/rZRmxL6MmkK24
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Apr 17, 2013 at 03:56:03PM -0700, Jeremy Chadwick wrote:
> On Wed, Apr 17, 2013 at 02:47:06PM -0500, Brooks Davis wrote:
> > On Wed, Apr 17, 2013 at 12:35:38PM -0700, Jeremy Chadwick wrote:
> > > On Wed, Apr 17, 2013 at 02:54:33PM +0200, Jeremie Le Hen wrote:
> > > > Hi Jeremy,
> > > >=20
> > > > On Tue, Apr 16, 2013 at 09:19:19AM -0700, Jeremy Chadwick wrote:
> > > > >=20
> > > > > Now that this has been enabled by default, I should warn folks of=
 a
> > > > > caveat that I found in the buildworld/buildkernel framework.  It's
> > > > > easiest to explain like this:
> > > > >=20
> > > > > 1. Install FreeBSD 9.x, svn checkout of stable/9, etc...
> > > > > 2. Add WITHOUT_CDDL=3Dtrue to /etc/src.conf
> > > > > 3. Rebuild + install kernel/world per src/Makefile procedure
> > > > > 4. Remove WITHOUT_CDDL=3Dtrue from /etc/src.conf
> > > > > 5. rm -fr /usr/obj/*
> > > > > 6. Rebuild world
> > > > > 7. Rebuild kernel -- fails, stating "ctfconvert: not found".
> > > > >=20
> > > > > For whatever reason the buildkernel bits make the assumption that
> > > > > ctfconvert exists on the system (presumably in $PATH or possibly a
> > > > > hard-coded), when ideally it should try to use the recently-built
> > > > > version in /usr/obj first.
> > > >=20
> > > > I've tested this is a freshly installed 9.1-RELEASE jail and I have=
n't
> > > > been biten by the bug you describe.
> > > >=20
> > > > ctfconvert(1) seems to be installed by default in 9.1-RELEASE, this=
 is
> > > > probably there problem didn't occur.  I can easily verify this in t=
he
> > > > jail:
> > > >=20
> > > > % root@test9:/usr/src # ls -l /usr/bin/ctfconvert /usr/bin/vi /usr/=
bin/tail=20
> > > > % -r-xr-xr-x  1 root  wheel  371536 Dec  4 09:33 /usr/bin/ctfconvert
> > > > % -r-xr-xr-x  1 root  wheel   19848 Apr 17 06:28 /usr/bin/tail
> > > > % -r-xr-xr-x  6 root  wheel  346432 Apr 17 06:28 /usr/bin/vi
> > > >=20
> > > >=20
> > > > Do you have a theory about why you've got the problem while I haven=
't?
> > > > FYI, it seems 9.0-RELEASE also has ctfconvert(1):
> > > > http://svnweb.freebsd.org/base/release/9.0.0/cddl/usr.bin/ctfconver=
t/
> > > >=20
> > > > My guess is tha this might happen if you don't have /usr/bin/ctfcon=
vert.
> > > > I've just removed it and trying to build kernel again.
> > >=20
> > > I will spend some time to figure out exactly how to reproduce this.
> > >=20
> > > Going from recent memory (~2 weeks ago), I encountered it on my VPS b=
ox
> > > (which does run ntpd, just FYI):
> > >=20
> > > 1. Initially installed with 9.1-RELEASE,
> > > 2. Upgraded to stable/9 (using svn),
> > > 3. WITHOUT_CDDL=3Dtrue and WITHOUT_ZFS=3Dtrue added to /etc/src.conf
> > > 4. world/kernel rebuilt/reinstalled/etc. (this includes make delete-o=
ld,
> > >    as per instructions in src/Makefile -- which would delete
> > >    /usr/bin/ctfconvert)
> > > 5. Fast forward many months
> > > 6. Removed WITHOUT_CDDL=3Dtrue from src.conf
> > > 7. Encountered the above issue ("ctfconvert: not found") during
> > >    buildkernel
> > > 8. Rebuilt kernel again -- same error
> > > 9. Removed WITHOUT_ZFS=3Dtrue from src.conf
> > > 10. Rebuilt kernel again -- worked
> > >=20
> > > This could mean WITHOUT_ZFS=3Dtrue has some bearing on this situation=
, but
> > > I don't see how/why, as WITHOUT_CDDL is supposed to be the "trigger" =
for
> > > ctf* utilities.  I did poke around the Makefiles and framework a bit
> > > but didn't have any epiphanies.
> > >=20
> > > Like I said -- I'll try to reproduce the exact scenario.
> >=20
> > Looking at Makefile.inc1 around line 1164 (on HEAD), ctfconvert and
> > cftmerge are bootstrap tools only when they don't exist at all on the
> > host.  The code there should be expanded to bootstrap for cases where
> > the installed ones are known to be broken (virtually all prior versions
> > given recent fixes) as well as when they aren't present on the host
> > system.
>=20
> I'm able to reproduce the issue I speak of with 100% reliability.
> Jeremie, I'm not sure why you're not able to reproduce this, because I
> can do so reliably/consistently.

The following patch will probably fix the problem.

Index: Makefile.inc1
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- Makefile.inc1       (revision 249590)
+++ Makefile.inc1       (working copy)
@@ -1114,9 +1114,7 @@
	usr.bin/clang/clang-tblgen
 .endif
=20
-.if ${MK_CDDL} !=3D "no" && \
-    ${BOOTSTRAPPING} < 800038 && \
-    !(${BOOTSTRAPPING} >=3D 700112 && ${BOOTSTRAPPING} < 799999)
+.if ${MK_CDDL} !=3D "no"
 _dtrace_tools=3D cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
     lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
 .endif

This patch unconditionally bootstraps ctfconvert and ctfmerge unless
WITHOUT_CDDL is set.

>=20
> 10. Verification of everything at this point -- ctf* utilities are
> clearly in /usr/obj, but are not in /usr/bin (because of delete-old):
>=20
> root@testbox:/usr/src # find /usr/obj -name "ctf*" -type f -perm 0755 -ls
> 1783448      728 -rwxr-xr-x    1 root             wheel              3717=
38 Apr 17 15:29 /usr/obj/usr/src/cddl/usr.bin/ctfconvert/ctfconvert
> 1783453       64 -rwxr-xr-x    1 root             wheel               287=
06 Apr 17 15:29 /usr/obj/usr/src/cddl/usr.bin/ctfdump/ctfdump
> 1783472      168 -rwxr-xr-x    1 root             wheel               827=
11 Apr 17 15:29 /usr/obj/usr/src/cddl/usr.bin/ctfmerge/ctfmerge
> root@testbox:/usr/src # find /usr/bin -name "ctf*" -type f -perm 0755 -ls
> root@testbox:/usr/src #

The presence of these files is irrelevent.  The files we use for
bootstrapping or cross compiling live under /usr/obj/usr/src/tmp or
equivalent.

-- Brooks

--u3/rZRmxL6MmkK24
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iD8DBQFRb1iOXY6L6fI4GtQRArR3AJ0fUQmpj7QiJbTGiOfpEkYd9iokEwCfU+N/
Rjf2AMp0L1UdwBmUNFsfqyc=
=Veam
-----END PGP SIGNATURE-----

--u3/rZRmxL6MmkK24--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130418022102.GB31612>