Skip to content
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

CPU spikes to 100% in an infinite While loop #2237

Closed
sghiassy opened this issue Aug 5, 2015 · 5 comments
Closed

CPU spikes to 100% in an infinite While loop #2237

sghiassy opened this issue Aug 5, 2015 · 5 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@sghiassy
Copy link

sghiassy commented Aug 5, 2015

I'm seeing a problem where the app locks and the CPU throttles to 100% infinitely.

Sample App

Here is a sample repo that you can download. The app is only 140 lines long, but reproduces the issue 100%: https://github.com/sghiassy/react-bug

CPU Profiler

Cause

I'm not 100% sure what the issue is, but I've tracked it down to file Layout.c's while loop on line 455.

@ide
Copy link
Contributor

ide commented Aug 5, 2015

I believe this is a known bug :(
I don't remember the specifics off the top of my head but search the issues for "flex cpu" and I think you'll find similar issues.

@sghiassy
Copy link
Author

sghiassy commented Aug 5, 2015

Thanks for the tip @ide . I found some similar issues:

Its of interest to note that each of the issues reports 100% pegging in Layout.c but the cause / repo steps seem to differ.

@ide
Copy link
Contributor

ide commented Aug 5, 2015

Interesting. Unfortunately I can't tell you when this will be fixed or whether this is a priority for Facebook but it does seem important and more data points are helpful. Thanks for your report.

@ide
Copy link
Contributor

ide commented Aug 27, 2015

A 100% CPU bug in css-layout has been patched in 0.10 and 0.11-rc.

@browniefed
Copy link
Contributor

@ide close since it's fixed.

@ide ide closed this as completed Sep 13, 2015
@facebook facebook locked as resolved and limited conversation to collaborators Jul 22, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants