"Object 0x710ae8019d90 of class _MultiHandle deallocated with non-zero retain count 2" error when trying to install the Static Linux SDK

Starting with 6.4.0, I am often getting this error when trying to install the Static Linux SDK. Thankfully I have a builder docker image, so it only has to succeed twice per Swift version.

Here is the SafeSleepHub issue: Object 0x710ae8019d90 of class _MultiHandle deallocated with non-zero retain count 2 · Issue #10535 · swiftlang/swift-package-manager · GitHub

1 Like

This looks like swift-corelibs-foundation#5203. The default swift:6.4 image is Ubuntu 26.04 with libcurl 8.18.0, and with libcurl 8.11.0 or newer a URLSession crashes this way when it's released right after a request. There's a fix in review, swiftlang/swift-corelibs-foundation#5491, and I posted a repro and test results there.

Until it lands, the swift:6.4-noble image might work as a workaround: it has libcurl 8.5.0, and I couldn't get the crash there.

1 Like

Same issue now with the 6.4.1 Android SDK, oddly only after the 6.4.2 SDK was released.

There is an open SwiftPM issue for this, and an open Foundation pull that is said to fix it.