-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Implement mechanism to prevent ShadowTree commit exhaustion #52645
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
Summary: Changelog: [internal] This add a new feature flag to test a fix for facebook#51870 Reviewed By: cortinico, sammy-SC Differential Revision: D78418504
This pull request was exported from Phabricator. Differential Revision: D78418504 |
This pull request has been merged in 21cd09d. |
This pull request was successfully merged by @rubennorte in 21cd09d When will my fix make it into a release? | How to file a pick request? |
Summary: Changelog: [internal] In the original change I made in D78418504 / facebook#52645 I made a mistake and used a lock that would try to re-lock on itself without it being recursive (which would cause a deadlock). I didn't see that because when testing I didn't hit the case where we'd exhaust the options. This propagates a flag to `tryCommit` to indicate we've already locked on the `commitMutex_` so we don't need to lock again in that case, fixing the issue. Differential Revision: D78480136
Summary: Pull Request resolved: #52662 Changelog: [internal] In the original change I made in D78418504 / #52645 I made a mistake and used a lock that would try to re-lock on itself without it being recursive (which would cause a deadlock). I didn't see that because when testing I didn't hit the case where we'd exhaust the options. This propagates a flag to `tryCommit` to indicate we've already locked on the `commitMutex_` so we don't need to lock again in that case, fixing the issue. Reviewed By: sammy-SC Differential Revision: D78480136 fbshipit-source-id: c18e967488de14e73e6abf6f6e82c16bc42a12c6
Summary: Changelog: [internal] In the original change I made in D78418504 / facebook#52645 I made 2 mistakes: 1. Used a lock that would try to re-lock on itself without it being recursive (which would cause a deadlock). I didn't see that because when testing I didn't hit the case where we'd exhaust the options. 2. The `attemps` variable wasn't incremented, so we never left the loop in case of exhaustion. This propagates a flag to `tryCommit` to indicate we've already locked on the commitMutex_ so we don't need to lock again in that case and increases the counter, fixing the issue. Differential Revision: D78497509
…2681) Summary: Pull Request resolved: #52681 Changelog: [internal] In the original change I made in D78418504 / #52645 I made 2 mistakes: 1. Used a lock that would try to re-lock on itself without it being recursive (which would cause a deadlock). I didn't see that because when testing I didn't hit the case where we'd exhaust the options. 2. The `attemps` variable wasn't incremented, so we never left the loop in case of exhaustion. This propagates a flag to `tryCommit` to indicate we've already locked on the commitMutex_ so we don't need to lock again in that case and increases the counter, fixing the issue. Reviewed By: cortinico Differential Revision: D78497509 fbshipit-source-id: 546ccd0c84aed5416ce1aef47d79419b4fe06f66
…2681) Summary: Pull Request resolved: #52681 Changelog: [internal] In the original change I made in D78418504 / #52645 I made 2 mistakes: 1. Used a lock that would try to re-lock on itself without it being recursive (which would cause a deadlock). I didn't see that because when testing I didn't hit the case where we'd exhaust the options. 2. The `attemps` variable wasn't incremented, so we never left the loop in case of exhaustion. This propagates a flag to `tryCommit` to indicate we've already locked on the commitMutex_ so we don't need to lock again in that case and increases the counter, fixing the issue. Reviewed By: cortinico Differential Revision: D78497509 fbshipit-source-id: 546ccd0c84aed5416ce1aef47d79419b4fe06f66
This pull request was successfully merged by @rubennorte in c82821f When will my fix make it into a release? | How to file a pick request? |
…52736) * Implement mechanism to prevent ShadowTree commit exhaustion (#52645) Summary: Pull Request resolved: #52645 Changelog: [internal] This add a new feature flag to test a fix for #51870 Reviewed By: cortinico, sammy-SC Differential Revision: D78418504 fbshipit-source-id: 2792026b6936393d196fd1e3162f8b2c61a38ed6 * Fix incorrect locking and attempts check in ShadowTree experiment (#52681) Summary: Pull Request resolved: #52681 Changelog: [internal] In the original change I made in D78418504 / #52645 I made 2 mistakes: 1. Used a lock that would try to re-lock on itself without it being recursive (which would cause a deadlock). I didn't see that because when testing I didn't hit the case where we'd exhaust the options. 2. The `attemps` variable wasn't incremented, so we never left the loop in case of exhaustion. This propagates a flag to `tryCommit` to indicate we've already locked on the commitMutex_ so we don't need to lock again in that case and increases the counter, fixing the issue. Reviewed By: cortinico Differential Revision: D78497509 fbshipit-source-id: 546ccd0c84aed5416ce1aef47d79419b4fe06f66 * Rollout `preventShadowTreeCommitExhaustionWithLocking` in experimental (#52709) Summary: Pull Request resolved: #52709 We want to make user for folks in OSS to try `preventShadowTreeCommitExhaustionWithLocking`. Therefore I'm updating the OSS release channel for this flag to experimental. Changelog: [Internal] [Changed] - Rollout `preventShadowTreeCommitExhaustionWithLocking` in experimental Reviewed By: rubennorte Differential Revision: D78558655 fbshipit-source-id: 02a9d216c7b2f8f7bdc1340213f82b70c5692dc7 --------- Co-authored-by: Rubén Norte <[email protected]>
This pull request was successfully merged by @cortinico in dd12edf When will my fix make it into a release? | How to file a pick request? |
## Summary This PR adds a flag that allows users to disable the commit pausing mechanism in reanimated. The mechanism is used to avoid starving out the react renderer, by continuously pushing short reanimated updates. With [this](facebook/react-native#52645) update coming to RN, we should be soon able to remove the mechanism altogether. For now we want to ship it as a opt-in feature-flag. ## Test plan
…#52645) Summary: Pull Request resolved: facebook#52645 Changelog: [internal] This add a new feature flag to test a fix for facebook#51870 Reviewed By: cortinico, sammy-SC Differential Revision: D78418504 fbshipit-source-id: 2792026b6936393d196fd1e3162f8b2c61a38ed6
Summary: Pull Request resolved: facebook#52662 Changelog: [internal] In the original change I made in D78418504 / facebook#52645 I made a mistake and used a lock that would try to re-lock on itself without it being recursive (which would cause a deadlock). I didn't see that because when testing I didn't hit the case where we'd exhaust the options. This propagates a flag to `tryCommit` to indicate we've already locked on the `commitMutex_` so we don't need to lock again in that case, fixing the issue. Reviewed By: sammy-SC Differential Revision: D78480136 fbshipit-source-id: c18e967488de14e73e6abf6f6e82c16bc42a12c6
…cebook#52681) Summary: Pull Request resolved: facebook#52681 Changelog: [internal] In the original change I made in D78418504 / facebook#52645 I made 2 mistakes: 1. Used a lock that would try to re-lock on itself without it being recursive (which would cause a deadlock). I didn't see that because when testing I didn't hit the case where we'd exhaust the options. 2. The `attemps` variable wasn't incremented, so we never left the loop in case of exhaustion. This propagates a flag to `tryCommit` to indicate we've already locked on the commitMutex_ so we don't need to lock again in that case and increases the counter, fixing the issue. Reviewed By: cortinico Differential Revision: D78497509 fbshipit-source-id: 546ccd0c84aed5416ce1aef47d79419b4fe06f66
Summary:
Changelog: [internal]
This add a new feature flag to test a fix for #51870
Reviewed By: cortinico, sammy-SC
Differential Revision: D78418504