Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FreeBSD hosts to 13 #3593

Closed
targos opened this issue Dec 18, 2023 · 15 comments
Closed

Update FreeBSD hosts to 13 #3593

targos opened this issue Dec 18, 2023 · 15 comments

Comments

@targos
Copy link
Member

targos commented Dec 18, 2023

FreeBSD 12 will be EoL on Dec 31, 2023

V8 updates are blocked because clang is too old.

Refs: #3134
Refs: https://www.freebsd.org/security/#sup

@targos
Copy link
Member Author

targos commented Dec 18, 2023

Note that DigitalOcean don't provide images for FreeBSD anymore so we'll have to upload a custom image to rebuild the droplets

@targos
Copy link
Member Author

targos commented Dec 18, 2023

There are prebuilt images of FreeBSD 13.2 on https://bsd-cloud-image.org/

@targos
Copy link
Member Author

targos commented Dec 18, 2023

@nodejs/platform-freebsd WDYT?

targos added a commit to targos/nodejs-build that referenced this issue Dec 20, 2023
targos added a commit that referenced this issue Dec 21, 2023
nodejs-github-bot pushed a commit to nodejs/node that referenced this issue Dec 22, 2023
Refs: https://www.freebsd.org/security/#sup
Refs: nodejs/build#3593
PR-URL: #51231
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@richardlau
Copy link
Member

richardlau commented Sep 20, 2024

I've uploaded the FreeBSD 13.3 zfs image from https://bsd-cloud-image.org/ to DigitalOcean and was able to create test-digitalocean-freebsd13-x64-1 with it. Just attempted to do a build of main but hit nodejs/node#54576 (clang 17.0.6).

@richardlau
Copy link
Member

The FreeBSD 12 machines are running Java 11 -- Jenkins LTS is planning to drop support for Java 11 in October (#3916).

@richardlau
Copy link
Member

I'm temporarily trying FreeBSD 14.0, but that has an older(!) version of clang than FreeBSD 13.3:

FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin

compared to

FreeBSD clang version 17.0.6 (https://github.com/llvm/llvm-project.git llvmorg-17.0.6-0-g6009708b4367)
Target: x86_64-unknown-freebsd13.3
Thread model: posix
InstalledDir: /usr/bin

(see also https://forums.freebsd.org/threads/freebsd-13-3-release-llvm-and-clang-updated-to-17-0-6.92738/#post-647602 and

@richardlau
Copy link
Member

FWIW FreeBSD 14 (with the older clang 16.0.6) hits the same compilation failure attempting to build main.

@richardlau
Copy link
Member

Trying to update Ansible for FreeBSD 13. Getting this error in the playbook:

TASK [github : write github.com entry in known_hosts] ***********************************************************************************************************************************************************
fatal: [test-digitalocean-freebsd13-x64-1]: FAILED! => {"msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chmod: invalid file mode: A+user:iojs:rx:allow\n}). For information on working around this, see https://docs.ansible.com/ansible-core/2.16/playbook_guide/playbooks_privilege_escalation.html#risks-of-becoming-an-unprivileged-user"}

i.e. #3340. Looking at https://docs.ansible.com/ansible-core/2.16/playbook_guide/playbooks_privilege_escalation.html#risks-of-becoming-an-unprivileged-user:

Although the Solaris ZFS filesystem has filesystem ACLs, the ACLs are not POSIX.1e filesystem acls (they are NFSv4 ACLs instead). Ansible cannot use these ACLs to manage its temp file permissions so you may have to resort to the world_readable_temp option if the remote machines use ZFS.

and indeed setting allow_world_readable_tmpfiles = True appears to work around the issue. But I could only get that to work when set under the defaults section in ansible.cfg (doesn't work when placed under hosts:freebsd) which means it affects all hosts. I might try the UFS FreeBSD image instead of the ZFS one.

@richardlau
Copy link
Member

and indeed setting allow_world_readable_tmpfiles = True appears to work around the issue. But I could only get that to work when set under the defaults section in ansible.cfg (doesn't work when placed under hosts:freebsd) which means it affects all hosts. I might try the UFS FreeBSD image instead of the ZFS one.

UFS image hits the same error. I have found that ansible_shell_allow_world_readable_temp can be set under hosts:freebsd, which appears to work. I'm going to swap the machine back to ZFS, check my Ansible changes still work (with ZFS) and then open the PR to update the scripts.

@emaste
Copy link

emaste commented Sep 27, 2024

I'm temporarily trying FreeBSD 14.0

14.0 is close to EOL - is there a reason you're looking at that version specifically rather than 14.1?

@richardlau
Copy link
Member

I'm temporarily trying FreeBSD 14.0

14.0 is close to EOL - is there a reason you're looking at that version specifically rather than 14.1?

https://bsd-cloud-image.org/

@richardlau
Copy link
Member

Just noticed https://bsd-cloud-image.org/ has updated images to 13.4 and 14.1.

https://www.freebsd.org/releases/13.4R/relnotes/ suggests clang has been updated to 18.1.5. I'll try to see if that can build Node.js 22/23/main.

@richardlau
Copy link
Member

richardlau commented Nov 4, 2024

v22.x-staging with FreeBSD 13.4 / clang 18.1.6: https://ci.nodejs.org/job/richardlau-node-test-commit-freebsd/19/nodes=freebsd13-x64/console

still fails due to nodejs/node#54576:

Node.js configure: Found Python 3.11.10...
Detected clang C++ compiler (CXX=ccache c++) version: 18.1.6
Detected clang C compiler (CC=ccache cc) version: 18.1.6
...
../deps/v8/src/base/small-vector.h:25:3: error: static assertion failed due to requirement '::v8::base::is_trivially_copyable<std::pair<const v8::internal::compiler::turboshaft::PhiOp *, const v8::internal::compiler::turboshaft::OpIndex>>::value': T should be trivially copyable
   25 |   ASSERT_TRIVIALLY_COPYABLE(T);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/base/macros.h:211:17: note: expanded from macro 'ASSERT_TRIVIALLY_COPYABLE'
  211 |   static_assert(::v8::base::is_trivially_copyable<T>::value, \
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/compiler/turboshaft/loop-unrolling-reducer.h:431:65: note: in instantiation of template class 'v8::base::SmallVector<std::pair<const v8::internal::compiler::turboshaft::PhiOp *, const v8::internal::compiler::turboshaft::OpIndex>, 16>' requested here
  431 |   base::SmallVector<std::pair<const PhiOp*, const OpIndex>, 16> phis;
      |                                                                 ^
1 error generated.
gmake[2]: *** [tools/v8_gypfiles/v8_turboshaft.target.mk:212: /usr/home/iojs/build/node-test-commit-freebsd/nodes/freebsd13-x64/out/Release/obj.target/v8_turboshaft/deps/v8/src/compiler/turboshaft/csa-optimize-phase.o] Error 1

richardlau added a commit to richardlau/build that referenced this issue Nov 4, 2024
richardlau added a commit to richardlau/build that referenced this issue Nov 4, 2024
@richardlau
Copy link
Member

I've swapped node-test-commit-freebsd and libuv-test-commit-freebsd over to freebsd13-x64.

Note that as per FreeBSD 12 we are skipping FreeBSD 13 for Node.js 22 onwards until nodejs/node#54576 is resolved.

Provided no unexpected issues occur, we can retire the FreeBSD 12 machines.

@richardlau
Copy link
Member

I've destroyed the two FreeBSD 12 machines in DigitalOcean and removed them from Jenkins. #3955 will tidy up Ansible (inventory and one place I found that is specific to FreeBSD 12).

richardlau added a commit that referenced this issue Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants