Skip to content

Issue 916: Deadlock when saving objects with circular references. L… #931

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

czgarrett
Copy link

…imited the scope of the lock fixes the issue.

The only relevant change for the fix is the change in PFObject.m. The PList changes were generated by XCode when I built the project.

@ghost
Copy link

ghost commented May 31, 2016

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

@ghost
Copy link

ghost commented May 31, 2016

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

message:@"User associated with ACL must be signed up."];
}
return NO;
dictionaryRepresentationCopy = _estimatedData.dictionaryRepresentation; // This copies the dictionary representation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this actually doesn't copy anything, just assigns the pointer, unless you call [_estimatedData.dictionaryRepresentation copy] on it.

@flovilmart
Copy link
Contributor

Could you expand on the fix, and probably add a unit test that would deadlock with the current code?
It seems that removing the lock will have unexpected side effects.

@czgarrett
Copy link
Author

czgarrett commented Apr 10, 2017 via email

@flovilmart
Copy link
Contributor

@czgarrett can you please provide a code that reproduces the issue please? I could very well provide a fix in the upcoming days. In the meantime, I'll close the issue.

@flovilmart flovilmart closed this Jan 21, 2018
flovilmart added a commit that referenced this pull request Jan 21, 2018
- As per discussion over there, @nlutsenko and @richardjrossiii were A1 on the resolution
Thanks @czgarrett for the fix

Closes #931
flovilmart added a commit that referenced this pull request Jan 30, 2018
- As per discussion over there, @nlutsenko and @richardjrossiii were A1 on the resolution
Thanks @czgarrett for the fix

Closes #931
flovilmart added a commit that referenced this pull request Jan 30, 2018
* wip

* wip

* Initial refactoring of Consistency Assertion to Consistency errors

- Make Tried to get invalid local id a soft error
- Make Tried to save an object with a new, unsaved child. a soft error
- Make Tried to save an object with a pointer to a new, unsaved object. a soft error
- Make Attempted to find non-existent uuid a soft error

* Soft errors for User consistency checks `_checkSaveParametersWithCurrentUser`

* Bumps to latest Swift

* Proper failable methods for the LocalIdStore

* Adds precondition for checking if user is not merging on itself

* Swallow consistency error when decoding

* Base error checking on return parameters as unsafe to check error / *error

* Restore behaviour for nil tranformed objects without errors

* proper ARC modifier for NSError**

* Transform assertions to errors in children collection

* Adds PFPrecondition instead of Exception when saving cycles

* Properly bail on encoding errors, add tests

* nits: TODOs

* Improve handling of failures for localId resolutiosn

* Report missing localId as soft errors

* Refactor: Rename macros in PFPreconditon, more consistency on arguments

* Better error propagation in resolving localIds

* More tests for failures of localId resolutions

* Bump version to 1.16.1-alpha.1

* Bump podspec to 1.17.0-alpha.1

* Fix issue #916

- As per discussion over there, @nlutsenko and @richardjrossiii were A1 on the resolution
Thanks @czgarrett for the fix

Closes #931

* Fixes #1184

- Prevent deadlock by copying estimatedData before traversal

* Adds r/w accessors in swift for the PFACL

fixes #1083

* Adds CHANGELOG.md

* Bumps to 1.17.0-alpha.2

* Fixes flaky test

* Provide more context when asserting OfflineStore objectId assignment issues

* Bolts doesnt infer failed tasks with NSError as a return type, always return failed tasks if needed

* Bump to 1.17.0-alpha.3

* Releases on travis

* run pod trunk push with verbose to not stall travis

* Review nits

* Do no track dimensions if they are nil

* Bump version to 1.17.0-alpha.4

* Adds precondition to prevent crash

* Fixes errors

* Bumps to 1.17.0-alpha.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants