mirror of
https://github.com/cirruslabs/tart.git
synced 2026-09-29 18:51:19 +02:00
9bb2af243480ca4a2c210082e630ae425bd48b31
VZVirtualMachine asserts that it is used on the queue it was created with, which for tart is the main queue. Since #1262 replaced the unstructured Task in "tart run"'s SIGUSR2 handler with ErrorReportingTask, that assertion fails: Task.init carries @_inheritActorContext, but ErrorReportingTask.init did not, so an operation written inside MainActor-isolated Run.runOnMainThread() is formed in a nonisolated init and runs on the cooperative pool, not the main queue. The result is that asking a VM to stop gracefully kills it instead. Sending SIGUSR2, which #842 hooked to requestStop() for exactly this purpose, crashes the process: Thread 1 queue: com.apple.root.default-qos.cooperative _dispatch_assert_queue_fail dispatch_assert_queue -[VZVirtualMachine requestStopWithError:] closure in Run.runOnMainThread() closure in ErrorReportingTask.init(_:operation:) The guest then loses power without a chance to flush, and on a Linux guest with ext4's default delayed allocation that discards whatever had not been written back yet. The same applies to the requestStop() in applicationShouldTerminate(), i.e. closing the window of a VM run with a GUI. Give the operation the same @_inheritActorContext that Task.init has, so that wrapping a call in ErrorReportingTask no longer changes where it runs. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Tart is a virtualization toolset to build, run and manage macOS and Linux virtual machines (VMs) on Apple Silicon. Built by CI engineers for your automation needs. Here are some highlights of Tart:
- Tart uses Apple's own
Virtualization.Frameworkfor near-native performance. - Push/Pull virtual machines from any OCI-compatible container registry.
- Use Tart Packer Plugin to automate VM creation.
- Easily integrates with any CI system.
Many companies are using Tart in their internal setups. Here are just a few of them:
Note: If your company or project is using Tart please consider sharing with the community.
Usage
Try running a Tart VM on your Apple Silicon device running macOS 13.0 (Ventura) or later (will download a 25 GB image):
brew install openai/tools/tart
tart clone ghcr.io/cirruslabs/macos-tahoe-base:latest tahoe-base
tart run tahoe-base
Please check the official documentation for more information and/or feel free to use discussions for remaining questions.
Languages
Swift
91.2%
Go
6.3%
Python
1.6%
Shell
0.8%