Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-5226] LLDBFrontend crash in getTypeLoweringForUncachedLoweredType #4629

Closed
swift-ci opened this issue Jun 15, 2017 · 5 comments
Closed
Assignees
Labels
bug Something isn't working LLDB for Swift

Comments

@swift-ci
Copy link

Previous ID SR-5226
Radar rdar://problem/33296509
Original Reporter ewconnell (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Ubuntu 16.04, clean install

$ swift --version
Swift version 4.0-dev (LLVM 1a08ef2104, Clang e92999bccb, Swift 94e6b9d46c)
Target: x86_64-unknown-linux-gnu

Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug, LLDBCrash
Assignee @slavapestov
Priority Medium

md5: ce7e554e5e4d55e09a276fd6ba386252

Issue Description:

Builds of Swift 4.0 since the June 7th release crash LLDB when debugging with the following message:

LLDBFrontend: /home/buildnode/disk2/workspace/oss-swift-4.0-package-linux-ubuntu-16_04/swift/lib/SIL/TypeLowering.cpp:1693: const swift::Lowering::TypeLowering &swift::Lowering::TypeConverter::getTypeLoweringForUncachedLoweredType(swift::Lowering::TypeConverter::TypeKey): Assertion `key.SubstType->isLegalSILType() && "type is not already lowered"' failed.

It does not crash in my main test, but it crashes when debugging any of my other source files contained in my primary module that is imported by main.

Initially I can see the values of my local variables, but after about 1 - 2 seconds it asserts and exits.

I can't debug my project, so this is a blocking issue.

@belkadan
Copy link

Can you attach your project?

@swift-ci
Copy link
Author

Comment by Edward Connell (JIRA)

UPDATE I attached a simple repro case.

  1. build the project as HelloWorld (or whatever)
  2. then from the LLDB CLI, set a breakpoint on line 5, then examine outputData

$ lldb HelloWorld
(lldb) target create "HelloWorld"
Current executable set to 'HelloWorld' (x86_64).
(lldb) br se --file main.swift --line 5
Breakpoint 1: where = HelloWorld`HelloWorld.fetch(outputData: inout Swift.Optional<HelloWorld.SomeStruct>) -> () + 28 at main.swift:5, address = 0x0000000000400b6c
(lldb) r
Process 14669 launched: '/home/ed/CLionProjects/untitled1/.build/debug/HelloWorld' (x86_64)
Process 14669 stopped

  • thread [DON'T MERGE] Test pull request #1, name = 'HelloWorld', stop reason = breakpoint 1.1
    frame #0: 0x0000000000400b6c HelloWorld`fetch(outputData=some) at main.swift:5
    2
    3 func fetch(outputData: inout SomeStruct?) {
    4 outputData = SomeStruct()
    -> 5 }
    6
    7 var outData: SomeStruct?
    8
    Target 0: (HelloWorld) stopped.
    (lldb) fr var -O outputData
    lldb: /home/buildnode/disk2/workspace/oss-swift-4.0-package-linux-ubuntu-16_04/swift/lib/SIL/TypeLowering.cpp:1693: const swift::Lowering::TypeLowering &swift::Lowering::TypeConverter::getTypeLoweringForUncachedLoweredType(swift::Lowering::TypeConverter::TypeKey): Assertion `key.SubstType->isLegalSILType() && "type is not already lowered"' failed.
    Stack dump:
    0. HandleCommand(command = "fr var -O outputData")
    Aborted (core dumped)

@swift-ci
Copy link
Author

swift-ci commented Jul 4, 2017

Comment by Edward Connell (JIRA)

This still crashes LLDB with the Ubuntu 16.04 Swift 4.0 June 29th build. This is a blocking bug. Please please raise the priority on this. Thank you!

@slavapestov
Copy link
Member

@swift-ci create

@slavapestov
Copy link
Member

apple/swift-lldb#241

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 7, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working LLDB for Swift
Projects
None yet
Development

No branches or pull requests

3 participants