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-2136] LLDB asserting on missing glibc module: Ubuntu, master-next, build layout only #4515

Closed
trfiala mannequin opened this issue Jul 21, 2016 · 10 comments
Closed
Assignees
Labels
bug Something isn't working Linux LLDB for Swift

Comments

@trfiala
Copy link
Mannequin

trfiala mannequin commented Jul 21, 2016

Previous ID SR-2136
Radar rdar://problem/27459201
Original Reporter @trfiala
Type Bug
Status Closed
Resolution Done
Environment

swift-lldb/master-next branch, Ubuntu 16.04 x86_64, Ubuntu 14.04 x86_64. This happens only with the build layout of lldb/swift. It does not manifest when using the install layout of lldb and swift.

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

md5: 6e445793b80bac593e7606ca7900ace4

relates to:

  • SR-1300 LLDB REPL tests fail on Ubuntu when not run from install layout

Issue Description:

After merging LLVM.org LLDB trunk @r276079 into swift-lldb/master-next, we're getting an assert in many of the LLDB Swift tests here:

swift/lib/ClangImporter/ClangImporter.cpp:402: Assertion !GlibcModuleMapPath.empty() failed

It looks like we're not finding a resource dir to hand over to Swift when we create a clang importer as part of setting up a SwiftASTContext for each module. This might be a temporal issue where we would have found it later.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Jul 21, 2016

I'm going to grab this since the most likely candidate for addressing is out this week.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Jul 21, 2016

The backtrace for the assert looks like this when running one of the Python-driven LLDB tests against a Swift test subject:

(lldb) thread list
Process 18364 stopped

The issue happens when the test is trying to resolve a breakpoint address by location, and in the process enumerates the swift modules, which creates the SwiftASTContexts, each of which creates a clang module importer, which then gets angry because we haven't told it where to find glibc.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Jul 21, 2016

The LLDB test suite uses LLDB and Swift out of the build dir configuration — i.e. not the final install layout. I'm checking with a full package build install layout to see if the behavior is different. This might end up being the same root cause that led to me turning off the in-tree REPL tests on Linux several weeks ago. If they are the same, it would be good to fix that.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Jul 21, 2016

> The LLDB test suite uses LLDB and Swift out of the build dir configuration — i.e. not the final install layout. I'm checking with a full package build install layout to see if the behavior is different.

That hunch was correct. The LLDB Swift tests all pass when using the install-layout version of lldb. This seems to imply our resource dir lookup logic is not adequate on Linux when attempting to run lldb out of the build dir to either (1) use the repl or (2) debug a Swift program. Our test suite really depends on running in a build-style layout, so this is going to be important to address.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Jul 21, 2016

This issue seems to have the same underlying cause as SR-1300.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Jul 21, 2016

The work-around here is to use an install-layout lldb and not try to use it directly out of the build dir.

Meanwhile, I'm going to see if I can get a real solution to this.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Jul 21, 2016

I managed to make a fix for this. I'm going to run it through a PR after I do a bit more local testing.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Jul 21, 2016

I have a PR testing this fix on swift-lldb/master-next now:
apple/swift-lldb#36

Once I have that tested and submitted successfully, I'll pull this back into swift-lldb/master, and possibly further.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Jul 21, 2016

This is working in the swift-lldb/master-next branch, as witnessed in this Ubuntu 15.10 x86_64 build:
https://ci.swift.org/view/swift-master-next/job/oss-lldb-incremental-linux-ubuntu-15_10-master-next/30/

It was developed on Ubuntu 16.04 x86_64, so works there as well. I'm waiting on the Ubuntu 14.04 x86_64 builder to work through it. Once those are clear, I'll get this in swift-lldb/master.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Sep 16, 2016

This was fixed a while back.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from swiftlang/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 Linux LLDB for Swift
Projects
None yet
Development

No branches or pull requests

0 participants