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-11745] lldb for Linux on Swift 5.1.2: warning: Swift error in fallback scratch context: error: missing required module 'CNIOAtomics' #4436

Open
weissi opened this issue Nov 9, 2019 · 2 comments
Labels
bug Something isn't working LLDB for Swift

Comments

@weissi
Copy link
Member

weissi commented Nov 9, 2019

Previous ID SR-11745
Radar rdar://problem/57049271
Original Reporter @weissi
Type Bug
Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug
Assignee None
Priority Medium

md5: d42a94e7c72c408358acd9932600609c

Issue Description:

Description

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

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) po ev

and you'll see the output

warning: Swift error in fallback scratch context: error: missing required module 'CNIOAtomics'


note: This error message is displayed only once. If the error displayed above is due to conflicting search paths to Clang modules in different images of the debugged executable, this can slow down debugging of Swift code significantly, since a fresh Swift context has to be created every time a conflict is encountered.

Unable to load module.
Unable to load module.
▿ SelectorEvent<NIORegistration>
  ▿ registration : NIORegistration
    ▿ socketChannel : 2 elements
      ▿ .0 : SocketChannel { socket fd: 7, localAddress = Optional([IPv4]127.0.0.1/127.0.0.1:45650), remoteAddress = nil }
      ▿ .1 : SelectorEventSet
        - rawValue : 9
  ▿ io : SelectorEventSet
    - rawValue : 8

To be honest, I'm quite happy with this output, however the warning

warning: Swift error in fallback scratch context: error: missing required module 'CNIOAtomics'

is probably not good news if debugging something in CNIOAtomics.

@weissi
Copy link
Member Author

weissi commented Nov 9, 2019

@swift-ci create

@weissi
Copy link
Member Author

weissi commented Nov 9, 2019

CC @dcci / @adrian-prantl / friss (JIRA User)

@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 LLDB for Swift
Projects
None yet
Development

No branches or pull requests

1 participant