Repository navigation
Conversation
Callbacks fell back to the default library and its same-thread runner. If LGitLibrary used a TFWorker, libgit2 called them from the worker thread and crashed the VM. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 30, 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.
This PR binds LGit callbacks to
LGitLibrary, so they always use the same runner as the calls that trigger them.Goal
Callbacks created without a library fall back to the
'default'library and its same-thread runner. This is harmless whileLGitLibraryis on the same-thread runner, but with aTFWorkerlibgit2 calls them from the worker thread and crashes the VM. A clone crashed twice this way, and with this fix a clone, a fetch, error reads and a semaphore wait inside a callback all worked on a worker. This is a first step for running libgit2 without blocking the image, so Iceberg can show progress during a fetch.Main changes
LGitCallback>>ffiLibraryName, answeringLGitLibrary. Being on the instance side, it covers every way of creating a callback, including thesignature:block:overrides and Iceberg's progress classes.LGitLibraryTest>>testCallbacksUseLGitLibrary.The default runner does not change. The fix needs nothing new from Pharo, so it can also be backported to
Pharo14. Related Pharo change: pharo-project/pharo#20136.Tests
LibGit-Tests: 125 ran, 122 passed, 3 failures, 12 of the passes skipped. The failures areLGitFreshRepositoryTest>>#testAutoRelease,LGitStringArrayTest>>#testAutoReleaseandLGitBlobTest>>#testFree, and they also fail without this change. The new test passes. InIceberg-Tests,IceNewGitRepositoryTest,IceGitMergeTestandIceSinglePackageLocalGitRepositoryTestpass (131 ran, 14 skipped). The full package run timed out, and the manual network tests are skipped.🤖 Generated with Claude Code