Skip to content

[Source compatibility suite] swift-nio causing compiler crash on ubuntu x86 #64247

Open
@justice-adams-apple

Description

@justice-adams-apple

Describe the bug
swift-nio is failing to build for 5.0 due to a compiler crash. The output seen is

error: compile command failed due to signal 6 (use -v to see invocation)
Incorrect reconstructed type for $sxz_SDyS2iG_Sir__lXXD
Original type:
(sil_box_type type=<τ_0_0, τ_1_0> { var τ_0_0 } <Dictionary<Int, Int>, Int>)
Reconstructed type:
(sil_box_type type=<τ_0_0> { var τ_0_0 })
Generic signature: <τ_0_0 where τ_0_0 : EventLoop>
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0.	Program arguments: /usr/bin/swift-frontend -frontend -c <ARGS>
1.	Swift version 5.9-dev (LLVM 43db6a5b91dd225, Swift 43f0694fa3e0924)
2.	Compiling with the current language version
3.	While emitting IR SIL function "@$s7NIOCore15EventLoopFutureC5_fold_4withACyxGSayACyqd__GG_AFx_qd__tYbctlFyt_SiTg5012$s7NIOCore15bcd71C7_reduce4into_2on_ACyxGx_SayACyqd__GGAA0bC0_pyxz_qd__tYbctlFZACyytGyt_S22__tYbcfU_SDyS2iG_SiTG5AA0bC0_pxq_r0_lySDyS2iGSiIseghln_xz_AK_Sir__lXXTf1ncn_nTf4nnggg_nTf4nnenn_n".
 for <<debugloc at "<compiler-generated>":0:0>>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):
/usr/bin/swift-frontend[0x6ad0fa3]
/usr/bin/swift-frontend[0x6acebbe]
/usr/bin/swift-frontend[0x6ad130f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7fb889c99420]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7fb8890fb00b]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7fb8890da859]
/usr/bin/swift-frontend[0xcc815e]
/usr/bin/swift-frontend[0xcc87a7]
/usr/bin/swift-frontend[0xcc83a1]
/usr/bin/swift-frontend[0xcbf4dd]
/usr/bin/swift-frontend[0xcbffe9]
/usr/bin/swift-frontend[0xcda825]
/usr/bin/swift-frontend[0xcd9bcc]
/usr/bin/swift-frontend[0xb8833b]
/usr/bin/swift-frontend[0xa41550]
/usr/bin/swift-frontend[0x6a1b6c]
/usr/bin/swift-frontend[0x6a097c]
/usr/bin/swift-frontend[0x6b673e]
/usr/bin/swift-frontend[0x6a3a52]
/usr/bin/swift-frontend[0x4c4061]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fb8890dc083]
/usr/bin/swift-frontend[0x4c37ae]

Omitted arguments to keep this issue readable

This issue first occurred during the nightly run on Feb 28th. I was only able to reproduce the compiler crash when building for x86_64 on ubuntu.

Steps To Reproduce
Steps to reproduce the behavior:
1.) Download the Feb 28th docker image sha256:7a164f44c05b5d588d4ddd01162e7d8d8af75986d8c9d0de61960946f845a77d (x86_64)
2.) Clone https://github.com/apple/swift-nio and checkout 45167b8006448c79dda4b7bd604e07a034c15c49
3.) Run

build --disable-sandbox --package-path swift-nio --verbose --configuration release --build-tests -Xswiftc -swift-version -Xswiftc 5 -Xswiftc -enable-testing

...

Expected behavior
Expect the project to build correctly

Environment (please fill out the following information)
https://ci.swift.org/job/swift-source-compat-suite-ubuntu-2004/104/

Additional context
Swift version 5.9-dev (LLVM 43db6a5b91dd225, Swift 43f0694)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwaredemanglingArea → compiler: The `libswiftDemangling` librarygenericsFeature: generic declarations and typessource compatibility suiteFlag: An issue that surfaced in the source compatibility suiteswift 5.9

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions