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

Y2038 support: Target Ubuntu 22.04 in arm build image #1037

Merged
merged 4 commits into from
May 8, 2024

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented May 6, 2024

Fixes #1034
Fixes dotnet/runtime#96460

I'm still hitting some issues trying to validate this locally, so marking it no-merge for now.

sbomer added 3 commits May 6, 2024 21:36
Which is the first ubuntu release to include a glibc that supports 64-bit time_t.
@sbomer sbomer requested a review from a team as a code owner May 6, 2024 22:50
@sbomer sbomer added the do-not-merge A PR that should not be merged yet but needs to remain open label May 6, 2024
@sbomer sbomer requested a review from richlander May 6, 2024 22:51
@richlander
Copy link
Member

Will you be able to merge this PR in time?

@sbomer
Copy link
Member Author

sbomer commented May 7, 2024

Don't worry, I've got all the time in the world...

Before:

01/19/2038 03:14:05
01/19/2038 03:14:06
01/19/2038 03:14:07
01/01/1970 00:00:00
01/01/1970 00:00:00
01/01/1970 00:00:00

After:

01/19/2038 03:14:05
01/19/2038 03:14:06
01/19/2038 03:14:07
01/19/2038 03:14:08
01/19/2038 03:14:09
01/19/2038 03:14:10

(Validated with a local arm32 build against this change. The openssl shim also is linked against 64-bit versions of the time symbols.)

@sbomer sbomer removed the do-not-merge A PR that should not be merged yet but needs to remain open label May 7, 2024
@richlander
Copy link
Member

richlander commented May 7, 2024

Well played, sir.

Context: This change is for Y2038 -> dotnet/core#9285

@richlander
Copy link
Member

That change was simpler than I was guessing, but makes sense in hindsight.

RUN /scripts/eng/common/cross/build-rootfs.sh arm xenial --skipunmount
# The arm rootfs targets Ubuntu 22.04, which is the first version with a
# glibc that supports 64-bit time_t. See https://github.com/dotnet/core/discussions/9285.
RUN /scripts/eng/common/cross/build-rootfs.sh arm jammy no-lldb --skipunmount
Copy link
Member

@agocke agocke May 7, 2024

Choose a reason for hiding this comment

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

IIRC, this supports 64-bit time_t, but there's #define needed to actually use it. Do we need to set that somewhere? Or is it set by default?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, @am11 did this already in dotnet/runtime#100461.

@sbomer
Copy link
Member Author

sbomer commented May 7, 2024

Blocked on dotnet/arcade#14754

@sbomer sbomer closed this May 7, 2024
@sbomer sbomer reopened this May 7, 2024
@richlander richlander changed the title Target Ubuntu 22.04 in arm build image Y2038 support: Target Ubuntu 22.04 in arm build image May 8, 2024
@sbomer sbomer merged commit 66355fd into dotnet:main May 8, 2024
20 checks passed
sbomer added a commit that referenced this pull request May 9, 2024
#1037
updated the glibc baseline for our arm32 images, but we were
still running tests on Debian 11 which has an older version,
causing the failures in
dotnet/runtime#102030. This adds a new
Debian 12 image.
sbomer added a commit to dotnet/runtime that referenced this pull request May 22, 2024
This updates our linux arm32 build to build against a more recent
glibc that supports _TIME_BITS (which we set to 64).

Since openssl may be using either 32-bit or 64-bit time_t, this
includes detection logic to determine which case we are in, and
avoid passing time values that don't fit in 32 bits to openssl.

The arm build image is updated to the latest version of the
images added in
dotnet/dotnet-buildtools-prereqs-docker#1037.

The helix test images are updated to debian images added in
dotnet/dotnet-buildtools-prereqs-docker#1041.
Additional context:

Additional context:

Reintroduces the fix for Y2038 support on arm32
linux (#102059), which was
reverted due to problems running against openssl built with
_TIME_BITS=32.

Fixes #101444 (both the
originally reported issue, and the test failures mentioned in
#101444 (comment)).

Supports: #91826
steveharter pushed a commit to steveharter/runtime that referenced this pull request May 28, 2024
This updates our linux arm32 build to build against a more recent
glibc that supports _TIME_BITS (which we set to 64).

Since openssl may be using either 32-bit or 64-bit time_t, this
includes detection logic to determine which case we are in, and
avoid passing time values that don't fit in 32 bits to openssl.

The arm build image is updated to the latest version of the
images added in
dotnet/dotnet-buildtools-prereqs-docker#1037.

The helix test images are updated to debian images added in
dotnet/dotnet-buildtools-prereqs-docker#1041.
Additional context:

Additional context:

Reintroduces the fix for Y2038 support on arm32
linux (dotnet#102059), which was
reverted due to problems running against openssl built with
_TIME_BITS=32.

Fixes dotnet#101444 (both the
originally reported issue, and the test failures mentioned in
dotnet#101444 (comment)).

Supports: dotnet#91826
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
This updates our linux arm32 build to build against a more recent
glibc that supports _TIME_BITS (which we set to 64).

Since openssl may be using either 32-bit or 64-bit time_t, this
includes detection logic to determine which case we are in, and
avoid passing time values that don't fit in 32 bits to openssl.

The arm build image is updated to the latest version of the
images added in
dotnet/dotnet-buildtools-prereqs-docker#1037.

The helix test images are updated to debian images added in
dotnet/dotnet-buildtools-prereqs-docker#1041.
Additional context:

Additional context:

Reintroduces the fix for Y2038 support on arm32
linux (dotnet#102059), which was
reverted due to problems running against openssl built with
_TIME_BITS=32.

Fixes dotnet#101444 (both the
originally reported issue, and the test failures mentioned in
dotnet#101444 (comment)).

Supports: dotnet#91826
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Produce Azure Linux 3.0 + Ubuntu 22.04 images for Arm32 build ARM32 Year 2038 issue
3 participants