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

Build against Y2038-compatible glibc for linux arm32 #102410

Merged
merged 9 commits into from
May 22, 2024
Merged

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented May 18, 2024

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

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

Supports: #91826

@sbomer
Copy link
Member Author

sbomer commented May 18, 2024

/azp run runtime-coreclr libraries-jitstress

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

And avoid passing values that can't be represented in 32 bits
when running against openssl that expects 32-bit time_t.
@sbomer
Copy link
Member Author

sbomer commented May 22, 2024

/azp run runtime-coreclr libraries-jitstress

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

Apparently this symbol did not exist in the builds of openssl
in Ubuntu 16.04.
Except in opensslshim.c, which is only built for that feature.
@jkotas
Copy link
Member

jkotas commented May 22, 2024

We may want to simplify

if (sizeof(time_t) == sizeof(int64_t))
{
*expiration = (int64_t)expiration_t;
}
else if (sizeof(time_t) == sizeof(int32_t))
{
*expiration = (int32_t)expiration_t;
}
to assume 64-bit time_t and instead add assert that will fail the build when time_t is not 64-bit. Something like this: jkotas@8657f6d

- Revert unintentional change
@sbomer
Copy link
Member Author

sbomer commented May 22, 2024

assume 64-bit time_t and instead add assert that will fail the build when time_t is not 64-bit.

Apparently the tizen-armel build doesn't use 64-bit time_t.

@sbomer
Copy link
Member Author

sbomer commented May 22, 2024

/azp run runtime-coreclr libraries-jitstress

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sbomer sbomer merged commit a17b872 into dotnet:main May 22, 2024
148 of 155 checks passed
@richlander
Copy link
Member

Will you provided a detailed writeup on what we had to do? I think that will be super useful.

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
@sbomer
Copy link
Member Author

sbomer commented May 29, 2024

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
@github-actions github-actions bot locked and limited conversation to collaborators Jun 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTPS requests fail on Ubuntu 24.04 Noble ARM32 due to bundled certs "NotTimeValid" error
3 participants