From nobody Tue Sep 16 22:04:11 2025 X-Original-To: java@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cRGC111VNz6892f for ; Tue, 16 Sep 2025 22:04:13 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp-relay-int-backup.realworks.nl (smtp-relay-int-backup.realworks.nl [87.255.56.188]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cRGC05pP5z3gDH for ; Tue, 16 Sep 2025 22:04:12 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Authentication-Results: mx1.freebsd.org; none Received: from smtp-relay-int-backup.realworks.nl (crmlive9.colo2.realworks.nl [10.2.52.29]) by mailrelayint1.colo2.realworks.nl (Postfix) with ESMTP id 4cRGBz4VtPzQr; Wed, 17 Sep 2025 00:04:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1758060251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SP4WENf7RO7AJ43PgB/XvB8R8IA5A+Zg/XEZCzBsh2Y=; b=hGH5zcZw43SMBr+KewfwkZWNoWI3fy6/ItWIrsTsds8+aeSHjvHpDEzNPmHN9Pd04XbI3r g9rE7dxEPMdCce4f49EMoEqzuyybiAFuEBk5B7wpCCykuyO6Dz+vuKge2Scd5LG7hZ33we 6QuCHehoH9Z6lhbzhhmvci8e7jz4yrqEizgP2QMips1ZJAlNJrUTJIoGMrTe5+tlz2T3Tl Q3FI+PL8CXTt0S6P9y9soyg6TFBIWZya/X+zciKDep+I2CZzN1bdd3rJdIjTgUcnnsANCe WJ89b57RwIZpdjm8tpz/+Jd2O6ImCjrQuN1XF1xjiyh/cxFIiZqvlw/a+UcVIg== Received: from crmlive9.colo2.realworks.nl (localhost [127.0.0.1]) by crmlive9.colo2.realworks.nl (Postfix) with ESMTP id 867C02C0347; Wed, 17 Sep 2025 00:04:11 +0200 (CEST) Date: Wed, 17 Sep 2025 00:04:11 +0200 (CEST) From: Ronald Klop To: Ronald Klop Cc: Harald Eilertsen , java@freebsd.org Message-ID: <883854905.286987.1758060251528@localhost> In-Reply-To: <1457853127.243778.1758058293681@localhost> References: <1221594030.658.1756976173189@localhost> <1330428831.1750.1756980558066@localhost> <2053927433.1876.1757575928041@localhost> <387357483.2815.1757924099539@localhost> <1457853127.243778.1758058293681@localhost> Subject: Re: (solved, I think) Re: openjdk build failures on "nm" List-Id: Porting Java to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-java List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-java@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_286986_1345640237.1758060251504" X-Mailer: Realworks (764.61) X-Originating-Host: from (83-81-212-149.cable.dynamic.v4.ziggo.nl [83.81.212.149]) by crmlive9 [10.2.52.29] with HTTP; Wed, 17 Sep 2025 00:04:11 +0200 Importance: Normal X-Priority: 3 (Normal) X-Originating-User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:143.0) Gecko/20100101 Firefox/143.0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:38930, ipnet:87.255.32.0/19, country:NL] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cRGC05pP5z3gDH ------=_Part_286986_1345640237.1758060251504 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Van: Ronald Klop Datum: dinsdag, 16 september 2025 23:31 Aan: Harald Eilertsen CC: java@freebsd.org Onderwerp: Re: (solved, I think) Re: openjdk build failures on "nm" > > > Van: Harald Eilertsen > Datum: dinsdag, 16 september 2025 13:33 > Aan: Ronald Klop > CC: java@freebsd.org > Onderwerp: Re: (solved, I think) Re: openjdk build failures on "nm" >> >> Hi Ronald, >> >> On Mon, Sep 15, 2025 at 10:14:59AM +0200, Ronald Klop wrote: >> > The current construction in openjdk17 handles MAKE_JOBS_NUMBER >> > properly. And with that also the MAKE_JOBS_UNSAFE variable. After more >> > testing we can use this blueprint in other openjdk ports. >> > Also in openjdk23 and -24. They don't have flapping builds but can >> > improve handling of MAKE_JOBS_NUMBER. >> >> Nice finds! I don't really have a strong opinion either way, but think >> it should probably be selectable whether to use (and how many) parallel >> jobs to run. I'm curious if there has been problems with this number of >> parallel jobs for other platforms as well. I'll try to ask around a bit. >> >> The OpenJDK build process does, as you say, determine how many jobs to >> spawn on it's own, based on available CPU cores and memory. Having the >> port Makefile trying to parallelize that further would get in the way of >> this, so we set MAKE_JOBS_UNSAFE to prevent it. As I understand it, this >> should not prevent the OpenJDK build system to spawn parallel jobs. >> >> In addition to setting the --with-jobs config parameter, it's possible >> to tune this with the --with-num-cores and --with-memory-size to limit >> the number of jobs to not occupy the whole capacity of the machine. >> >> It would be interesting to know if there's any difference if we clamp >> number of cores it's allowed to use to f.ex. 16 or something. >> >> Will you be at EuroBSDCon or the FreeBSD dev summit? Could be >> interesting to dig into these things a bit there with some of the >> experts on the port system available too. >> >> Take care! >> Harald >> >> >> > > > Hi Harald, > > Thanks for the tip. > I just found the documentation of --with-num-cores in doc/building.md. I think that is what we need. It makes it possible to set an upper limit on the number of parallel jobs and lets configure still calculate the balance with the amount of memory available. > > I'm curious what the pkg build cluster does tomorrow morning. This morning the relevant pkg builds (like 142amd64-default) crashed before any pkg was build. > > Unfortunately I'm not at EuroBSDCon this year. I have been there in previous editions. Lots of fun > > Regards, > Ronald. > BTW, in the future we can add something like 'LOG=info,cmdlines' to MAKE_ENV in the ports Makefile. This displays more information during the build which might show us what is going wrong. But, let's first get a stable build on the short term. Regards, Ronald. ------=_Part_286986_1345640237.1758060251504 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

Van: Ronald Klop <ronald-lists@klop.ws>
Datum: dinsdag, 16 september 2025 23:31
Aan: Harald Eilertsen <haraldei@anduin.net>
CC: java@freebsd.org
Onderwerp: Re: (solved, I think) Re: openjdk build failures on "nm"

 

Van: Harald Eilertsen <haraldei@anduin.net>
Datum: dinsdag, 16 september 2025 13:33
Aan: Ronald Klop <ronald-lists@klop.ws>
CC: java@freebsd.org
Onderwerp: Re: (solved, I think) Re: openjdk build failures on "nm"

Hi Ronald,

On Mon, Sep 15, 2025 at 10:14:59AM +0200, Ronald Klop wrote:
> The current construction in openjdk17 handles MAKE_JOBS_NUMBER
> properly. And with that also the MAKE_JOBS_UNSAFE variable. After more
> testing we can use this blueprint in other openjdk ports.
> Also in openjdk23 and -24. They don't have flapping builds but can
> improve handling of MAKE_JOBS_NUMBER.

Nice finds! I don't really have a strong opinion either way, but think
it should probably be selectable whether to use (and how many) parallel
jobs to run. I'm curious if there has been problems with this number of
parallel jobs for other platforms as well. I'll try to ask around a bit.

The OpenJDK build process does, as you say, determine how many jobs to
spawn on it's own, based on available CPU cores and memory. Having the
port Makefile trying to parallelize that further would get in the way of
this, so we set MAKE_JOBS_UNSAFE to prevent it. As I understand it, this
should not prevent the OpenJDK build system to spawn parallel jobs.

In addition to setting the --with-jobs config parameter, it's possible
to tune this with the --with-num-cores and --with-memory-size to limit
the number of jobs to not occupy the whole capacity of the machine.

It would be interesting to know if there's any difference if we clamp
number of cores it's allowed to use to f.ex. 16 or something.

Will you be at EuroBSDCon or the FreeBSD dev summit? Could be
interesting to dig into these things a bit there with some of the
experts on the port system available too.

Take care!
Harald



Hi Harald,

Thanks for the tip.
I just found the documentation of --with-num-cores in doc/building.md. I think that is what we need. It makes it possible to set an upper limit on the number of parallel jobs and lets configure still calculate the balance with the amount of memory available.

I'm curious what the pkg build cluster does tomorrow morning. This morning the relevant pkg builds (like 142amd64-default) crashed before any pkg was build.

Unfortunately I'm not at EuroBSDCon this year. I have been there in previous editions. Lots of fun

Regards,
Ronald.
 


BTW, in the future we can add something like 'LOG=info,cmdlines' to MAKE_ENV in the ports Makefile. This displays more information during the build which might show us what is going wrong.

But, let's first get a stable build on the short term.

Regards,
Ronald.
  ------=_Part_286986_1345640237.1758060251504--