Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Disable DFG_JIT to fix possibly crash issue. #105

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

Merged
kmagiera merged 1 commit into react-native-community:master from Kudo:no_dfg_jit
May 29, 2019

Conversation

@Kudo
Copy link
Member

@Kudo Kudo commented May 23, 2019
edited
Loading

Summary

Disable DFG JIT in JavaScriptCore to fix crash issues.
As far as I know, there are two kinds of crash.
#84 (comment)
And
facebook/react-native#24261 (comment)
Both of them are caused from DFG JIT.
To prevent further crash issues, I am proposing to disable DFG.

Some notes:
old JSC disabled DFG JIT
jsc-android disabled DFG_JIT until 236355.0.0

Test Plans

  1. As I could reproduced the first NPE crash, null pointer dereference on jsc-android: 236355.1.1 #84 (comment) confirmed to fix NPE with no_DFG_JIT build.
  2. Also double confirmed previous crash on arm64 before WebKitGTK 2.22 does not happens
    null pointer dereference on jsc-android: 236355.1.1 #84 (comment)
  3. For second crash issue, there are some user feedback that the no_DFG_JIT build fix their crash issues.
    See detail comments in App Crash on Android OS 6 Samsung Galaxy S7 SM-G930FD (JSC Crash) 64 bit support A/libc: Fatal signal 11 (SIGSEGV) facebook/react-native#24261

Measurement

I am not going to compare with original measurement result since I don't have Pixel phone.
Instead to test on Samsung Galaxy Note5.
Four test runs: original 241213.1.0, old JSC, no_DFG_JIT, and no_JIT.
Note that I've updated render deep scale to 500.
Otherwise, I will have JNI local reference table overflow crash (JNI maximum references is 512)

Npm Version Publish Date Config WebkitGTK Revision WebkitGTK Date TTI SunSpider Jetstream Hashmap Octane2 SixSpeed Render Flat Render Deep Size
241213.1.0 2019年04月30日 webkitGTK:2.22.6
chromiumICUCommit:b34251f
i18n:false
241213 2019年02月08日 456 469 557 1569 416 436 347 7.6/10.0
174650.0.2 - Stock RN59 (non-i18n) 174650 2014年10月13日 454 568 4005 1996 1454 518 395 2.7 (with libicu_common.so)
@kudo-ci/jsc-android@241213-no-dfg-jit 2019年05月17日 webkitGTK:2.22.6
chromiumICUCommit:b34251f
i18n:false
DFG_JIT:false
241213 2018年09月21日 451 534 3033 1780 420 510 430 6.3/8.0
@kudo-ci/jsc-android@241213-no-jit 2019年05月17日 webkitGTK:2.22.6
chromiumICUCommit:b34251f
i18n:false
DFG_JIT:false
JIT:false
241213 2018年09月21日 456 1947 11799 5887 973 538 431 5.0/7.1

I prepared a graph to show the result visually.
https://docs.google.com/spreadsheets/d/1hqX3ai-NCpN_J6YQDTKnKNBctWnMFA6EyOdVhPvwUas/edit#gid=445596593
Screen Shot 2019年05月23日 at 6 50 52 PM

From the graph, you could see there's no much benefits from DFG JIT except the jetstream hash-map test case.
And disable DFG JIT also save about 1.3MB for libjsc.so (about 17%)
From my point of view, to disable DFG JIT we keep the performance baseline as old JSC.
However, bug free and small binary size are more meaningful to me.

bruchim, gaodeng, rotemmiz, bisark, sikeeoh, sivakumar-cf, ajubin, and svanlaug reacted with thumbs up emoji bruchim, sikeeoh, guyca, and svanlaug reacted with hooray emoji bruchim, rotemmiz, sikeeoh, Mookiies, guyca, and svanlaug reacted with heart emoji gaodeng, rotemmiz, bruchim, sikeeoh, guyca, svanlaug, and nirre7 reacted with rocket emoji
Copy link
Member

@kmagiera kmagiera left a comment

Choose a reason for hiding this comment

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

Nice, lets get this in, I'll publish this on NPM today or tomorrow the latests and lets see if people out there see any issues with this build

gaodeng, svanlaug, and ItsNoHax reacted with hooray emoji
@kmagiera kmagiera merged commit 483056c into react-native-community:master May 29, 2019
Copy link

cpirich commented May 30, 2019

@Kudo thanks for your work here, we've also been bitten by SEGV_MAPPER crashes and corruption within the JavaScript side. We will try this out.

A point of clarification: in your chart above, you mention "Stock RN59" using 174650.0.2, but perhaps you mean "Stock RN58"? I think RN59 by default is now using 236355

Copy link

Have you published it already @kmagiera ?

Copy link
Member Author

Kudo commented May 31, 2019

Sorry it's me ask for pending new release for a while.
As there still some user report crash happens even after disable DFG JIT.
I would like to make sure we publish a new version that will truly solve the crash.

@cpirich Oops, it's my wrong for RN59. As you said, it's stock RN058. Thanks for clarification.

Copy link

Understandable @Kudo , thanks again for all the effort you have been putting into fixing this asap.

Kudo reacted with heart emoji

@Kudo Kudo mentioned this pull request May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kmagiera kmagiera kmagiera approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /