-
Notifications
You must be signed in to change notification settings - Fork 991
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
Fix 64bit apk freezes on arm64 hardware #8665
Comments
blocking the following: |
here are the logs when it gets stuck on logo screen https://gist.github.com/flexsurfer/94d5d67eb3880d2c2a62708b50c660b7 |
logs when it gets stuck after interacting with the UI https://gist.github.com/flexsurfer/b5be0623e19c19e401fc16f63be62f71 |
Did anyone else with React Native or X other technology see similar issues? Has someone tried to setup a minimally failing test case? What's the current best hypothesis? Also cc @pombeirp |
Could this be related facebook/react-native#24260? Can we add version numbers, platform and environment details to original issue? |
i couldn't find any reports with similar issues, but here facebook/react-native#25494 (comment) , ppl still experience problems and author of 59.10 fix suggests to try 60.4 and new engine, we're trying to check this currently with @yenda but nix makes things slower, maybe @pombeirp could help with that |
Tested as well without realm and with latest jsc a183490 Still freezes Next steps:
Things that we could explore:
|
Comparing these logs, what stands out is that there are no entries for
In this one, there are entries for Comparing |
Honestly I think this is a suboptimal approach to debugging the problem. The problem with it is it that it is a positive one, where you add stuff. The only time this would make sense imo is if there's a clear hypothesis, for example based on similar bug reports, that this would resolve the issue. A better approach to isolate the error instead is the negative one, where we try to find a minimally failing test case. This is also what would be the most useful once we find out what the upstream (?) bug is. |
I'm comparing the In addition to comparing the full objdump logs, I'll try adding code that crashes the app in |
I created a local PR build and from the logs can see that status-go is working (search for |
OK, some more data. In this run, I was able to create an account and see the chat screens. I then went to add a public chat, and it hung on the public chat list. Even though the UI was hung, I could still see signals from status-go being processed by the status-react Java code, e.g.:
From subsequent runs, I gathered some additional observations:
|
So as we are suspecting the JSC, we are going to switch it with Hermes to see if the problem persists |
Currently trying to build any non-trivial RN sample app which is built on 0.59.x, such as from this list, to see if they suffer from the same issue or if we can modify them to reproduce the issue, but it's proving challenging to find one that actually builds and runs... |
maybe it would be better to remove all from status-react, create a few simple screens and try |
I think @flexsurfer has the right idea. Building the app using our current stack but with almost everything removed to see if it fails the same way, and if it doesn't keep re-adding screens/whatever else to see what triggers the freeze. |
this may be challenging and time-consuming One more quick idea is to build release v13 for 64, because in current develop we have all performance optimizations, js modules etc |
Error libgnustl_shared.so is 32 bit instead of 64-bit (android) #4478 |
@flexsurfer don't waste your time going back, previous versions of react-native didn't even support 64bits first version of react-native to support 64bits was 0.59.1 The v13 build seems to fail for a different reason: |
If I build v13 locally I get a different error:
|
ok, i have a news , after removing build: https://status-im-prs.ams3.digitaloceanspaces.com/StatusIm-190801-105131-1e5525-pr.apk |
@pombeirp could you take a look? |
@flexsurfer It's hard to say whether it fixes the issue or not, since with this change most of the screens were removed, so there is not much that can be done inside the app to exercise the functionality. Perhaps the only indicator is whether it stops locking up in the splash screen, but I didn't get that often in my P20 Pro. Normally it hung when creating an account or joining a public chat. I'll try to see whether I'm unable to repro the hang at splash screen. |
Did another experiment, to rule out whether the issue was with the Nix status-go build: I modified the Nix recipe to build status-go (with gomobile) so that it just takes the latest status-go manual build from Jenkins. I was able to progress all the way to add a public chat in one go, but it still hung at that point. |
Also, fwiw @flexsurfer I did the following experiments, all of which still resulted in hangs:
It's as if as soon as we call into |
it's not only setMobileSignalHandler, any call to status go may lead to hang |
but only with this one it still hangs 06d8d33 |
Yup, calling |
I'll try upgrading to latest gomobile. It seems to have some changes relevant to arm64. UPDATE: Upgrading gomobile didn't seem to fix the hang, unfortunately. |
Maybe we should build a proof-of-concept RN app which calls a simple method in Go through gomobile? I'll be on holiday tomorrow, but I can work on that on Monday. |
I was able to create a minimal RN sample that reproduces the hang. It still uses status-go as the import, so now the next step is to use a minimal gomobile project. |
Built the simplest Go project with a single exported method |
Repro app is available here. @flexsurfer I'd appreciate it if you could follow the build instructions to ensure that others can also reproduce it before I create an issue in the golang repository. |
For clarity, what about:
|
That'd be useful, but since the way that this bug manifests itself is through a hang of the JavaScript UI thread, I'm not sure how we'd reproduce it in a completely native app. We could get lucky and witness a hang of the native main thread, but might be a long shot. Still worth trying though. |
I'd like to also generate a native arm64-v8a through some method other than Gomobile (maybe xgo?), in order to prove that the issue really comes from the way they generate the library. |
I've created a sample app derived from an Android sample (BasicTransition) which calls the same gomobile library, but it doesn't seem to suffer any problems after invoking I've also tried using xgo to build an aar which contains an arm64 library, but for some reason xgo only seems to want to build 32-bit targets in the aar. Maybe @adambabik knows more about this. |
Sounds good.
Seems useful, perhaps people upstream have further thoughts. I notice there are a bunch of issues related to arm64 and mobile https://github.com/golang/go/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+arm64+mobile+ but don't know if any of them are related. Maybe Perhaps it'd make sense to open an upstream issue in both Go and RN repo? |
I've built the sample using RN 0.60.4 and these are the findings when running the debug app:
So while this does not inform us regarding the root cause of the interaction (i.e. is this an issue with RN or gomobile?), it gives us a path forward for the future releases. |
Hermes is still not stable and there are bugs like this facebook/react-native#25864, maybe we could try to upgrade app to 0.60.4, enable Hermes and test it on different Android devices? @annadanchenko @pombeirp wdyt? |
@flexsurfer that was the plan #8672 the update isn't trivial though |
I'm taking a stab at upgrading to Hermes. |
Reported bug in facebook/react-native#25970 |
@annadanchenko looking at progress on this issue, I'm guessing we won't be ready to release v0.14 with these items in time for our iOS cut-off. wdyt? Should we prepare comms with @j-zerah to explain the need to re-release v0.13 for iOS? I would suggest we call it v0.13.1 (assuming 0.13 was latest). |
i'll try to build simple clojure RN app with hermes |
Problem
When building the app for 64bit arch as required by Google Play Store, we get freezes on arm64 hardware.
The freezes are random. There is no obvious indicator of a freeze in the logs besides the fact that there is no more js logging statements appearing, or no js logs at all in logcat if the freeze occurs during splash screen.
Implementation
We have tried:
Dismissed cause:
We need to try:
Acceptance Criteria
No freezes of the 64bits apk on 64bits devices
The text was updated successfully, but these errors were encountered: