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

[ansible] Add Ubuntu 20.04 linux-riscv64 image #3240

Merged
merged 13 commits into from
Nov 9, 2023

Conversation

luhenry
Copy link
Contributor

@luhenry luhenry commented Nov 5, 2023

It will be used for cross-compilation and testing.

Checklist
  • commit message has one of the standard prefixes
  • faq.md updated if appropriate
  • other documentation is changed or added (if applicable)
  • playbook changes run through VPC or QPC (if you have access)
  • VPC/QPC not applicable for this PR
  • for inventory.yml changes, bastillion/nagios/jenkins updated accordingly

It will be used for cross-compilation and testing.
@luhenry
Copy link
Contributor Author

luhenry commented Nov 5, 2023

I'm not sure how to update https://ci.adoptium.net/view/Tooling/job/QEMUPlaybookCheck to include a ubuntu2004 check for riscv

@luhenry
Copy link
Contributor Author

luhenry commented Nov 6, 2023

Could you please add the QEMU-playbook-check label so that it triggers the check on CI?

@karianna karianna added the QEMU-playbook-check Runs build_qemu workflow label Nov 6, 2023
@sxa
Copy link
Member

sxa commented Nov 6, 2023

Thanks - I'll try a run of the new dockerfile on my system :-)

Copy link
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs on how QEMUPlaybook is done is under https://github.com/adoptium/infrastructure/blob/master/docs/Setup-QEMU-Images.md and it's hosted on a specific machine that you'd need access to to be able to do any of the updates as they're not currently automated.

https://github.com/adoptium/infrastructure/blob/master/docs/Setup-RISCV-VMs.md has some info on how the existing RISC-V QPC virtual machine was initially set up.

As you can probably tell the QPC stuff hasn't been updated in a while as the latest is Debian 11/Ubuntu18 so it needs a bit of attention - there's an issue relating to that at #2121 but to be clear I don't consider the lack of QPC for this version to be a blocker for this PR :-)

Can you clarify the reason for having mercurial-common, python2, and upc explicitly called out? We don't use mercurial any more and I'm a little surprised we'd need to special case the others too so would be good to clarify what they're needed for if we're going to include them.

Also have you been able to test that the github actions stuff being added here work ok?

@luhenry
Copy link
Contributor Author

luhenry commented Nov 6, 2023

I added manually mercurial-common, python2, and upc as they are the dependencies of the mercurial package in Ubuntu. I’m happy to remove them altogether if we don’t depend on them anymore.

Also have you been able to test that the github actions stuff being added here work ok?

that’s what I want to get done by adding the QEMU-playbook-check label, but the original run was stuck on waiting for Ubuntu 18.04 runners which have been deprecated. I would need another “go ahead” on the GitHub action CI to check that up.

@sxa
Copy link
Member

sxa commented Nov 6, 2023

I can't remember if the actions will trigger on the contents of the PR of if the PR has to be merged first, so was wondering if it might be simpler to test it in your own repository if that's feasisble.

Yeah mercurial was useful before openjdk moved itself to GitHub so shouldn't be necessary now as far as I'm aware (especially not on RISC-V) so I'm ok with having that stuff removed.

@luhenry
Copy link
Contributor Author

luhenry commented Nov 6, 2023

I've tested that the ansible playbook does work, but I'm still working on running the aqa-tests in there.

@sxa
Copy link
Member

sxa commented Nov 6, 2023

Thanks - I'll try a run of the new dockerfile on my system :-)

FYI that seemed to work well so nice to see this seems to work - I'll try and kick off a build in the new container image overnight on my machine :-)

@luhenry
Copy link
Contributor Author

luhenry commented Nov 6, 2023

I've verified locally that the image allows us to build jdk17u with:

podman run --rm -it --platform linux/riscv64 -v /workspace:/workspace -w $(pwd) localhost/adoptopenjdk/ubuntu2004_build_image:linux-riscv64 bash -ex -c "cd build-farm; ./make-adopt-build-farm.sh jdk17u"

This special JDK 19 depends on older GLIBC which is available in Ubuntu
20.04. It's then usable inside a Ubuntu 20.04 container.
@luhenry
Copy link
Contributor Author

luhenry commented Nov 7, 2023

I've verified the latest changes work for building jdk20u:

podman run --rm -it --platform linux/riscv64 -v /workspace:/workspace -w $(pwd) localhost/adoptopenjdk/ubuntu2004_build_image:linux-riscv64 bash -ex -c "cd build-farm; bash -x ./make-adopt-build-farm.sh jdk20u"

@sxa
Copy link
Member

sxa commented Nov 7, 2023

VPC run at https://ci.adoptium.net/view/Tooling/job/VagrantPlaybookCheck/1742 as a final check.

@luhenry
Copy link
Contributor Author

luhenry commented Nov 7, 2023

It succeeded to build jdk20u locally with the latest change.

@sxa
Copy link
Member

sxa commented Nov 8, 2023

Noting that this will currently misbehave on many real boards due to adoptium/adoptium-support#697 unless --security-opt seccomp=unconfined is added to the DOCKER_ARGS when starting the container.

@sxa
Copy link
Member

sxa commented Nov 8, 2023

After setting those options to stop the JVM crashing I'm getting a segfault in the compiler during the openjdk build process at the moment which isn't great :'(

13:58:44  g++: internal compiler error: Segmentation fault signal terminated program cc1plus

@luhenry
Copy link
Contributor Author

luhenry commented Nov 8, 2023

Noting that this will currently misbehave on many real boards due to adoptium/adoptium-support#697 unless --security-opt seccomp=unconfined is added to the DOCKER_ARGS when starting the container.

We can add the flag in adoptium/ci-jenkins-pipelines#836.

@luhenry
Copy link
Contributor Author

luhenry commented Nov 8, 2023

After setting those options to stop the JVM crashing I'm getting a segfault in the compiler during the openjdk build process at the moment which isn't great :'(

13:58:44 g++: internal compiler error: Segmentation fault signal terminated program cc1plus

From talking offline, that's when building on a board. I want to push further on building inside docker containers, to free up board for testing. We'll also want to use QEMU for testing for the newer extensions that we are adding support for in OpenJDK (Vector, Vector Crypto, and others). We won't be able to do this testing on boards for the next few years, even though these extensions will be common-place.

@luhenry
Copy link
Contributor Author

luhenry commented Nov 8, 2023

I can't reproduce the g++ SIGSEGV when bumping to gcc-10/g++-10 and running on VF2.

Copy link
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm happy for this to go in now. Noting that jdk19u will likely not be required long term and I'll look at the4 feasibility of publishing a jdk20u build against the Ubuntu 20.04 glibc which can be consumed via the API at which point we can likely clean up the JDK download stuff a bit more for the future.

@sxa sxa merged commit 1486076 into adoptium:master Nov 9, 2023
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ansible doc docker ghActions GitHub Actions QEMU-playbook-check Runs build_qemu workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants