Skip to content

Conversation

@rohanpm
Copy link
Contributor

@rohanpm rohanpm commented Aug 25, 2021

Previously we jump right into spawning a thread pool and farming out
some koji requests to threads.

Unfortunately, RHEL6 environments suffer from a thread-safety issue:
if the very first parsing of a SAN field from an SSL cert in the
lifetime of a process happens from multiple threads at once, corruption
can occur due to thread-unsafe lazy initialization in the pyasn1
library. This is etingof/pyasn1#53 .
See RHELDST-7454 for examples of the resulting crash.

Warming up from one thread before we start concurrent operations should
be an effective way to work around this and is arguably nicer behavior
anyway (e.g. trying to use an invalid koji URL will now give a more
understandable exception coming from a single thread). So let's do that.

Previously we jump right into spawning a thread pool and farming out
some koji requests to threads.

Unfortunately, RHEL6 environments suffer from a thread-safety issue:
if the very first parsing of a SAN field from an SSL cert in the
lifetime of a process happens from multiple threads at once, corruption
can occur due to thread-unsafe lazy initialization in the pyasn1
library. This is etingof/pyasn1#53 .
See RHELDST-7454 for examples of the resulting crash.

Warming up from one thread before we start concurrent operations should
be an effective way to work around this and is arguably nicer behavior
anyway (e.g. trying to use an invalid koji URL will now give a more
understandable exception coming from a single thread). So let's do that.
@rohanpm rohanpm marked this pull request as ready for review August 25, 2021 04:10
@rohanpm rohanpm requested a review from a team August 25, 2021 04:10
@rohanpm rohanpm merged commit 5180adf into release-engineering:master Aug 25, 2021
@rohanpm rohanpm deleted the koji-warmup branch August 25, 2021 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants