Skip to content

Conversation

rubennorte
Copy link
Contributor

Summary:
Changelog: [internal]

This add a new feature flag to test a fix for #51870

Reviewed By: cortinico, sammy-SC

Differential Revision: D78418504

Summary:
Changelog: [internal]

This add a new feature flag to test a fix for facebook#51870

Reviewed By: cortinico, sammy-SC

Differential Revision: D78418504
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 16, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78418504

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 21cd09d.

@react-native-bot
Copy link
Collaborator

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?

rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 17, 2025
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
facebook-github-bot pushed a commit that referenced this pull request Jul 17, 2025
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
rubennorte added a commit to rubennorte/react-native that referenced this pull request Jul 17, 2025
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
facebook-github-bot pushed a commit that referenced this pull request Jul 17, 2025
…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
cortinico pushed a commit that referenced this pull request Jul 21, 2025
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
cortinico pushed a commit that referenced this pull request Jul 21, 2025
…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
@react-native-bot
Copy link
Collaborator

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?

motiz88 pushed a commit that referenced this pull request Jul 21, 2025
…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]>
@react-native-bot
Copy link
Collaborator

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?

github-merge-queue bot pushed a commit to software-mansion/react-native-reanimated that referenced this pull request Jul 23, 2025
## 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
kikoso pushed a commit to kikoso/react-native that referenced this pull request Aug 26, 2025
…#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
kikoso pushed a commit to kikoso/react-native that referenced this pull request Aug 26, 2025
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
kikoso pushed a commit to kikoso/react-native that referenced this pull request Aug 26, 2025
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants