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

TextView on production nuking app with OverlappingFileLockException #37871

Open
MicroDroid opened this issue Jun 14, 2023 · 31 comments
Open

TextView on production nuking app with OverlappingFileLockException #37871

MicroDroid opened this issue Jun 14, 2023 · 31 comments
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications.

Comments

@MicroDroid
Copy link

Description

Every some time, the app completely crashes on production and I get this from Sentry:

image

This was also happening on versions previous to 0.72 as well

React Native Version

0.72.0-rc.5

Output of npx react-native info

info Fetching system and libraries information...
System:
  OS: Linux 5.15 Arch Linux
  CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
  Memory: 13.30 GB / 31.35 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.14.2
    path: ~/.nvm/versions/node/v18.14.2/bin/node
  Yarn:
    version: 3.5.0
    path: /usr/sbin/yarn
  npm:
    version: 9.5.0
    path: ~/.nvm/versions/node/v18.14.2/bin/npm
  Watchman:
    version: 20221016.020512.0
    path: /usr/sbin/watchman
SDKs:
  Android SDK:
    API Levels:
      - "31"
      - "33"
      - "33"
    Build Tools:
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.2
    System Images:
      - android-33 | Google APIs Intel x86_64 Atom
    Android NDK: Not Found
IDEs:
  Android Studio: AI-222.4459.24.2221.9971841
Languages:
  Java:
    version: 11.0.17
    path: /usr/sbin/javac
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
npmGlobalPackages:
  "*react-native*": Not 

Steps to reproduce

So Sentry very consistently reports this series of events when this exception happens:

image

But like, judging by the sequence and timing of these events, I think Sentry isn't really reporting properly? Like the user base is way too microscopic for this exact sequence of events at this exact timing to happen a couple times

Snack, code example, screenshot, or link to a repository

no idea

@Pranav-yadav Pranav-yadav added the Platform: Android Android applications. label Jun 14, 2023
@kelset kelset added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Jun 14, 2023
@github-actions
Copy link

⚠️ Missing Reproducible Example
ℹ️ It looks like your issue is missing a reproducible example. Please provide either:

@kelset
Copy link
Contributor

kelset commented Jun 14, 2023

we really need a repro 😅 on RNTester we have a Text component test page and I always check it out to ensure that it all works, so... really hard to understand what's going on.

Also, can you try RC6 and see if it's still there?

@MicroDroid
Copy link
Author

@kelset The problem is that I was never able to reproduce this on my end either, despite using RN for quite a long time now. I guess I can't help much beyond report the bug.

As for RC6, I'll ship that to users over the next week and I'll see then what goes

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Jun 14, 2023
@cortinico cortinico added Needs: Author Feedback and removed Needs: Attention Issues where the author has responded to feedback. labels Jun 14, 2023
@piers-smartwyre
Copy link

piers-smartwyre commented Jun 15, 2023

We're receiving these crashes also on react-native 0.71.4. Sentry stack trace below. Trying to create a repro but these are intermittent crashes, i'm not sure what's causing them.

image

@MicroDroid
Copy link
Author

Happened on production with RC6 too, but this time same stack as above ^

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Jun 19, 2023
@piers-smartwyre
Copy link

@MicroDroid All of our crashes have happened on Android 8.1.0, are you experiencing similar?

image

@MicroDroid
Copy link
Author

@piers-smartwyre hmmm yes
image

@eni4sure
Copy link

^^ same
image

@kelset
Copy link
Contributor

kelset commented Jun 21, 2023

still waiting for a repro 🙃

@lunaleaps lunaleaps added the 0.72 label Jun 22, 2023
@atambo
Copy link

atambo commented Jun 24, 2023

I’m hitting the same issue.
IMG_5884

@piers-smartwyre
Copy link

I seem to be hitting this issue on Android 11 now too. I have had 3 crashes. I am still unable to reproduce this bug, at all. Has anyone been able to?

image

@sebastiencarreno-full
Copy link

Same here with RN 0.70.10, tried to reproduce this with Android Emulator on 8.1 Oreo version but no issues. I think you can't reproduce this issue unless you have one of these devices :(

@emilhdiaz
Copy link

Seeing the exact same issue (same error and stack trace) in our Sentry.

Samsung Galaxy A70 device
Android 8.1.0
RN 0.70.8

@kelset
Copy link
Contributor

kelset commented Aug 1, 2023

open source meme

@ejain

This comment was marked as duplicate.

@tao-qian

This comment was marked as duplicate.

@OtayNacef

This comment was marked as duplicate.

@Danushka96

This comment was marked as duplicate.

@UmarbekSaidov

This comment was marked as duplicate.

@bgooren

This comment was marked as duplicate.

@hadyfarhat97

This comment was marked as duplicate.

@sk-phan

This comment was marked as duplicate.

@SupriyaPKalghatgi

This comment was marked as duplicate.

@aemre

This comment was marked as duplicate.

@t2
Copy link

t2 commented Jan 11, 2024

@kelset I am seeing this error too and would love to get a reproduction but it's only happening in production and I don't have enough information to get a reproduction for you. Any other options to help debug this?

@ElSierra

This comment was marked as duplicate.

@JClackett
Copy link

JClackett commented Feb 24, 2024

Also facing this in production only and on certain android devices, which makes creating a repro extremely hard/impractical.

I get that having a repro is useful for maintainers but when there's this many people having the same issue surely it's worth investigating without one? There's clearly something going on and just repeating "I need a repro" almost makes it sound like it's denying the fact this issue exists now i.e "If it works on my machine, then it's fine". Which I totally get, a lot of the time if people create a repro then they find the cause of their issues. (I've personally done this many many times). Just seems like this one is not the case.

All the stack traces are the exact same, and it's on certain android devices in production, surely that's enough proof.

java.nio.channels.OverlappingFileLockException: null
    at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
    at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
    at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1080)
    at java.nio.channels.FileChannel.lock(FileChannel.java:1053)
    at dalvik.system.MdaUtils.writeTo(MdaUtils.java:270)
    at android.widget.TextView.setText(TextView.java:5410)
    at android.widget.TextView.setText(TextView.java:5252)
    at android.widget.EditText.setText(EditText.java:113)
    at android.widget.TextView.setText(TextView.java:5209)

p.s I understand this is open source and i'm by no means trying to imply that maintainers owe anyone anything, i'm more calling out the general ethos of this whole "if there's no repro, there's no issue". Which sometimes is the case, but sometimes not... :)

@bgooren
Copy link

bgooren commented Feb 24, 2024

(Not a maintainer, just someone who encountered this bug):

I actually tried to see if it's possible to dig into the android source code to see if I can find the root cause.
Since the issues occurs for most people on android 8.1.0, that seems a good starting point.

Android 8.1.0 is api level 27 (Android version history).

The source code is available here: AndroidSDKSources/android-sdk-sources-for-api-level-27.

But the line numbers from the stack traces don’t seem to match the SDK source code of android.widget.TextView... Which makes it impossible to see what's causing this, for me at least.

Most likely it's simply a bug in android 8.1.0 that got fixed later. The stack trace shows the exception happens (deep) inside calls within the android SDK code. The only way around it would be to know what specific calls to the SDK trigger this bug and work around it for 8.1.0.

I guess what all of us could try is install an android 8.1.0 emulator and run our apps on that. If that triggers this exception, strip it down to the minimal reproducer.

@fabOnReact
Copy link
Contributor

If you don't have a repro, can you open source your project and add the link to the relevant code in this conversation? Thanks

@klcantrellsep
Copy link

klcantrellsep commented Feb 28, 2024

For what it's worth, we noticed this issue as soon as Google Play's pre-launch report testing kicked in. They seem to use a variety of devices, some in weirder configurations than others. Would a rooted device be a factor in triggering this error?

image

We haven't released publicly yet, so I have no data points to share on what would happen on actual users' devices.

@Stas-Buzunko
Copy link

Same here, it happens on Android 8.1.0.

@cortinico cortinico removed the 0.72 label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications.
Projects
None yet
Development

No branches or pull requests