GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Leak mutex to avoid a crashing issue by chuganzy · Pull Request #22607 · react/react-native

Conversation

@chuganzy

@chuganzy chuganzy commented Dec 11, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Try to solve #13588
ref: meta/componentkit#906

Test Plan:

Regression / smoke tests should be enough.

Changelog:

[iOS] [Fixed] - Fix a crashing issue on RCTFont / mutex

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

matthargett reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@chuganzy
chuganzy requested a review from shergin as a code owner December 11, 2018 18:32
@facebook-github-bot facebook-github-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 Dec 11, 2018
@chuganzy
Leak mutex to avoid a crashing issue
b8e6613
Ref: meta/componentkit#906
@chuganzy
chuganzy force-pushed the rctfont-crash-fix branch from 7d55b4e to b8e6613 Compare December 11, 2018 21:31
@chuganzy chuganzy mentioned this pull request Dec 15, 2018
RCTFont SIGABRT crash #13588
Closed
@react-native-bot react-native-bot added ✅Changelog Platform: iOS iOS applications. labels Jan 15, 2019
@DimitryDushkin

DimitryDushkin commented Jan 16, 2019

Copy link
Copy Markdown

Ping. Eliminating crash is really important.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DimitryDushkin

DimitryDushkin commented Jan 29, 2019

Copy link
Copy Markdown

We've released out app with this patch and this crash gone away.

chuganzy and matthargett reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chuganzy

chuganzy commented Jan 29, 2019

Copy link
Copy Markdown
Contributor Author

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DimitryDushkin

DimitryDushkin commented Jan 29, 2019

Copy link
Copy Markdown

Where is my manners. Thank you @chuganzy!

chuganzy reacted with laugh emoji
All reactions
  • 😄 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

matthargett
matthargett approved these changes Feb 12, 2019
View reviewed changes
@shergin

shergin commented Feb 14, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

@chuganzy
Wait, wait, what does make you think that the linked crash happens when application is closing? Should we leak all static mutexes?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shergin

shergin commented Feb 14, 2019

Copy link
Copy Markdown
Contributor

Here's a quote from Oliver:

Historically, TextKit has had lots of hidden thread-safety issues despite being stated as thread safe. CK locks around all access to TextKit, but there are still issues that have cropped up in the recent past. We built the same text locking system in both CK and ASDK, and they both work this way.

As I can see, that's not how RN works here (and everywhere else) with fonts and co. So, maybe this is the problem.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chuganzy

chuganzy commented Feb 14, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Here's also a quote from @ocrickard. You can see the commit log here.
meta/componentkit@37bcfdb

OK, looks like std::mutex is not trivially destructible in Clang, so we should probably just leak that mutex. Anyway, I believe this crash is happening on exit() as @gkassabli said above, so it probably has no impact on user experience.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shergin

shergin commented Feb 14, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Yes, exactly. My point is that the fix in CK fixes different type of the crash, not the one that promised in this PR's description.
I believe this change will not fix #13588 .

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shergin

shergin commented Feb 14, 2019

Copy link
Copy Markdown
Contributor

Just chatted with Oliver and... I was a bit wrong. :)
So, this fix seems to fix the one of the crashes mentioned in the assigned issue (but probably not that one which in the description).

As Oliver pointed out, all TextKit-related crashes wich has something like '0x185dfc238 std::__1::mutex::try_lock() + 34' will be fixed with this fix.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Feb 14, 2019
facebook-github-bot
facebook-github-bot approved these changes Feb 14, 2019
View reviewed changes

@facebook-github-bot facebook-github-bot left a comment

Copy link
Copy Markdown
Contributor

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.

@shergin is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

matthargett and chuganzy reacted with heart emoji
All reactions
  • ❤️ 2 reactions
@chuganzy

chuganzy commented Feb 14, 2019

Copy link
Copy Markdown
Contributor Author

@shergin Thank you, but seems like the issue in its description also indicates that it's crashing when it tries to lock from its line so I am hoping that this solves the issue🤞

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@facebook-github-bot facebook-github-bot closed this in 6082431 Feb 14, 2019
@react-native-bot

react-native-bot commented Feb 14, 2019

Copy link
Copy Markdown
Collaborator

@chuganzy merged commit 6082431 into facebook:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@react react locked as resolved and limited conversation to collaborators Feb 14, 2019
@react-native-bot react-native-bot added the Merged This PR has been merged. label Feb 14, 2019
@chuganzy
chuganzy deleted the rctfont-crash-fix branch February 15, 2019 00:35
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 23, 2019
@react-native-bot react-native-bot added the Bug label May 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@shergin shergin Awaiting requested review from shergin
2 more reviewers
@matthargett matthargett matthargett approved these changes
@facebook-github-bot facebook-github-bot facebook-github-bot approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: iOS iOS applications.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@chuganzy @DimitryDushkin @shergin @react-native-bot @matthargett @facebook-github-bot @hramos
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.