You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On rare occasions, using when loading a package graph for the first time using libSwftPM on macOS will result in the following error:
error: accessing build database "/Users/<redacted>/SourcePackages/manifest.db": database is locked; Possibly there are two concurrent builds running in the same filesystem location.
This seems to be coming from lldb when opening the SQLite build dependencies database for manifests, under the getEngine() function in ManifestLoader.
Retrying the operation usually works. The client is careful to serialize its use of libSwiftPM, and so this is thought to be something transient with the file system rather than two actually concurrent builds.
Here is the part of the backtrace that pertains to libSwiftPM, with loadJSONString() calling down to getEngine():
frame #​24: 0x00000001b3cc92cd libSwiftPM.dylib`protocol witness for ManifestLoaderProtocol.load(packagePath:baseURL:version:toolsVersion:packageKind:fileSystem:diagnostics🙂 in conformance ManifestLoader at <compiler-generated>:0
frame #​26: 0x00000001b3f2b41d libSwiftPM.dylib`closure #​1 in closure #​1 in Workspace.loadManifest(self=0x00000001a956d510, packagePath=TSCBasic.AbsolutePath @ 0x00007000078eb2e0, url="ssh://<redacted>/diceui.git", version=nil, packageKind=remote, diagnostics=0x00006000027ddf80) at Workspace.swift:1231:43
frame #​27: 0x00000001b3f442c9 libSwiftPM.dylib`partial apply for closure #​1 in closure #​1 in Workspace.loadManifest(packagePath:url:version:packageKind:diagnostics🙂 at <compiler-generated>:0
frame #​28: 0x00000001b3f2b5e3 libSwiftPM.dylib`thunk for @callee_guaranteed () -> (@owned Manifest, @error @owned Error) at <compiler-generated>:0
frame #​29: 0x00000001b3f442f4 libSwiftPM.dylib`partial apply for thunk for @callee_guaranteed () -> (@owned Manifest, @error @owned Error) at <compiler-generated>:0
frame #​30: 0x00000001b3e92b8a libSwiftPM.dylib`DiagnosticsEngine.wrap<T>(closure=0x00000001b3f442e0 libSwiftPM.dylib`partial apply forwarder for reabstraction thunk helper from @callee_guaranteed () -> (@owned PackageModel.Manifest, @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out PackageModel.Manifest, @error @owned Swift.Error) at <compiler-generated>, self=0x00006000027ddf80) at Diagnostics.swift:104:24
frame #​31: 0x00000001b3f2af48 libSwiftPM.dylib`closure #​1 in Workspace.loadManifest(diagnostics=0x00006000027ddf80, self=0x00000001a956d510, packagePath=TSCBasic.AbsolutePath @ 0x00007000078eb670, url="ssh://<redacted>/diceui.git", version=nil, packageKind=remote) at Workspace.swift:1220:32
frame #​32: 0x00000001b3f44263 libSwiftPM.dylib`partial apply for closure #​1 in Workspace.loadManifest(packagePath:url:version:packageKind:diagnostics🙂 at <compiler-generated>:0
frame #​33: 0x00000001b3f2b640 libSwiftPM.dylib`thunk for @callee_guaranteed (@guaranteed DiagnosticsEngine) -> (@owned Manifest?) at <compiler-generated>:0
frame #​34: 0x00000001b3f44281 libSwiftPM.dylib`partial apply for thunk for @callee_guaranteed (@guaranteed DiagnosticsEngine) -> (@owned Manifest?) at <compiler-generated>:0
frame #​35: 0x00000001b3e92a1b libSwiftPM.dylib`DiagnosticsEngine.with<T>(location=TSCUtility.PackageLocation.Local @ 0x00006000012f3ee0, closure=0x00000001b3f44270 libSwiftPM.dylib`partial apply forwarder for reabstraction thunk helper from @callee_guaranteed (@guaranteed TSCBasic.DiagnosticsEngine) -> (@owned Swift.Optional<PackageModel.Manifest>) to @escaping @callee_guaranteed (@guaranteed TSCBasic.DiagnosticsEngine) -> (@out Swift.Optional<PackageModel.Manifest>) at <compiler-generated>, self=0x000060000280cea0) at Diagnostics.swift:92:16
Additional Detail from JIRA
md5: e4f09ac5cf88d3e61e12aac86c1affa9
Issue Description:
On rare occasions, using when loading a package graph for the first time using libSwftPM on macOS will result in the following error:
error: accessing build database "/Users/<redacted>/SourcePackages/manifest.db": database is locked; Possibly there are two concurrent builds running in the same filesystem location.
This seems to be coming from lldb when opening the SQLite build dependencies database for manifests, under the getEngine() function in ManifestLoader.
Retrying the operation usually works. The client is careful to serialize its use of libSwiftPM, and so this is thought to be something transient with the file system rather than two actually concurrent builds.
Here is the part of the backtrace that pertains to libSwiftPM, with loadJSONString() calling down to getEngine():
frame #​21: 0x00000001b3cb8954 libSwiftPM.dylib`ManifestLoader.loadJSONString(inputPath=TSCBasic.AbsolutePath @ 0x00007000078ea300, toolsVersion=PackageModel.ToolsVersion @ 0x00007000078eb2f8, packageIdentity="diceui", fs=nil, diagnostics=0x00006000027ddf80, self=0x00006000030a4ab0) at ManifestLoader.swift:472:30
frame #​22: 0x00000001b3cb5821 libSwiftPM.dylib`ManifestLoader.loadFile(inputPath=TSCBasic.AbsolutePath @ 0x00007000078eaae0, baseURL="ssh://<redacted>/diceui.git", version=nil, toolsVersion=PackageModel.ToolsVersion @ 0x00007000078eb2f8, packageKind=remote, fileSystem=nil, diagnostics=0x00006000027ddf80, self=0x00006000030a4ab0) at ManifestLoader.swift:238:30
frame #​23: 0x00000001b3cb518a libSwiftPM.dylib`ManifestLoader.load(path=TSCBasic.AbsolutePath @ 0x00007000078eae78, baseURL="ssh://<redacted>/diceui.git", version=nil, toolsVersion=PackageModel.ToolsVersion @ 0x00007000078eb2f8, packageKind=remote, fileSystem=nil, diagnostics=0x00006000027ddf80, self=0x00006000030a4ab0) at ManifestLoader.swift:198:20
frame #​24: 0x00000001b3cc92cd libSwiftPM.dylib`protocol witness for ManifestLoaderProtocol.load(packagePath:baseURL:version:toolsVersion:packageKind:fileSystem:diagnostics🙂 in conformance ManifestLoader at <compiler-generated>:0
frame #​25: 0x00000001b3cb3a25 libSwiftPM.dylib`ManifestLoaderProtocol.load(path=TSCBasic.AbsolutePath @ 0x00007000078eb010, baseURL="ssh://<redacted>/diceui.git", version=nil, toolsVersion=PackageModel.ToolsVersion @ 0x00007000078eb2f8, packageKind=remote, fileSystem=nil, diagnostics=0x00006000027ddf80, self=0x00006000030a4ab0) at ManifestLoader.swift:101:20
frame #​26: 0x00000001b3f2b41d libSwiftPM.dylib`closure #​1 in closure #​1 in Workspace.loadManifest(self=0x00000001a956d510, packagePath=TSCBasic.AbsolutePath @ 0x00007000078eb2e0, url="ssh://<redacted>/diceui.git", version=nil, packageKind=remote, diagnostics=0x00006000027ddf80) at Workspace.swift:1231:43
frame #​27: 0x00000001b3f442c9 libSwiftPM.dylib`partial apply for closure #​1 in closure #​1 in Workspace.loadManifest(packagePath:url:version:packageKind:diagnostics🙂 at <compiler-generated>:0
frame #​28: 0x00000001b3f2b5e3 libSwiftPM.dylib`thunk for @callee_guaranteed () -> (@owned Manifest, @error @owned Error) at <compiler-generated>:0
frame #​29: 0x00000001b3f442f4 libSwiftPM.dylib`partial apply for thunk for @callee_guaranteed () -> (@owned Manifest, @error @owned Error) at <compiler-generated>:0
frame #​30: 0x00000001b3e92b8a libSwiftPM.dylib`DiagnosticsEngine.wrap<T>(closure=0x00000001b3f442e0 libSwiftPM.dylib`partial apply forwarder for reabstraction thunk helper from @callee_guaranteed () -> (@owned PackageModel.Manifest, @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out PackageModel.Manifest, @error @owned Swift.Error) at <compiler-generated>, self=0x00006000027ddf80) at Diagnostics.swift:104:24
frame #​31: 0x00000001b3f2af48 libSwiftPM.dylib`closure #​1 in Workspace.loadManifest(diagnostics=0x00006000027ddf80, self=0x00000001a956d510, packagePath=TSCBasic.AbsolutePath @ 0x00007000078eb670, url="ssh://<redacted>/diceui.git", version=nil, packageKind=remote) at Workspace.swift:1220:32
frame #​32: 0x00000001b3f44263 libSwiftPM.dylib`partial apply for closure #​1 in Workspace.loadManifest(packagePath:url:version:packageKind:diagnostics🙂 at <compiler-generated>:0
frame #​33: 0x00000001b3f2b640 libSwiftPM.dylib`thunk for @callee_guaranteed (@guaranteed DiagnosticsEngine) -> (@owned Manifest?) at <compiler-generated>:0
frame #​34: 0x00000001b3f44281 libSwiftPM.dylib`partial apply for thunk for @callee_guaranteed (@guaranteed DiagnosticsEngine) -> (@owned Manifest?) at <compiler-generated>:0
frame #​35: 0x00000001b3e92a1b libSwiftPM.dylib`DiagnosticsEngine.with<T>(location=TSCUtility.PackageLocation.Local @ 0x00006000012f3ee0, closure=0x00000001b3f44270 libSwiftPM.dylib`partial apply forwarder for reabstraction thunk helper from @callee_guaranteed (@guaranteed TSCBasic.DiagnosticsEngine) -> (@owned Swift.Optional<PackageModel.Manifest>) to @escaping @callee_guaranteed (@guaranteed TSCBasic.DiagnosticsEngine) -> (@out Swift.Optional<PackageModel.Manifest>) at <compiler-generated>, self=0x000060000280cea0) at Diagnostics.swift:92:16
frame #​36: 0x00000001b3f252c7 libSwiftPM.dylib`Workspace.loadManifest(packagePath=TSCBasic.AbsolutePath @ 0x00007000078eb9c0, url="ssh://<redacted>/diceui.git", version=nil, packageKind=remote, diagnostics=0x000060000280cea0, self=0x00000001a956d510) at Workspace.swift:1219:28
frame #​37: 0x00000001b3f29ec6 libSwiftPM.dylib`Workspace.loadManifest(packageURL="ssh://<redacted>/diceui.git", diagnostics=0x000060000280cea0, self=0x00000001a956d510) at Workspace.swift:1200:16
frame #​38: 0x00000001b3f298b6 libSwiftPM.dylib`closure #​2 in Workspace.loadDependencyManifests($0=PackageGraph.PackageGraphRoot.PackageDependency @ 0x00007000078ebde0, self=0x00000001a956d510, diagnostics=0x000060000280cea0) at Workspace.swift:1153:20
frame #​39: 0x00000001b3c18a42 libSwiftPM.dylib`thunk for @callee_guaranteed (@guaranteed PackageGraphRoot.PackageDependency) -> (@owned Manifest?, @error @owned Error) at <compiler-generated>:0
frame #​40: 0x00000001b3f3d424 libSwiftPM.dylib`partial apply for thunk for @callee_guaranteed (@guaranteed PackageGraphRoot.PackageDependency) -> (@owned Manifest?, @error @owned Error) at <compiler-generated>:0
frame #​41: 0x00007fff63f6c259 libswiftCore.dylib`(extension in Swift):Swift.Sequence.compactMap<A>((A.Element) throws -> Swift.Optional<A1>) throws -> Swift.Array<A1> + 761
frame #​42: 0x00000001b3f19571 libSwiftPM.dylib`Workspace.loadDependencyManifests(root=PackageGraph.PackageGraphRoot @ 0x00007000078ec710, diagnostics=0x000060000280cea0, self=0x00000001a956d510) at Workspace.swift:1151:69
frame #​43: 0x00000001b3f14313 libSwiftPM.dylib`Workspace._resolve(root=PackageGraph.PackageGraphRootInput @ 0x00007000078ece40, forceResolution=false, extraConstraints=0 values, diagnostics=0x000060000280cea0, retryOnPackagePathMismatch=true, self=0x00000001a956d510) at Workspace.swift:1569:32
frame #​44: 0x00000001b3f22847 libSwiftPM.dylib`Workspace.loadPackageGraph(root=PackageGraph.PackageGraphRootInput @ 0x00007000078ed600, createMultipleTestProducts=true, createREPLProduct=false, forceResolvedVersions=false, diagnostics=0x000060000280cea0, xcTestMinimumDeploymentTargets=nil, self=0x00000001a956d510) at Workspace.swift:742:30
(the part under frame #21 here is in temporary debug logging code that wouldn't be part of the normal code path)
The text was updated successfully, but these errors were encountered: