Skip to content

Trunk linux snapshots are crashing when building a NIO test #69505

Closed
@finagolfin

Description

@finagolfin

Description
Starting with the Oct. 28 trunk snapshot, the NIO tests cause this compiler crash:

Building for debugging...
error: compile command failed due to signal 6 (use -v to see invocation)
swift-frontend: /home/build-user/swift/lib/SIL/IR/SILArgument.cpp:89: swift::SILArgumentConvention swift::SILFunctionConventions::getSILArgumentConvention(unsigned int) const: Assertion `index < getNumSILArguments()' failed.
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0.      Program arguments: /home/foo/swift-DEVELOPMENT-SNAPSHOT-2023-10-28-a-ubuntu20.04/usr/bin/swift-frontend -frontend -c -primary-file /home/foo/swift-nio/Tests/NIOBase64Tests/Base64Test.swift -emit-dependencies-path /home/foo/swift-nio/.build/x86_64-unknown-linux-gnu/debug/NIOBase64Tests.build/Base64Test.d -emit-reference-dependencies-path /home/foo/swift-nio/.build/x86_64-unknown-linux-gnu/debug/NIOBase64Tests.build/Base64Test.swiftdeps -target x86_64-unknown-linux-gnu -disable-objc-interop -I /home/foo/swift-nio/.build/x86_64-unknown-linux-gnu/debug -color-diagnostics -enable-testing -g -module-cache-path /home/foo/swift-nio/.build/x86_64-unknown-linux-gnu/debug/ModuleCache -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -new-driver-path /home/foo/swift-DEVELOPMENT-SNAPSHOT-2023-10-28-a-ubuntu20.04/usr/bin/swift-driver -empty-abi-descriptor -resource-dir /home/foo/swift-DEVELOPMENT-SNAPSHOT-2023-10-28-a-ubuntu20.04/usr/lib/swift -enable-anonymous-context-mangled-names -Xcc -fPIC -Xcc -g -module-name NIOBase64Tests -plugin-path /home/foo/swift-DEVELOPMENT-SNAPSHOT-2023-10-28-a-ubuntu20.04/usr/lib/swift/host/plugins -plugin-path /home/foo/swift-DEVELOPMENT-SNAPSHOT-2023-10-28-a-ubuntu20.04/usr/local/lib/swift/host/plugins -parse-as-library -o /home/foo/swift-nio/.build/x86_64-unknown-linux-gnu/debug/NIOBase64Tests.build/Base64Test.swift.o -index-store-path /home/foo/swift-nio/.build/x86_64-unknown-linux-gnu/debug/index/store -index-system-modules
1.      Swift version 5.11-dev (LLVM 26ea15ae72ba6e9, Swift 7e4fa781ea27c47)
2.      Compiling with the current language version
3.      While evaluating request ASTLoweringRequest(Lowering AST to SIL for file "/home/foo/swift-nio/Tests/NIOBase64Tests/Base64Test.swift")
4.      While silgen emitFunction SIL function "@$s14NIOBase64Tests10Base64TestC04testC21DecodingOfEmptyStringyyKF".
 for 'testBase64DecodingOfEmptyString()' (at /home/foo/swift-nio/Tests/NIOBase64Tests/Base64Test.swift:31:5)
5.      While silgen closureexpr SIL function "@$s14NIOBase64Tests10Base64TestC04testC21DecodingOfEmptyStringyyKFyyKcyKXEfu_".
 for expression at [/home/foo/swift-nio/Tests/NIOBase64Tests/Base64Test.swift:33:26 - line:36:9] RangeText="{
            let decoded = try encoded.base64Decoded()
            XCTAssertEqual(decoded, [UInt8]())
        "
6.      While silgen closureexpr SIL function "@$s14NIOBase64Tests10Base64TestC04testC21DecodingOfEmptyStringyyKFyyKcyKXEfu_yyKcfU_".
 for expression at [/home/foo/swift-nio/Tests/NIOBase64Tests/Base64Test.swift:33:26 - line:36:9] RangeText="{
            let decoded = try encoded.base64Decoded()
            XCTAssertEqual(decoded, [UInt8]())
        "

This was first surfaced by my daily Android CI.

Steps to reproduce
../swift-DEVELOPMENT-SNAPSHOT-2023-10-28-a-ubuntu20.04/usr/bin/swift test

Expected behavior
All NIO tests to build and pass, as they do with the Oct. 27 trunk snapshot.

Environment

  • Swift 5.11 Oct. 28 trunk snapshot compiler for Ubuntu 20.04 and 22.04 x86_64

Additional context
It is reproducible with the latest Oct. 29 trunk snapshot also, so the problem hasn't gone away. @slavapestov, I see you made a bunch of SIL changes on that day, maybe you know what's going on.

@shahmishal, I notice you reported the same error with BricBrac in #69485 yesterday, could be related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions