SwiftPackageIndex-Server: Server hangs when running with Swift 6.1 image
The server process seems to be hanging when deploying the new swift:6.1.0-jammy based base image.
Compare this launch of the 2.116.27 docker image (swift:6.0.3-jammy) with 2.117.0 (swift:6.1.0-jammy):
In both cases, the process has no configuration and should immediately raise an internal server error. However, the Swift 6.1 based image just hangs.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 20 (17 by maintainers)
Commits related to this issue
- Add a launch check to the release build to catch #3755 — committed to SwiftPackageIndex/SwiftPackageIndex-Server by finestructure 2 years ago
- Add a launch check to the release build to catch #3755 — committed to SwiftPackageIndex/SwiftPackageIndex-Server by finestructure 2 years ago
If we end up doing it, we should just skip the signing. That way the basic feature is still available and URLs aren’t 404ing even though the produced collection is somewhat flawed.
As to the base image, we used to ship the base image with a different compiler version for analysis but that was a whole different can of worms which I’d rather we didn’t go back to if it can be avoided at all.
Ok, updating to SwiftPM release/6.1 is not sufficient. I thought I got that working on Friday but perhaps it was working only when I removed SwiftPM as a dependency entirely?
I’m now looking into dropping SwiftPM as a dependency. However, there are some issues with that.
There are two modules we need, PackageCollectionsModel and PackageCollectionsSigning.
This will probably only work if we can avoid depending on “Basics”.
Unfortunately, its dependency on “Basics” also means that there’s no way we’ll get SwiftPM to pull this into its own upstream dependency which we could import.
So the only two choices we have are:
I’ll briefly explore replacing the “Basics” module. Perhaps PackageCollectionsSigning isn’t using too much of it and I can copy some more bits.
This is to unblock us. I don’t think we want to maintain signing code on our end in the long run.
In order to try and debug this further, I had to fork Vapor, which required me to drop SwiftPM as a dependency. Doing this actually fixed the hang. The Vapor fork is the latest release + a couple of print statements, so I’m operating under the assumption that the SwiftPM dependency is the problem.
I’ll try to move us to
release/6.0on the main branch first, addressing the new concurrency issues along the way, and then torelease/6.1subsequently.