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-14081] Assertion failure with -enable-experimental-concurrency: (numClosures < prevNumClosures && "Cyclic closures scopes") #56470

Closed
ZPedro opened this issue Jan 21, 2021 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself concurrency Feature: umbrella label for concurrency language features crash Bug: A crash, i.e., an abnormal termination of software SILOptimizer Area → compiler: SIL optimization passes swift 5.4

Comments

@ZPedro
Copy link

ZPedro commented Jan 21, 2021

Previous ID SR-14081
Radar None
Original Reporter @ZPedro
Type Bug
Status Closed
Resolution Cannot Reproduce

Attachment: Download

Environment

Mac OS X 10.15.7 (19H114)

Xcode Version 12.3 (12C33)

swift-DEVELOPMENT-SNAPSHOT-2021-01-19-a-osx.pkg

Hardware Overview:

Model Name: MacBook Pro

Model Identifier: MacBookPro13,1

Processor Name: Dual-Core Intel Core i5

Processor Speed: 2 GHz

Number of Processors: 1

Total Number of Cores: 2

L2 Cache (per Core): 256 KB

L3 Cache: 4 MB

Hyper-Threading Technology: Enabled

Memory: 8 GB

Boot ROM Version: 429.60.3.0.0

SMC Version (system): 2.36f101

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 379f705bfd0c5e6a2908b75e3accedaa

Issue Description:

When attempting to use features from https://github.com/apple/swift-evolution/blob/main/proposals/0296-async-await.md and https://github.com/DougGregor/swift-evolution/blob/structured-concurrency/proposals/nnnn-structured-concurrency.md with a complex scenario including a task group, I get an assertion failure (attached log file). As indicated in the log file, this is with development snapshot 2021-01-19, but I get the same outcome with 5.4 development snapshot 2021-01-11. Xcode project file is attached, though it is likely reproductible outside of Xcode, and ought not to depend on the platform as long as libdispatch is present (except for one instance of ProcessInfo.processInfo.activeProcessorCount ; replace that if necessary).

I do realize this may be a bit of a torture test for functionality that is still experimental, but on the other hand this is derived from code that does work (using libdispatch instead): http://wanderingcoder.net/2021/01/13/second-teaser-practical-multithreading/ . Swift structured concurrency is understandably more demanding of the code, and I attempted to conform to it, but I cannot find any way around this assertion failure.

@ZPedro
Copy link
Author

ZPedro commented Jul 11, 2021

No longer reproduced with Xcode 13 beta and Swift 5.5. Having different issues still, but since they don't involve this particular assertion failure, they are not relevant for this entry.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added compiler crash crash Bug: A crash, i.e., an abnormal termination of software swift 5.3 swift 5.4 concurrency Feature: umbrella label for concurrency language features SILOptimizer Area → compiler: SIL optimization passes and removed swift 5.3 labels Apr 5, 2023
This issue was closed.
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 concurrency Feature: umbrella label for concurrency language features crash Bug: A crash, i.e., an abnormal termination of software SILOptimizer Area → compiler: SIL optimization passes swift 5.4
Projects
None yet
Development

No branches or pull requests

2 participants