Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Oct 2024 08:54:52 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Dan Mack <mack@macktronics.com>
Cc:        dsdqmzk@hotmail.com, freebsd-current@freebsd.org
Subject:   Re: FYI: make's "max_jobs" needs to be separated from -j (now?)
Message-ID:  <CANCZdfpnwfsyuRH0p_xFfh5XdUZsLRtex_K%2Bs=DsJDux8t-1wg@mail.gmail.com>
In-Reply-To: <0db2d927-3299-2c0f-2310-d8e386fb31c6@macktronics.com>
References:  <Zv0uSUVsyhRtMS27@albert.catwhisker.org> <SEYPR02MB5821CB9C62B92369962FCAABB1702@SEYPR02MB5821.apcprd02.prod.outlook.com> <cdfa00de-5640-8f09-d501-9fce87072d0d@macktronics.com> <SEYPR02MB58216CE43D7E3BC4841B5980B1702@SEYPR02MB5821.apcprd02.prod.outlook.com> <0db2d927-3299-2c0f-2310-d8e386fb31c6@macktronics.com>

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

On Wed, Oct 2, 2024 at 8:42=E2=80=AFAM Dan Mack <mack@macktronics.com> wrot=
e:

> On Wed, 2 Oct 2024, dsdqmzk@hotmail.com wrote:
>
> > Dan Mack wrote:
> >> On Wed, 2 Oct 2024, dsdqmzk@hotmail.com wrote:
> >>
> >>> David Wolfskill wrote:
> >>>> I have been tracking stable/ and head (daily, with a few exceptions)
> for
> >>>> many years, now.  Over time, I set up a set of ([t]csh) aliases to
> >>>> simplify the exercise for me.
> >>>>
> >>>> Until yesterday, the "make -j${max_jobs} buildworld" construct had
> >>>> worked without issue, but (yesterday), the invocation failed quite
> >>>> quickly:
> >>>>
> >>>> | Tue Oct  1 11:54:18 UTC 2024
> >>>> | --- buildworld ---
> >>>> | make[1]: "/usr/src/Makefile.inc1" line 362: SYSTEM_COMPILER:
> >>>> Determined that CC=3Dcc matches the source tree.  Not bootstrapping =
a
> >>>> cross-compiler.
> >>>> | make[1]: "/usr/src/Makefile.inc1" line 367: SYSTEM_LINKER:
> >>>> Determined that LD=3Dld matches the source tree.  Not bootstrapping =
a
> >>>> cross-linker.
> >>>> | --------------------------------------------------------------
> >>>> | >>> World build started on Tue Oct  1 11:54:18 UTC 2024
> >>>> | --------------------------------------------------------------
> >>>> | >>> Deleting stale files in build tree...
> >>>> |         0.14 real         0.23 user         0.10 sys
> >>>> | *** [_cleanworldtmp] Error code 6
> >>>> |
> >>>> | make[1]: stopped making "buildworld" in /usr/src
> >>>> | .ERROR_TARGET=3D'_cleanworldtmp'
> >>>> | .ERROR_META_FILE=3D''
> >>>>
> >>>> On a bit of a whim, I tried adjusting the "max_jobs" values
> (downward),
> >>>> which didn't help, but removing the "-j14" entirely did not produce =
a
> >>>> failure.
> >>>>
> >>>> On the other hand, rebuilding clang/llvm with a single core on a
> laptop
> >>>> (when I actually want to be able to use the laptop later in the day
> >>>> while I'm at work) didn't seem productive.
> >>>>
> >>>> A bit more rather randomly "trying stuff" yielded the result that
> while
> >>>>
> >>>>     make -j14 buildworld
> >>>>
> >>>> failed (as described above),
> >>>>
> >>>>     make -j 14 buildworld
> >>>>
> >>>> carries on as before -- it's building lib/clang (and using multiple
> >>>> cores to do so)....  :-}
> >>>
> >>> Just got the same error, but both invocations didn't work, and I
> noticed
> >>> that bootstrapped version of mtree failed to run because of (now)
> >>> missing libmd.so.6.  I think it's not really related to whitespace
> >>> between -j and jobs number, rather you had to (re)build the bootstrap
> >>> tools.
> >>
> >> I have been building current twice daily for a while and didn't notice
> >> this regression but I do have the space after "-j"
> >>
> >>   #!/bin/sh
> >>    make -j 16 buildworld              > /logs/bw.$$ 2>&1 && \
> >>    make -j 8 kernel KERNCONF=3DGENERIC  > /logs/bk.$$ 2>&1 && \
> >>    sync && reboot
> >
> > Do you also do `make delete-old-libs`?
> >
> >> I grepped all my logs across 3 servers and did not see a single instan=
ce
> >> of [_cleanworldtmp] Error code ... in any of the logs.  What was the
> >> hash of the build you were on there, I can try to reproduce it quickly
> >> (but it might only trigger with your builddir state I guess)
> >
> > If I understand the problem correctly, it should be as easy as:
> >
> > 1. build on pre-e7a629c851d system
> > 2. install/reboot
> > 3. make delete-old-libs
> > 4. try to build world/kernel that fail as above, and, I think, make
> > kernel-toolchain was the one failing because mtree failed to run
> > (because of libmd.so.6 gone now)
> >
> > In any case, wiping out /usr/obj solved it for me.
>
> Ack, okay.   I can't trigger it with a fresh or my /usr/obj but in any
> event the error number 6 is probably referring to a path or directory
> missing while doing a parallel build given some input state :-)
>
> #define ENXIO           6               /* Device not configured */
>

ENXIO usually is reserved for hardware errors when a device disappears
for block I/O contexts. So I'm not sure that this theory is so good.

But shell error exit statuses are largely independent of errnos.

Warner

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

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Wed, Oct 2, 2024 at 8:42=E2=80=AFA=
M Dan Mack &lt;<a href=3D"mailto:mack@macktronics.com">mack@macktronics.com=
</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">=
On Wed, 2 Oct 2024, <a href=3D"mailto:dsdqmzk@hotmail.com" target=3D"_blank=
">dsdqmzk@hotmail.com</a> wrote:<br>
<br>
&gt; Dan Mack wrote:<br>
&gt;&gt; On Wed, 2 Oct 2024, <a href=3D"mailto:dsdqmzk@hotmail.com" target=
=3D"_blank">dsdqmzk@hotmail.com</a> wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; David Wolfskill wrote:<br>
&gt;&gt;&gt;&gt; I have been tracking stable/ and head (daily, with a few e=
xceptions) for<br>
&gt;&gt;&gt;&gt; many years, now.=C2=A0 Over time, I set up a set of ([t]cs=
h) aliases to<br>
&gt;&gt;&gt;&gt; simplify the exercise for me.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Until yesterday, the &quot;make -j${max_jobs} buildworld&q=
uot; construct had<br>
&gt;&gt;&gt;&gt; worked without issue, but (yesterday), the invocation fail=
ed quite<br>
&gt;&gt;&gt;&gt; quickly:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; | Tue Oct=C2=A0 1 11:54:18 UTC 2024<br>
&gt;&gt;&gt;&gt; | --- buildworld ---<br>
&gt;&gt;&gt;&gt; | make[1]: &quot;/usr/src/Makefile.inc1&quot; line 362: SY=
STEM_COMPILER:<br>
&gt;&gt;&gt;&gt; Determined that CC=3Dcc matches the source tree.=C2=A0 Not=
 bootstrapping a<br>
&gt;&gt;&gt;&gt; cross-compiler.<br>
&gt;&gt;&gt;&gt; | make[1]: &quot;/usr/src/Makefile.inc1&quot; line 367: SY=
STEM_LINKER:<br>
&gt;&gt;&gt;&gt; Determined that LD=3Dld matches the source tree.=C2=A0 Not=
 bootstrapping a<br>
&gt;&gt;&gt;&gt; cross-linker.<br>
&gt;&gt;&gt;&gt; | --------------------------------------------------------=
------<br>
&gt;&gt;&gt;&gt; | &gt;&gt;&gt; World build started on Tue Oct=C2=A0 1 11:5=
4:18 UTC 2024<br>
&gt;&gt;&gt;&gt; | --------------------------------------------------------=
------<br>
&gt;&gt;&gt;&gt; | &gt;&gt;&gt; Deleting stale files in build tree...<br>
&gt;&gt;&gt;&gt; |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0.14 rea=
l=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0.23 user=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0.10 sys<br>
&gt;&gt;&gt;&gt; | *** [_cleanworldtmp] Error code 6<br>
&gt;&gt;&gt;&gt; |<br>
&gt;&gt;&gt;&gt; | make[1]: stopped making &quot;buildworld&quot; in /usr/s=
rc<br>
&gt;&gt;&gt;&gt; | .ERROR_TARGET=3D&#39;_cleanworldtmp&#39;<br>
&gt;&gt;&gt;&gt; | .ERROR_META_FILE=3D&#39;&#39;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On a bit of a whim, I tried adjusting the &quot;max_jobs&q=
uot; values (downward),<br>
&gt;&gt;&gt;&gt; which didn&#39;t help, but removing the &quot;-j14&quot; e=
ntirely did not produce a<br>
&gt;&gt;&gt;&gt; failure.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On the other hand, rebuilding clang/llvm with a single cor=
e on a laptop<br>
&gt;&gt;&gt;&gt; (when I actually want to be able to use the laptop later i=
n the day<br>
&gt;&gt;&gt;&gt; while I&#39;m at work) didn&#39;t seem productive.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; A bit more rather randomly &quot;trying stuff&quot; yielde=
d the result that while<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; =C2=A0=C2=A0=C2=A0=C2=A0make -j14 buildworld<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; failed (as described above),<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; =C2=A0=C2=A0=C2=A0=C2=A0make -j 14 buildworld<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; carries on as before -- it&#39;s building lib/clang (and u=
sing multiple<br>
&gt;&gt;&gt;&gt; cores to do so)....=C2=A0 :-}<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Just got the same error, but both invocations didn&#39;t work,=
 and I noticed<br>
&gt;&gt;&gt; that bootstrapped version of mtree failed to run because of (n=
ow)<br>
&gt;&gt;&gt; missing libmd.so.6.=C2=A0 I think it&#39;s not really related =
to whitespace<br>
&gt;&gt;&gt; between -j and jobs number, rather you had to (re)build the bo=
otstrap<br>
&gt;&gt;&gt; tools.<br>
&gt;&gt;<br>
&gt;&gt; I have been building current twice daily for a while and didn&#39;=
t notice<br>
&gt;&gt; this regression but I do have the space after &quot;-j&quot;<br>
&gt;&gt;<br>
&gt;&gt; =C2=A0 #!/bin/sh<br>
&gt;&gt; =C2=A0=C2=A0 make -j 16 buildworld=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &gt; /logs/bw.$$ 2&gt;&amp=
;1 &amp;&amp; \<br>
&gt;&gt; =C2=A0=C2=A0 make -j 8 kernel KERNCONF=3DGENERIC=C2=A0 &gt; /logs/=
bk.$$ 2&gt;&amp;1 &amp;&amp; \<br>
&gt;&gt; =C2=A0=C2=A0 sync &amp;&amp; reboot<br>
&gt;<br>
&gt; Do you also do `make delete-old-libs`?<br>
&gt;<br>
&gt;&gt; I grepped all my logs across 3 servers and did not see a single in=
stance<br>
&gt;&gt; of [_cleanworldtmp] Error code ... in any of the logs.=C2=A0 What =
was the<br>
&gt;&gt; hash of the build you were on there, I can try to reproduce it qui=
ckly<br>
&gt;&gt; (but it might only trigger with your builddir state I guess)<br>
&gt;<br>
&gt; If I understand the problem correctly, it should be as easy as:<br>
&gt;<br>
&gt; 1. build on pre-e7a629c851d system<br>
&gt; 2. install/reboot<br>
&gt; 3. make delete-old-libs<br>
&gt; 4. try to build world/kernel that fail as above, and, I think, make<br=
>
&gt; kernel-toolchain was the one failing because mtree failed to run<br>
&gt; (because of libmd.so.6 gone now)<br>
&gt;<br>
&gt; In any case, wiping out /usr/obj solved it for me.<br>
<br>
Ack, okay.=C2=A0 =C2=A0I can&#39;t trigger it with a fresh or my /usr/obj b=
ut in any <br>
event the error number 6 is probably referring to a path or directory <br>
missing while doing a parallel build given some input state :-)<br>
<br>
#define ENXIO=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A06=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Device not configured */<br></blockqu=
ote><div><br></div><div>ENXIO usually is reserved for hardware errors when =
a device disappears</div><div>for block I/O contexts. So I&#39;m not sure t=
hat this theory is so good.</div><div><br></div><div>But shell error exit s=
tatuses are largely independent of errnos.</div><div><br></div><div>Warner<=
/div></div></div>

--0000000000008177f606237f9f5d--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpnwfsyuRH0p_xFfh5XdUZsLRtex_K%2Bs=DsJDux8t-1wg>