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-15677] LLDB crashes when viewing frame in SwiftNIO code #4299
Comments
@swift-ci create |
I reproduce this with 5.5
Before it crashes however, it spins at 100% CPU for maybe a minute. CC @adrian-prantl/friss (JIRA User)/@dcci |
This appears to be fixed in the latest nightly, but is still unresolved in the 5.5 nightly. Is there a chance the fix can be brought across to the 5.5 branch? |
Unfortunately the amount of changes between 5.5 and 5.6 branch are quite large, so backporting a fix is likely too risky. Can you attach lldb to lldb to capture a backtrace so we can identify what the crash was? (It's probably faster for you to do this than me building 5.5 and getting SwiftNIO to build) |
Shame I was hoping maybe someone might recognise what change fixed this. I'll see if I can find some time to do the lldb attaching to lldb. Not sure I'd be much faster than you though as my experience of lldb is minimal. |
@adam-fowler attaching in LLDB 1 do (copying your steps)
then get a new terminal and run another LLDB (LLDB 2)
Now back in LLDB 1 do (copying your steps)
and once you hit the crash, LLDB 2 should've stopped. There you could run maybe
and attach the info here. |
Actually, I repro too. I can attach that. |
@adrian-prantl there you go
|
Thanks @weissi |
Thanks Johannes! Since this is just the `assert(false && "Unhandled node kind");` I can create a patch to remove this assertion. There's no risk in taking that. |
Verified as working in 5.5.3 |
Environment
Ubuntu 20_04.3 LTS
Swift version 5.5 (swift-5.5-RELEASE)
Target: x86_64-unknown-linux-gnu
lldb version 10.0.0 (git@github.com:apple/llvm-project.git revision fbf0080)
Additional Detail from JIRA
md5: 9069b6ef67050ae4d6d41a2d41ea1055
Issue Description:
When viewing the frame with `fr v` in functions with `NIOAny` as a parameter the swift version of LLDB crashes.
Replication steps:
It is possible to replicate this using a swift-nio example
Build swift-nio (swift build)
Debug NIOHTTP1Server example (lldb .build/debug/NIOHTTP1Server)
Add breakpoint (b HTTPHandler.channelRead)
run
Outside LLDB run curl [::1]:8888
Return to lldb, when you hit the breakpoint enter `fr v`
LLDB should then crash.
This issue is making it hard to debug any SwiftNIO code in Visual Studio Code with the CodeLLDB extension on Linux.
The text was updated successfully, but these errors were encountered: