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-14373] lldb on Linux from main branch always crashes immediately with Assertion `Val && "isa<> used on a null pointer"' failed. #4315

Open
weissi opened this issue Mar 19, 2021 · 2 comments
Labels
bug Something isn't working Crash LLDB for Swift

Comments

@weissi
Copy link
Member

weissi commented Mar 19, 2021

Previous ID SR-14373
Radar rdar://problem/75621715
Original Reporter @weissi
Type Bug
Environment
Swift version 5.4-dev (LLVM 5f17b63a89d10af, Swift bdacb68b83b67b8)
Target: x86_64-unknown-linux-gnu
Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug, Crash, linux
Assignee None
Priority Medium

md5: c83009bf1e2de031466fbf97e49fa9f7

Issue Description:

Repro

This should work on a Mac.

mac$ git clone https://github.com/weissi/swift-nio
mac$ git checkout jw-asyncawait
mac$ docker run -it --rm --privileged -w "$PWD" -v "$PWD:$PWD" swiftlang/swift:nightly-main-bionic

docker$ swift build -Xswiftc -Xfrontend -Xswiftc -enable-experimental-concurrency
docker$ lldb .build/x86_64-unknown-linux-gnu/debug/NIOAsyncAwaitDemo

(lldb) break set -f main.swift -l 38
(lldb) break set -f main.swift -l 45
(lldb) break set -f main.swift -l 47
(lldb) break set -f main.swift -l 52
(lldb) break set -f main.swift -l 55

(lldb) run
(lldb) bt

Expected

backtrace

Actual

(lldb) run
Process 221 launched: '/Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/NIOAsyncAwaitDemo' (x86_64)
Process 221 stopped
* thread #&#8203;3, name = 'NIOAsyncAwaitDe', stop reason = breakpoint 1.1
    frame #&#8203;0: 0x0000555555713225 NIOAsyncAwaitDemo`main() at main.swift:38:15
   35   func main() async {
   36       do {
   37           let channel = try await makeHTTPChannel(host: "httpbin.org", port: 80)
-> 38           print("OK, connected to \(channel)")
   39   
   40           print("Sending request 1", terminator: "")
   41           let response1 = try await channel.sendRequest(HTTPRequestHead(version: .http1_1,
Target 1: (NIOAsyncAwaitDemo) stopped.
(lldb) bt
warning: (x86_64) /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/NIOAsyncAwaitDemo 0x00007c61: Module /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/ModuleCache/21W7O8BKIMLPP/CNIOLinux-2B1XW2SH7FMQ7.pcm is out-of-date (hash mismatch). Type information from this module may be incomplete or inconsistent with the rest of the program. Rebuilding the project will regenerate the needed module files.
warning: (x86_64) /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/NIOAsyncAwaitDemo 0x00007c8b: Module /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/ModuleCache/21W7O8BKIMLPP/Dispatch-1MKLX15782NIB.pcm is out-of-date (hash mismatch). Type information from this module may be incomplete or inconsistent with the rest of the program. Rebuilding the project will regenerate the needed module files.
warning: (x86_64) /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/NIOAsyncAwaitDemo 0x00009dc6: Module /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/ModuleCache/21W7O8BKIMLPP/SwiftGlibc-1DO298432GENU.pcm is out-of-date (hash mismatch). Type information from this module may be incomplete or inconsistent with the rest of the program. Rebuilding the project will regenerate the needed module files.
warning: (x86_64) /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/NIOAsyncAwaitDemo 0x0000b40e: Module /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/ModuleCache/21W7O8BKIMLPP/SwiftGlibc-1DO298432GENU.pcm is out-of-date (hash mismatch). Type information from this module may be incomplete or inconsistent with the rest of the program. Rebuilding the project will regenerate the needed module files.
warning: (x86_64) /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/NIOAsyncAwaitDemo 0x0007460f: Module /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/ModuleCache/21W7O8BKIMLPP/CNIOAtomics-2C3ET3BDNTJTE.pcm is out-of-date (hash mismatch). Type information from this module may be incomplete or inconsistent with the rest of the program. Rebuilding the project will regenerate the needed module files.
warning: (x86_64) /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/NIOAsyncAwaitDemo 0x0007a909: Module /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/ModuleCache/21W7O8BKIMLPP/SwiftOverlayShims-1KFO504FT44T.pcm is out-of-date (hash mismatch). Type information from this module may be incomplete or inconsistent with the rest of the program. Rebuilding the project will regenerate the needed module files.
warning: (x86_64) /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/NIOAsyncAwaitDemo 0x0007b0e1: Module /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux-gnu/debug/ModuleCache/21W7O8BKIMLPP/CNIOHTTPParser-1MXR9LJ3A513M.pcm is out-of-date (hash mismatch). Type information from this module may be incomplete or inconsistent with the rest of the program. Rebuilding the project will regenerate the needed module files.
lldb: /home/buildnode/jenkins/workspace/oss-swift-package-linux-ubuntu-18_04/llvm-project/llvm/include/llvm/Support/Casting.h:104: static bool llvm::isa_impl_cl<lldb_private::SwiftASTContext, const lldb_private::TypeSystem *>::doit(const From *) [To = lldb_private::SwiftASTContext, From = const lldb_private::TypeSystem *]: Assertion `Val && "isa<> used on a null pointer"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.  Program arguments: lldb .build/x86_64-unknown-linux-gnu/debug/NIOAsyncAwaitDemo
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):
lldb[0x431303]
lldb[0x42f3ee]
lldb[0x43192c]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7f7531184980]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f7525cdffb7]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f7525ce1921]
/lib/x86_64-linux-gnu/libc.so.6(+0x3048a)[0x7f7525cd148a]
/lib/x86_64-linux-gnu/libc.so.6(+0x30502)[0x7f7525cd1502]
/usr/bin/../lib/liblldb.so.10git(+0x14e3783)[0x7f7528707783]
/usr/bin/../lib/liblldb.so.10git(+0x14ec6f0)[0x7f75287106f0]
/usr/bin/../lib/liblldb.so.10git(+0x102350b)[0x7f752824750b]
/usr/bin/../lib/liblldb.so.10git(+0xf65725)[0x7f7528189725]
/usr/bin/../lib/liblldb.so.10git(+0xf64dbe)[0x7f7528188dbe]
/usr/bin/../lib/liblldb.so.10git(+0xf8672f)[0x7f75281aa72f]
/usr/bin/../lib/liblldb.so.10git(+0x12eb443)[0x7f752850f443]
/usr/bin/../lib/liblldb.so.10git(+0xf271e5)[0x7f752814b1e5]
/usr/bin/../lib/liblldb.so.10git(+0xf26a03)[0x7f752814aa03]
/usr/bin/../lib/liblldb.so.10git(+0xf26a03)[0x7f752814aa03]
/usr/bin/../lib/liblldb.so.10git(+0xf265cc)[0x7f752814a5cc]
/usr/bin/../lib/liblldb.so.10git(+0x10b0361)[0x7f75282d4361]
/usr/bin/../lib/liblldb.so.10git(+0x10b0a55)[0x7f75282d4a55]
/usr/bin/../lib/liblldb.so.10git(+0x10b5b18)[0x7f75282d9b18]
/usr/bin/../lib/liblldb.so.10git(+0x10f0770)[0x7f7528314770]
/usr/bin/../lib/liblldb.so.10git(+0x16a0c33)[0x7f75288c4c33]
/usr/bin/../lib/liblldb.so.10git(+0x16a90ee)[0x7f75288cd0ee]
/usr/bin/../lib/liblldb.so.10git(+0xff4368)[0x7f7528218368]
/usr/bin/../lib/liblldb.so.10git(+0xfea1b9)[0x7f752820e1b9]
/usr/bin/../lib/liblldb.so.10git(+0x1671d66)[0x7f7528895d66]
/usr/bin/../lib/liblldb.so.10git(+0xff461e)[0x7f752821861e]
/usr/bin/../lib/liblldb.so.10git(+0xfea1b9)[0x7f752820e1b9]
/usr/bin/../lib/liblldb.so.10git(+0xfedf0a)[0x7f7528211f0a]
/usr/bin/../lib/liblldb.so.10git(+0xf2f281)[0x7f7528153281]
/usr/bin/../lib/liblldb.so.10git(+0xf11296)[0x7f7528135296]
/usr/bin/../lib/liblldb.so.10git(+0xfef77d)[0x7f752821377d]
/usr/bin/../lib/liblldb.so.10git(_ZN4lldb10SBDebugger21RunCommandInterpreterEbb+0xf7)[0x7f7527de4017]
lldb[0x40a9ac]
lldb[0x40ce9a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f7525cc2bf7]
lldb[0x40702a]
********************
Crash reproducer for lldb version 10.0.0 (git@github.com:apple/llvm-project.git revision 5f17b63a89d10af44cbe3ae43a77dee9003ceb42)
Swift version 5.4-dev (LLVM 5f17b63a89d10af, Swift bdacb68b83b67b8)

Reproducer written to '/tmp/reproducer-3f1184'

Before attaching the reproducer to a bug report:
 - Look at the directory to ensure you're willing to share its content.
 - Make sure the reproducer works by replaying the reproducer.

Replay the reproducer with the following command:
lldb -replay /tmp/reproducer-3f1184
********************
Aborted
@weissi
Copy link
Member Author

weissi commented Mar 19, 2021

@swift-ci create

@weissi
Copy link
Member Author

weissi commented Mar 19, 2021

will attach the reproducer to the radar, too big for here (30 mb)

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

No branches or pull requests

1 participant