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-11929] Linker exhausts file descriptors on Linux easily and without suggested remedy #54348

Open
swift-ci opened this issue Dec 8, 2019 · 6 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Dec 8, 2019

Previous ID SR-11929
Radar rdar://problem/57746967
Original Reporter mmfl (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 4
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 3f8e08ed8a14a99c25d33ad699b3051d

Issue Description:

This issue was discussed in https://forums.swift.org/t/linker-error-on-ubuntu-18-04-swift-5-1-2/31168.

When building a "large" Swift project on Linux such as https://github.com/finlabsuk/open-banking-connector it seems the following error is produced on linking:

swift build /usr/bin/ld.gold: fatal error: out of file descriptors and couldn't close any clang-7: error: linker command failed with exit code 1 (use -v to see invocation) :0: error: link command failed with exit code 1 (use -v to see invocation) [0/1] Linking ProjectName

The issue is reproducible with the above-mentioned project on Swift 5.1.2 / Ubuntu 18.04 (build instructions here: https://github.com/finlabsuk/open-banking-connector/blob/master/docs/installation-and-use.md).

Analysis (https://forums.swift.org/t/linker-error-on-ubuntu-18-04-swift-5-1-2/31168/8) suggests the cause is related to the compiler producing a high number of output files per input files which might be reducible. In any case an actionable error message would be helpful as this situation seems to arise quite easily.

@weissi
Copy link
Member

weissi commented Dec 9, 2019

@swift-ci create

@beccadax
Copy link
Contributor

@aciidb0mb3r Is it SwiftPM that decides to link all of these together in a single job?

@ankitspd
Copy link
Member

Yup

@swift-ci
Copy link
Collaborator Author

swift-ci commented May 1, 2020

Comment by Matthieu Barthelemy (JIRA)

I'm hitting this one all the time now. Swift 5.2.2, Ubuntu 18.04

@weissi
Copy link
Member

weissi commented May 1, 2020

This could also be made worse by https://bugs.swift.org/browse/SR-12292

@swift-ci
Copy link
Collaborator Author

Comment by Nicole Stone (JIRA)

Is there a workaround for this? Also experiencing this with Swift 5.5.3 on Al2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

4 participants