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-10793] Unhandled crash on a circular reference within dependencies #4859

Open
swift-ci opened this issue May 29, 2019 · 3 comments
Open
Labels

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-10793
Radar None
Original Reporter rafiki270 (JIRA User)
Type Bug
Environment

Tested on:
Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
Target: x86_64-apple-darwin18.6.0

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug, Crash
Assignee None
Priority Medium

md5: ca3bb3436957ed856935d8b0dc639be0

Issue Description:

getting following error if I cause a circular reference in my package files:
```
Simultaneous accesses to 0x7fc4cde7bca8, but modification requires exclusive access.
Previous access (a modification) started at swift-package`CacheableSequence.subscript.getter + 614 (0x10ab04026).
Current access (a read) started at:
0 libswiftCore.dylib 0x00007fff6942e140 swift_beginAccess + 557
1 swift-package 0x000000010ab03dc0 CacheableSequence.subscript.getter + 462
2 swift-package 0x000000010ab04480 CacheableSequenceIterator.next() + 150
3 swift-package 0x000000010ab045e0 protocol witness for IteratorProtocol.next() in conformance CacheableSequenceIterator<A> + 16
4 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
5 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
6 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
7 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
8 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
9 libswiftCore.dylib 0x00007fff691fc300 LazyFilterSequence.Iterator.next() + 252
10 libswiftCore.dylib 0x00007fff691fc540 protocol witness for IteratorProtocol.next() in conformance LazyFilterSequence<A>.Iterator + 9
11 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
12 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
13 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
14 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
15 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
16 libswiftCore.dylib 0x00007fff692049d0 FlattenSequence.Iterator.next() + 669
17 libswiftCore.dylib 0x00007fff69204e20 protocol witness for IteratorProtocol.next() in conformance FlattenSequence<A>.Iterator + 9
18 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
19 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
20 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
21 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
22 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
23 libswiftCore.dylib 0x00007fff692049d0 FlattenSequence.Iterator.next() + 844
24 libswiftCore.dylib 0x00007fff69204e20 protocol witness for IteratorProtocol.next() in conformance FlattenSequence<A>.Iterator + 9
25 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
26 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
27 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
28 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
29 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
30 libswiftCore.dylib 0x00007fff692049d0 FlattenSequence.Iterator.next() + 844
31 libswiftCore.dylib 0x00007fff69204e20 protocol witness for IteratorProtocol.next() in conformance FlattenSequence<A>.Iterator + 9
32 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
33 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
34 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
35 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
36 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
37 libswiftCore.dylib 0x00007fff692049d0 FlattenSequence.Iterator.next() + 844
38 libswiftCore.dylib 0x00007fff69204e20 protocol witness for IteratorProtocol.next() in conformance FlattenSequence<A>.Iterator + 9
39 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
40 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
41 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
42 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
43 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
44 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
45 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
46 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
47 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
48 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
49 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
50 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
51 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
52 libswiftCore.dylib 0x00007fff69404610 dispatch thunk of IteratorProtocol.next() + 7
53 swift-package 0x000000010ab03dc0 CacheableSequence.subscript.getter + 700
54 swift-package 0x000000010ab04480 CacheableSequenceIterator.next() + 150
55 swift-package 0x000000010ab045e0 protocol witness for IteratorProtocol.next() in conformance CacheableSequenceIterator<A> + 16
56 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
57 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
58 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
59 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
60 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
61 libswiftCore.dylib 0x00007fff691fc300 LazyFilterSequence.Iterator.next() + 252
62 libswiftCore.dylib 0x00007fff691fc540 protocol witness for IteratorProtocol.next() in conformance LazyFilterSequence<A>.Iterator + 9
63 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
64 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
65 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
66 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
67 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
68 libswiftCore.dylib 0x00007fff692049d0 FlattenSequence.Iterator.next() + 669
69 libswiftCore.dylib 0x00007fff69204e20 protocol witness for IteratorProtocol.next() in conformance FlattenSequence<A>.Iterator + 9
70 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
71 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
72 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
73 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
74 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
75 libswiftCore.dylib 0x00007fff692049d0 FlattenSequence.Iterator.next() + 844
76 libswiftCore.dylib 0x00007fff69204e20 protocol witness for IteratorProtocol.next() in conformance FlattenSequence<A>.Iterator + 9
77 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
78 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
79 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
80 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
81 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
82 libswiftCore.dylib 0x00007fff692049d0 FlattenSequence.Iterator.next() + 844
83 libswiftCore.dylib 0x00007fff69204e20 protocol witness for IteratorProtocol.next() in conformance FlattenSequence<A>.Iterator + 9
84 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
85 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
86 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
87 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
88 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
89 libswiftCore.dylib 0x00007fff692049d0 FlattenSequence.Iterator.next() + 844
90 libswiftCore.dylib 0x00007fff69204e20 protocol witness for IteratorProtocol.next() in conformance FlattenSequence<A>.Iterator + 9
91 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
92 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
93 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
94 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
95 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
96 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
97 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
98 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
99 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
100 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
101 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
102 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
103 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
104 libswiftCore.dylib 0x00007fff69404610 dispatch thunk of IteratorProtocol.next() + 7
105 swift-package 0x000000010ab03dc0 CacheableSequence.subscript.getter + 700
106 swift-package 0x000000010ab04480 CacheableSequenceIterator.next() + 150
107 swift-package 0x000000010ab045e0 protocol witness for IteratorProtocol.next() in conformance CacheableSequenceIterator<A> + 16
108 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
109 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
110 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
111 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
112 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
113 libswiftCore.dylib 0x00007fff691fc300 LazyFilterSequence.Iterator.next() + 252
114 libswiftCore.dylib 0x00007fff691fc540 protocol witness for IteratorProtocol.next() in conformance LazyFilterSequence<A>.Iterator + 9
115 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
116 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
117 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
118 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
119 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
120 libswiftCore.dylib 0x00007fff692049d0 FlattenSequence.Iterator.next() + 669
121 libswiftCore.dylib 0x00007fff69204e20 protocol witness for IteratorProtocol.next() in conformance FlattenSequence<A>.Iterator + 9
122 libswiftCore.dylib 0x00007fff69321f00 _IteratorBox.next() + 26
123 libswiftCore.dylib 0x00007fff691ce300 AnyIterator.next() + 16
124 libswiftCore.dylib 0x00007fff69321d40 protocol witness for IteratorProtocol.next() in conformance AnyIterator<A> + 13
125 libswiftCore.dylib 0x00007fff69290f50 LazyMapSequence.Iterator.next() + 241
126 libswiftCore.dylib 0x00007fff69291120 protocol witness for IteratorProtocol.next() in conformance LazyMapSequence<A, B>.Iterator + 9
Fatal access conflict detected.```

@weissi
Copy link
Member

weissi commented May 30, 2019

Cc @aciidb0mb3r

@swift-ci
Copy link
Contributor Author

Comment by Ondrej Rafaj (JIRA)

Sorry for the massive repo but you can simulate the problem easily on this branch:
https://github.com/LiveUI/ApiCore/tree/SR-10793

This line:
https://github.com/LiveUI/ApiCore/blob/c40c5ebf26f2776634d734f5d895ffde9985fca4/Package.swift#L15

@ankitspd
Copy link
Member

Can you try the latest trunk snapshot? I think we fixed this one.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
@tomerd tomerd removed Crash labels May 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants