You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just like Foundation used to do (apple/swift-corelibs-foundation#2608 SwiftPM fails to close the file descriptors before spawning child processes. This means that some file descriptors of swift-build are also available in the child processes, usually compilers.
Repro:
git clone https://github.com/apple/swift-nio && cd swift-nio && swift build -c release -j 1
then in a different terminal do
lsof -p $(pgrep swift-build)
to see the file descriptors open in swift-build. For me, this shows:
which seems a bit excessive that this file descriptor is shared between so many processes. Also note how it's file descriptor 3 and 4 for every process which is probably due to the fact that the fds are inherited through posix_spawn.
Additional Detail from JIRA
md5: cc250847758272db72425962ef116676
Issue Description:
Just like Foundation used to do (apple/swift-corelibs-foundation#2608 SwiftPM fails to close the file descriptors before spawning child processes. This means that some file descriptors of
swift-build
are also available in the child processes, usually compilers.Repro:
then in a different terminal do
to see the file descriptors open in
swift-build
. For me, this shows:Now, let's see who has access to for example the pipe with node
46206
: {{lsof | grep 46206}which seems a bit excessive that this file descriptor is shared between so many processes. Also note how it's file descriptor 3 and 4 for every process which is probably due to the fact that the fds are inherited through
posix_spawn
.--> https://twitter.com/krzyzanowskim/status/1232979379237638144
The text was updated successfully, but these errors were encountered: