-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix Segmentation Fault 11 while calling FetchCache.updateLastFetchTime #2908
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
Conversation
Would love to have this to be merged. My github action failed 100% now because of this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
private static let lock< 8000 /span> = NSLock() | ||
|
||
internal static func clearFetchTimes() { | ||
lastFetchTimes.removeAll() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the lock is guarding usage of lastFetchTimes
, do we need the lock here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you pointed out, it needed to be added!
Hi @taisukeh do you plan to merge this soon? Our builds are failing too frequently, would like to try out this fix. thank you! |
Our bitrise builds are plagued with above issue. Can we get a release with the above fix? |
tbh, i added this workaround a few months ago and it's been fine 😄
|
Carthage#2908) * Use NSLock in FetchCache methods * Add lock to clearFetchTimes
Problem
#2760 (comment)
Solution
Use NSLock to coordinates the operation of multiple threads of execution within the FetchCache.