Uploaded image for project: 'Swift'
  1. Swift
  2. SR-11746

lldb on Linux (Swift 5.1.2): lldb crash with {{e ev}}

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Component/s: LLDB for Swift
    • Labels:

      Description

      Description

      When running the following 1 liner (runnable from macOS (with Docker for Mac installed) or Linux) I get an lldb crash.

      cd /tmp && rm -rf swift-nio && git clone https://github.com/apple/swift-nio && cd swift-nio && git reset --hard f548a29a27d7e533f1714d2d282ca0d79f6086dd && docker run -it --rm -v "$PWD:$PWD" -w "$PWD" swift:5.1.2 swift build --build-tests && docker run -it --rm -v "$PWD:$PWD" -w "$PWD" --privileged swift:5.1.2 lldb  .build/debug/swift-nioPackageTests.xctest
      

      which can also be broken into multiple lines:

      cd /tmp
      rm -rf swift-nio
      git clone https://github.com/apple/swift-nio
      cd swift-nio
      git reset --hard f548a29a27d7e533f1714d2d282ca0d79f6086dd
      docker run -it --rm -v "$PWD:$PWD" -w "$PWD" swift:5.1.2 swift build --build-tests
      docker run -it --rm -v "$PWD:$PWD" -w "$PWD" --privileged swift:5.1.2 lldb  .build/debug/swift-nioPackageTests.xctest
      

      once lldb is started, please type

      (lldb) break set -f EventLoop.swift -l 857         # ignore the Unable to load module. warning
      (lldb) run NIOTests.ChannelTests/testHalfClosure
      

      Once lldb has hit the breakpoint, run

      (lldb) e ev
      

      and you'll see the output

      (lldb) e ev
      lldb[0x41f9f4]
      lldb[0x41da3c]
      lldb[0x41ff88]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7fca1a88c890]
      /usr/bin/../lib/liblldb.so.7svn(+0xbcd241)[0x7fca13c63241]
      /usr/bin/../lib/liblldb.so.7svn(+0xde73f3)[0x7fca13e7d3f3]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5ba0e)[0x7fca13af1a0e]
      /usr/bin/../lib/liblldb.so.7svn(+0xa255f1)[0x7fca13abb5f1]
      /usr/bin/../lib/liblldb.so.7svn(+0xa25530)[0x7fca13abb530]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5f029)[0x7fca13af5029]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5e898)[0x7fca13af4898]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5df38)[0x7fca13af3f38]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5fb34)[0x7fca13af5b34]
      /usr/bin/../lib/liblldb.so.7svn(+0xa60017)[0x7fca13af6017]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5edbe)[0x7fca13af4dbe]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5df54)[0x7fca13af3f54]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5fb34)[0x7fca13af5b34]
      /usr/bin/../lib/liblldb.so.7svn(+0xa60017)[0x7fca13af6017]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5edbe)[0x7fca13af4dbe]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5df54)[0x7fca13af3f54]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5fb34)[0x7fca13af5b34]
      /usr/bin/../lib/liblldb.so.7svn(+0xa60017)[0x7fca13af6017]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5edbe)[0x7fca13af4dbe]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5df54)[0x7fca13af3f54]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5fb34)[0x7fca13af5b34]
      /usr/bin/../lib/liblldb.so.7svn(+0xa60017)[0x7fca13af6017]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5edbe)[0x7fca13af4dbe]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5df54)[0x7fca13af3f54]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5fb34)[0x7fca13af5b34]
      /usr/bin/../lib/liblldb.so.7svn(+0xa60017)[0x7fca13af6017]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5edbe)[0x7fca13af4dbe]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5df54)[0x7fca13af3f54]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5fb34)[0x7fca13af5b34]
      /usr/bin/../lib/liblldb.so.7svn(+0xa60017)[0x7fca13af6017]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5edbe)[0x7fca13af4dbe]
      /usr/bin/../lib/liblldb.so.7svn(+0xa5df54)[0x7fca13af3f54]
      /usr/bin/../lib/liblldb.so.7svn(+0xa2bb45)[0x7fca13ac1b45]
      /usr/bin/../lib/liblldb.so.7svn(+0x10a8671)[0x7fca1413e671]
      /usr/bin/../lib/liblldb.so.7svn(+0x10a92d4)[0x7fca1413f2d4]
      /usr/bin/../lib/liblldb.so.7svn(+0xaa513e)[0x7fca13b3b13e]
      /usr/bin/../lib/liblldb.so.7svn(+0xa9c1a5)[0x7fca13b321a5]
      /usr/bin/../lib/liblldb.so.7svn(+0xa9fc0b)[0x7fca13b35c0b]
      /usr/bin/../lib/liblldb.so.7svn(+0x9df661)[0x7fca13a75661]
      /usr/bin/../lib/liblldb.so.7svn(+0x9c3bf6)[0x7fca13a59bf6]
      /usr/bin/../lib/liblldb.so.7svn(+0xaa0ab6)[0x7fca13b36ab6]
      /usr/bin/../lib/liblldb.so.7svn(_ZN4lldb10SBDebugger21RunCommandInterpreterEbb+0xe6)[0x7fca137ecde6]
      lldb[0x40a105]
      lldb[0x40b337]
      /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7fca11b34b97]
      lldb[0x40673a]
      Stack dump:
      0.	Program arguments: lldb .build/debug/swift-nioPackageTests.xctest 
      

        Attachments

          Activity

            People

            Assignee:
            augusto2112 Augusto Noronha
            Reporter:
            jw Johannes Weiss
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: