swiftlang / sourcekit-lsp

Language Server Protocol implementation for Swift and C-based languages
Apache License 2.0
3.31k stars 277 forks source link

[SR-15299] Compiler crash building sourcekit-lsp on Ubuntu 20.04 (LTS) x64 #509

Closed swift-ci closed 2 years ago

swift-ci commented 3 years ago
Previous ID SR-15299
Radar None
Original Reporter dexterleng (JIRA User)
Type Bug
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler, SourceKit-LSP | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: c02aa341aa43ce65bce8c2120fb90575

Issue Description:

I have verified that the dependencies listed (libsqlite3-dev, libncurses5-dev, python, ninja-build) are installed.

Swift Version:

dleng@dev:~/sourcekit-lsp$ swift -v
Swift version 5.5 (swift-5.5-RELEASE)
dleng@dev:~/sourcekit-lsp$ swift build -Xcxx -I${HOME}/swift/swift-5.5-RELEASE-ubuntu20.04/usr/lib/swift -Xcxx -I${HOME}/swift/swift-5.5-RELEASE-ubuntu20.04/usr/lib/swift/Block
swift-frontend: /home/build-user/swift/lib/IRGen/GenDecl.cpp:3988: llvm::Function *swift::irgen::IRGenModule::getAddrOfTypeMetadataAccessFunction(swift::CanType, swift::ForDefinition_t): Assertion `!type->hasArchetype() && !type->hasTypeParameter()' failed.
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
Stack dump:
0.  Program arguments: /home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend -frontend -c -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/API.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Model/CVE.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Model/Collection.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Model/License.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Model/Package.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Model/Search.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Model/TargetListResult.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/PackageCollections+CertificatePolicy.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/PackageCollections+Configuration.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/PackageCollections+Storage.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/PackageCollections+Validation.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/PackageCollections.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Providers/GitHubPackageMetadataProvider.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Providers/JSONPackageCollectionProvider.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Providers/PackageCollectionProvider.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Providers/PackageMetadataProvider.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/FilePackageCollectionsSourcesStorage.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/PackageCollectionsSourcesStorage.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/PackageCollectionsStorage.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/SQLitePackageCollectionsStorage.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/Trie.swift -primary-file /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Utility.swift -supplementary-output-file-map /tmp/TemporaryDirectory.UyhMD8/supplementaryOutputs-1 -target x86_64-unknown-linux-gnu -disable-objc-interop -I /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug -color-diagnostics -enable-testing -g -module-cache-path /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/ModuleCache -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -new-driver-path /home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-driver -resource-dir /home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/lib/swift -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollectionsSigningLibc/include/module.modulemap -Xcc -I -Xcc /home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollectionsSigningLibc/include -Xcc -fmodule-map-file=/home/dleng/sourcekit-lsp/.build/checkouts/swift-crypto/Sources/CCryptoBoringSSLShims/include/module.modulemap -Xcc -I -Xcc /home/dleng/sourcekit-lsp/.build/checkouts/swift-crypto/Sources/CCryptoBoringSSLShims/include -Xcc -fmodule-map-file=/home/dleng/sourcekit-lsp/.build/checkouts/swift-crypto/Sources/CCryptoBoringSSL/include/module.modulemap -Xcc -I -Xcc /home/dleng/sourcekit-lsp/.build/checkouts/swift-crypto/Sources/CCryptoBoringSSL/include -Xcc -fmodule-map-file=/home/dleng/sourcekit-lsp/.build/checkouts/swift-tools-support-core/Sources/TSCclibc/include/module.modulemap -Xcc -I -Xcc /home/dleng/sourcekit-lsp/.build/checkouts/swift-tools-support-core/Sources/TSCclibc/include -module-name PackageCollections -parse-as-library -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/API.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Model/CVE.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Model/Collection.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Model/License.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Model/Package.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Model/Search.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Model/TargetListResult.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/PackageCollections+CertificatePolicy.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/PackageCollections+Configuration.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/PackageCollections+Storage.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/PackageCollections+Validation.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/PackageCollections.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Providers/GitHubPackageMetadataProvider.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Providers/JSONPackageCollectionProvider.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Providers/PackageCollectionProvider.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Providers/PackageMetadataProvider.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Storage/FilePackageCollectionsSourcesStorage.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Storage/PackageCollectionsSourcesStorage.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Storage/PackageCollectionsStorage.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Storage/SQLitePackageCollectionsStorage.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Storage/Trie.swift.o -o /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Utility.swift.o -index-store-path /home/dleng/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/index/store -index-system-modules
1.  Swift version 5.5 (swift-5.5-RELEASE)
2.  
3.  While evaluating request IRGenRequest(IR Generation for file "/home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/SQLitePackageCollectionsStorage.swift")
4.  While emitting IR SIL function "@$s18PackageCollections06SQLiteaB7StorageC13searchTargets11identifiers5query4type8callbackySayAA0aB5ModelO20CollectionIdentifierOGSg_SSAJ16TargetSearchTypeOys6ResultOyAJ0noQ0Vs5Error_pGctF05buildQ0L_yyFAJ0N8ListItemVAJ0N0V_SDy0aK00A8IdentityVShySaAaYRszlE0A7VersionVyAY_GGGtXEfU0_SaAaYRszlE0A0VyAY_GSgA2__A6_tXEfU_SbA5__A5_tcA5_mcfu_SbA5__A5_tcfu0_".
 for expression at [/home/dleng/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/SQLitePackageCollectionsStorage.swift:519:62 - line:519:62] RangeText=""
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x5a1fd93]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x5a1dc7e]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x5a20115]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f948ee8d3c0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f948e93418b]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f948e913859]
/lib/x86_64-linux-gnu/libc.so.6(+0x25729)[0x7f948e913729]
/lib/x86_64-linux-gnu/libc.so.6(+0x36f36)[0x7f948e924f36]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xa027ef]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x97e00c]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x97f27d]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x97e754]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x97e606]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xa93ec9]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xa944e7]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x97ba55]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xa93d1b]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xa902d7]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xb151eb]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xb13ca5]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xaf4252]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0xaf1aa4]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x9f5b0b]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x9281b6]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x951645]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x951599]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x935e1a]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x92b102]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x56c29a]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x56b588]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x55ed13]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x4b140e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f948e9150b3]
/home/dleng/swift/swift-5.5-RELEASE-ubuntu20.04/usr/bin/swift-frontend[0x4b104e]
[1/210] Compiling llvmSupport raw_ostream.cpp
ahoppen commented 2 years ago

I’m sorry that I only found this issue now. Since your JIRA username didn’t get mapped to a GitHub username, I suspect nobody would read the answer if I started investigating now. I’ll close the issue for now. If anyone is hitting this, please open a new issue.