-
Notifications
You must be signed in to change notification settings - Fork 333
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
Comments
I'm going to grab this since the most likely candidate for addressing is out this week. |
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
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. |
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. |
> 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. |
This issue seems to have the same underlying cause as SR-1300. |
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. |
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. |
I have a PR testing this fix on swift-lldb/master-next now: Once I have that tested and submitted successfully, I'll pull this back into swift-lldb/master, and possibly further. |
This is working in the swift-lldb/master-next branch, as witnessed in this Ubuntu 15.10 x86_64 build: 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. |
This was fixed a while back. |
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
md5: 6e445793b80bac593e7606ca7900ace4
relates to:
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.
The text was updated successfully, but these errors were encountered: