Repository navigation
Conversation
rcodesign can die with SIGSEGV after it has written its signed output. This has failed signing builds in coder/coder, which applies the same patch and uses the same Cloud KMS library. It has not happened in this repository yet. The patch made rcodesign call C_Finalize once signing was done and drop the module context, which unloads the library. When the Cloud KMS library authenticates with Google credentials, most of its threads are still running at that point, so one of them can run after the library is unmapped. The module context now stays in the process-wide registry until the process exits, so the library is neither finalized nor unloaded. The patch file is the one in coder/coder#32333.
kylecarbs
approved these changes
Nov 17, 2026
This branch has not been deployed
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.
rcodesigncan die with SIGSEGV after it has written its signed output. This has failed three signing builds in coder/coder, which applies the same patch torcodesignand uses the same Cloud KMS library. It has not happened in this repository yet. This is the same change as coder/coder#32333, and the patch file is byte-identical to the one there.The patch made
rcodesigncallC_Finalizeonce signing was done and drop the module context, which unloads the library. When the Cloud KMS library authenticates with Google credentials,C_Finalizereturns with most of the library's threads still running, and a thread that runs after the library is unmapped faults.The module context now stays in the process-wide registry until the process exits, so the library is neither finalized nor unloaded. That is the one way the patch now differs from indygreg/apple-platform-rs#350, and its header says so.
No pull request job runs this action or the signing scripts, so the first real run is the preview build on
mainafter the merge. That build currently fails before it signs, at Google authentication (44160625560), so it will not exercise this change until that is fixed.The crash reproduces locally with
scripts/signing/sign-app.shandlibkmsp111.9 against a fake Cloud KMS over TLS, with anexternal_accountcredential of the kindgoogle-github-actions/authwrites. Both binaries were built with the action's commands and toolchain:rcodesignbuilt withsign-app.shrunssign-installer.shrunsmainAll 16 crashes were in the two calls that sign the mutagen agents, after
writing Mach-Owas logged. With this patch the app and the installer still sign correctly: all 15 programs carry the signing certificate and no other, the installer's signature verifies, and against a SoftHSM token the signatures have the same identifiers, flags, entitlements and requirements as those the current patch produces.Note
An AI agent (Xum) wrote this change for @sreya and ran the local tests above.