Serialize FairPlay context creation - #1
Merged
Conversation
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: LYJW131 <lyjw2007@gmail.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: LYJW131 <lyjw2007@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Serialize FairPlay persistent-key and decrypt-context creation with a dedicated mutex while keeping sample decryption fully concurrent after each worker has acquired its context.
The PR also fixes the existing Actions NDK extraction path so the repository's CMake configuration can find the downloaded toolchain during pull-request builds.
Root cause
Concurrent calls into
getPersistentKey/decryptContextare not reliable. Under bursts of fresh streams the wrapper throws:The failure closes one TCP connection, and wrapper-manager versions that treat a connection error as instance failure can then restart the whole wrapper. Limiting sample decryption would hide the symptom and reduce steady-state throughput, so this change protects only the short context-construction section.
Impact
Validation
buildjob passes with the corrected NDK path-42812