swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.57k stars 10.36k forks source link

[SR-14615] compiler crash on linux when compiling sourcekit-lsp #56967

Open swift-ci opened 3 years ago

swift-ci commented 3 years ago
Previous ID SR-14615
Radar rdar://problem/77853083
Original Reporter cukier (JIRA User)
Type Bug
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: bf3d4efaad24986a1b1151de3b5c7613

Issue Description:

When compiling sourcekit-lsp on a fresh Ubuntu install, with only the swift requirements, vscode, sqlite libtinfo5 and libncurses5 installed, I'm getting compilation error. I can send the virtual machine snapshot here if you want.

cukier@cukier-VirtualBox:~/Desktop/sourcekit-lsp$ swift build -Xcxx -I/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/lib/swift -Xcxx -I/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/lib/swift/Blockcukier@cukier-VirtualBox:~/Desktop/sourcekit-lsp$ swift build -Xcxx -I/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/lib/swift -Xcxx -I/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/lib/swift/Blockswift-frontend: /home/build-user/swift/lib/IRGen/GenDecl.cpp:3981: 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/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend -frontend -c -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/API.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Model/CVE.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Model/Collection.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Model/License.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Model/Package.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Model/Search.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Model/TargetListResult.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/PackageCollections+CertificatePolicy.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/PackageCollections+Configuration.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/PackageCollections+Storage.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/PackageCollections+Validation.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/PackageCollections.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Providers/GitHubPackageMetadataProvider.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Providers/JSONPackageCollectionProvider.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Providers/PackageCollectionProvider.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Providers/PackageMetadataProvider.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/FilePackageCollectionsSourcesStorage.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/PackageCollectionsSourcesStorage.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/PackageCollectionsStorage.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/SQLitePackageCollectionsStorage.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/Trie.swift -primary-file /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Utility.swift -supplementary-output-file-map /tmp/supplementaryOutputs-ae2df1 -target x86_64-unknown-linux-gnu -disable-objc-interop -I /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug -color-diagnostics -enable-testing -g -module-cache-path /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/ModuleCache -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollectionsSigningLibc/include/module.modulemap -Xcc -I -Xcc /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollectionsSigningLibc/include -Xcc -fmodule-map-file=/home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-crypto/Sources/CCryptoBoringSSLShims/include/module.modulemap -Xcc -I -Xcc /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-crypto/Sources/CCryptoBoringSSLShims/include -Xcc -fmodule-map-file=/home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-crypto/Sources/CCryptoBoringSSL/include/module.modulemap -Xcc -I -Xcc /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-crypto/Sources/CCryptoBoringSSL/include -Xcc -fmodule-map-file=/home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-tools-support-core/Sources/TSCclibc/include/module.modulemap -Xcc -I -Xcc /home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-tools-support-core/Sources/TSCclibc/include -parse-as-library -module-name PackageCollections -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/API.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Model/CVE.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Model/Collection.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Model/License.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Model/Package.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Model/Search.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Model/TargetListResult.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/PackageCollections+CertificatePolicy.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/PackageCollections+Configuration.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/PackageCollections+Storage.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/PackageCollections+Validation.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/PackageCollections.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Providers/GitHubPackageMetadataProvider.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Providers/JSONPackageCollectionProvider.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Providers/PackageCollectionProvider.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Providers/PackageMetadataProvider.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Storage/FilePackageCollectionsSourcesStorage.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Storage/PackageCollectionsSourcesStorage.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Storage/PackageCollectionsStorage.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Storage/SQLitePackageCollectionsStorage.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Storage/Trie.swift.o -o /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/PackageCollections.build/Utility.swift.o -index-store-path /home/cukier/Desktop/sourcekit-lsp/.build/x86_64-unknown-linux-gnu/debug/index/store -index-system-modules1. Swift version 5.5-dev (LLVM 4baaaa7a0e899cf, Swift c24b693e8cf9bc9)2. While evaluating request IRGenRequest(IR Generation for file "/home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/SQLitePackageCollectionsStorage.swift")3. While emitting IR SIL function "@$s18PackageCollections06SQLiteaB7StorageC13searchTargets11identifiers5query4type8callbackySayAA0aB5ModelO20CollectionIdentifierOGSg_SSAJ16TargetSearchTypeOys6ResultOyAJ0noQ0Vs5Error_pGctFyARySayAJ0L0VGsAU_pGcfU_AJ0N8ListItemVAJ0N0V_SDy0aK00A8IdentityVShySaAAA0_RszlE0A7VersionVyA0__GGGtXEfU8_SaAAA0_RszlE0A0VyA0__GSgA5__A9_tXEfU_SbA8__A8_tcA8_mcfu_SbA8__A8_tcfu0_". for expression at [/home/cukier/Desktop/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageCollections/Storage/SQLitePackageCollectionsStorage.swift:595:66 - line:595:66] 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/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x5a11b03]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x5a0f9ee]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x5a11e85]/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7fce0cacb3c0]/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7fce0c57318b]/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7fce0c552859]/lib/x86_64-linux-gnu/libc.so.6(+0x25729)[0x7fce0c552729]/lib/x86_64-linux-gnu/libc.so.6(+0x36f36)[0x7fce0c563f36]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x9fd71f]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x9795dc]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x97a84d]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x979d24]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x979bd6]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0xa8ea99]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0xa8f0b7]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x977025]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0xa8e8eb]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0xa8aea7]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0xb0eedb]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0xb0d9ea]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0xaee412]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0xaebc60]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x9f0b6b]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x923836]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x94cc75]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x94cbc9]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x9314ba]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x926782]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x569086]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x568348]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x55b9cf]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x4acf5e]/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fce0c5540b3]/home/cukier/Desktop/swift-DEVELOPMENT-SNAPSHOT-2021-05-05-a-ubuntu20.04/usr/bin/swift-frontend[0x4acb9e]
typesanitizer commented 3 years ago

@swift-ci create

MaxDesiatov commented 2 years ago

cukier (JIRA User) is this still reproducible for you with the latest stable or snapshot version of Swift?