flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.71k stars 27.36k forks source link

DartVM: dart::Object::InitNullAndBool Crash #87796

Closed SawyerEve closed 3 years ago

SawyerEve commented 3 years ago

Hi,

we found new crash logs for our production versions, and it trigger as soon as the app starts.

#00 pc 0043bd74 dart::Object::InitNullAndBool(dart::IsolateGroup*) (../../third_party/dart/runtime/vm/object.cc:2508) [armeabi-v7a]
#01 pc 0018644d DartVM (../../third_party/dart/runtime/vm/dart.cc:297) [armeabi-v7a]
#02 pc 001942bb Create (../../flutter/runtime/dart_vm.cc:262) [armeabi-v7a]
#03 pc 00156671 AttachJNI (../../flutter/shell/platform/android/platform_view_android_jni_impl.cc:144 [Inline: make_unique<flutter::AndroidShellHolder, const flutter::Settings &, std::shared_ptr<flutter::PlatformViewAndroidJNI> &, unsigned char &>]) [armeabi-v7a]
#04 pc 000d8cdd /apex/com.android.art/lib/libart.so (art_quick_generic_jni_trampoline+44) [armeabi-v7a::c9ca3baf3fb1e7df7b3097ba45d0a3a6]
#05 pc 000d41d5 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub_internal+68) [armeabi-v7a::c9ca3baf3fb1e7df7b3097ba45d0a3a6]
#06 pc 004fa851 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub+280) [armeabi-v7a::c9ca3baf3fb1e7df7b3097ba45d0a3a6]
#07 pc 0012c89f /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+142) [armeabi-v7a::c9ca3baf3fb1e7df7b3097ba45d0a3a6]
#08 pc 00242107 /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+250) [armeabi-v7a::c9ca3baf3fb1e7df7b3097ba45d0a3a6]
#09 pc 0023a60f /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+746) [armeabi-v7a::c9ca3baf3fb1e7df7b3097ba45d0a3a6]
#10 pc 004ee149 /apex/com.android.art/lib/libart.so (MterpInvokeDirect+512) [armeabi-v7a::c9ca3baf3fb1e7df7b3097ba45d0a3a6]
#11 pc 000ced14 /apex/com.android.art/lib/libart.so (mterp_op_invoke_direct+20) [armeabi-v7a::c9ca3baf3fb1e7df7b3097ba45d0a3a6]
java:
io.flutter.embedding.engine.FlutterJNI.performNativeAttach(FlutterJNI.java:315)
io.flutter.embedding.engine.FlutterJNI.attachToNative(FlutterJNI.java:310)
io.flutter.embedding.engine.FlutterEngine.attachToJni(FlutterEngine.java:350)
io.flutter.embedding.engine.FlutterEngine.<init>(FlutterEngine.java:329)
io.flutter.embedding.engine.FlutterEngine.<init>(FlutterEngine.java:204)
io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.setupFlutterEngine(FlutterActivityAndFragmentDelegate.java:244)
io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:155)
io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:409)
android.app.Activity.performCreate(Activity.java:8029)
android.app.Activity.performCreate(Activity.java:8013)
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310)
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3578)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3757)
android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2166)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:223)
android.app.ActivityThread.main(ActivityThread.java:7959)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:956)

log of flutter doctor -v:

flutter doctor -v
[✓] Flutter (Channel stable, 2.0.6, on Mac OS X 10.15.7 19H1217 darwin-x64, locale zh-Hans-CN)
    • Flutter version 2.0.6 at /Users/sawyer/flutter
    • Framework revision 1d9032c7e1 (3 months ago), 2021-04-29 17:37:58 -0700
    • Engine revision 05e680e202
    • Dart version 2.12.3
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/sawyer/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.57.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.25.0

[✓] Connected device (2 available)
    • Lenovo L70081 (mobile) • android-arm64-v8a  • Android 11 (API 30)
    • Chrome (web)      • chrome           • web-javascript • Google Chrome 75.0.3770.142

• No issues found!
darshankawar commented 3 years ago

@flutter-symbolizer-bot https://github.com/flutter/flutter/issues/87796#issue-962624713 engine#05e680e202

darshankawar commented 3 years ago

@flutter-symbolizer-bot #87796 (comment) engine#05e680e202

flutter-symbolizer-bot commented 3 years ago

@darshankawar No crash reports found. I used the following overrides when looking for reports

SymbolizationOverrides(engineHash: 05e680e202, flutterVersion: null, arch: null, mode: null, force: false, format: null, os: null)

Note that I can only find native Android and iOS crash reports automatically, you need to explicitly point me to crash reports in other supported formats.

If the crash report is embedded into a log and prefixed with additional information I might not be able to automatically strip those prefixes. Currently I only support flutter run -v, adb logcat and device lab logs.

See my documentation for more details on how to do that.

darshankawar commented 3 years ago

@flutter-symbolizer-bot https://github.com/flutter/flutter/issues/87796#issue-962624713 engine#05e680e202

flutter-symbolizer-bot commented 3 years ago

@darshankawar No crash reports found. I used the following overrides when looking for reports

SymbolizationOverrides(engineHash: 05e680e202, flutterVersion: null, arch: null, mode: null, force: false, format: null, os: null)

Note that I can only find native Android and iOS crash reports automatically, you need to explicitly point me to crash reports in other supported formats.

If the crash report is embedded into a log and prefixed with additional information I might not be able to automatically strip those prefixes. Currently I only support flutter run -v, adb logcat and device lab logs.

See my documentation for more details on how to do that.

darshankawar commented 3 years ago

@flutter-symbolizer-bot https://github.com/flutter/flutter/issues/87796#issue-962624713 flutter#v2.0.6 force android release arm32

flutter-symbolizer-bot commented 3 years ago

@darshankawar No crash reports found. I used the following overrides when looking for reports

SymbolizationOverrides(engineHash: null, flutterVersion: 2.0.6, arch: null, mode: release, force: true, format: null, os: null)

Note that I can only find native Android and iOS crash reports automatically, you need to explicitly point me to crash reports in other supported formats.

If the crash report is embedded into a log and prefixed with additional information I might not be able to automatically strip those prefixes. Currently I only support flutter run -v, adb logcat and device lab logs.

See my documentation for more details on how to do that.

darshankawar commented 3 years ago

From the log, it seems to be crashing on ARM 32-bit DartVM (../../third_party/dart/runtime/vm/dart.cc:297) [armeabi-v7a].

Keeping this issue open for further investigation from team and will need additional triage.

cc: @mraleph

mraleph commented 3 years ago

@SawyerEve seems like an out-of-memory to me based on the symptoms (we could probably add some checks into InitNullAndBool to make it more obvious). I don't think we will be able to actually fix this without a reproduction of some sort. /cc @rmacnak-google

(@darshankawar the stack is already symbolized - no need for additional symbolization).

SawyerEve commented 3 years ago

Hello @mraleph , Thank you for your reply. I don’t think it is triggered by OOM, because it can be reproduced stably. Every time it reports InitNullAndBool, it is stable at dart/runtime/vm/object.cc:2508, and its memory data performs well.

Attach a video link to reproduce the bug: https://user-images.githubusercontent.com/13621650/128680053-9b4f7f2d-ec9d-4612-bdff-53e3e6f0f912.MP4 image

Maybe this machine is too new, it was only released a few months ago

mraleph commented 3 years ago

@SawyerEve if you can reproduce the problem, do you have an output from logcat or tombstone for this crash?

I suggest that this is an OOM based on the location of the crash. The code in question allocates a number of small objects (null, true and false to be specific) and fills them in with data. The code in question is extremely simple and is executed every single time when Dart VM is initialized. The only way for this code to crash (excluding some really obscure possibilities, like C++ compiler producing some code that does not work on some specific devices) is if allocation routine returned a nullptr - InitNullAndBool does not actually guard against a possibility of that happening.

If you have crash details from logcat and/or tombstone then we can take a look at that and confirm or deny my hypothesis.

SawyerEve commented 3 years ago

Hello @mraleph , thank you for your patience. The following is the logcat at the time of the crash:

0W Bundle : at com.wrapper.proxyapplication.WrapperProxyApplication.onCreate(WrapperProxyApplication.java:466)
108-06 17:04:46.165 26880 26880 W Bundle : at com.xxx.xxx.MyWrapperProxyApplication.onCreate(MyWrapperProxyApplication.java:13)
208-06 17:04:46.165 26880 26880 W Bundle : at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1193)
308-06 17:04:46.165 26880 26880 W Bundle : at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6974)
408-06 17:04:46.165 26880 26880 W Bundle : at android.app.ActivityThread.access$1400(ActivityThread.java:249)
508-06 17:04:46.165 26880 26880 W Bundle : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2013)
608-06 17:04:46.165 26880 26880 W Bundle : at android.os.Handler.dispatchMessage(Handler.java:106)
708-06 17:04:46.165 26880 26880 W Bundle : at android.os.Looper.loop(Looper.java:223)
808-06 17:04:46.165 26880 26880 W Bundle : at android.app.ActivityThread.main(ActivityThread.java:7959)
908-06 17:04:46.165 26880 26880 W Bundle : at java.lang.reflect.Method.invoke(Native Method)
1008-06 17:04:46.165 26880 26880 W Bundle : at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
1108-06 17:04:46.165 26880 26880 W Bundle : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:956)
1208-06 17:04:46.166 26880 26915 I myApp: prfChannelId != fileChannelId = | prfChannelId = 82(P:26880)(T:2)(C:ChannelUtil)at (ChannelUtils.java:42)
1308-06 17:04:46.180 26880 26915 I myApp: init Config:Product(P:26880)(T:2)(C:AppConfig)at (AppConfig.java:24)
1408-06 17:04:46.181 26880 26915 I myApp: ServiceWorker start:9754(P:26880)(T:9754)(C:)at (ServiceCenter.java:54)
1508-06 17:04:46.183 26880 26915 I myApp: initDnsResolver(P:26880)(T:2)(C:HttpDns)at (HttpDns.java:77)
1608-06 17:04:46.197 26880 26880 I UtilsSDK: NO SDK restore
1708-06 17:04:46.198 26880 26880 I UtilsSDK: STOP:httpdns --- limit:2 count:2 restore:0 startSerialNumber:2 restoreSerialNumber:0 registerSerialNumber:3
1808-06 17:04:46.199 26880 26915 I myApp: preResolveHosts(P:26880)(T:2)(C:HttpDns)at (HttpDns.java:142)
1908-06 17:04:46.206 26880 26942 I beacon : url=http://beacon-api.aliyuncs.com/beacon/fetch/config/byappkey
2008-06 17:04:46.206 26880 26940 I beacon : url=http://beacon-api.aliyuncs.com/beacon/fetch/config/byappkey
2108-06 17:04:46.206 26880 26940 I DpmTcmClient: RegisterTcmMonitor from: $Proxy1
2208-06 17:04:46.333 26880 26940 I beacon : [fetchByAppKey] result: {"errCode":"OK","result":[{"value":"{\"status\":\"normal\",\"ut\":\"enable\"}","key":"___push_service___"},{"value":"{\"status\":\"normal\",\"ut\":\"enable\"}","key":"___hotfix_service___"},{"value":"{\"status\":\"normal\",\"ut\":\"enable\"}","key":"___feedback_service___"},{"value":"{\"status\":\"normal\",\"ut\":\"enable\",\"ip-ranking\":\"enable\"}","key":"___httpdns_service___"},{"value":"{\"status\":\"normal\"}","key":"___cloudcode_service___"}]}
2308-06 17:04:46.333 26880 26940 I BeaconConfigManager: beacon onUpdate
2408-06 17:04:46.333 26880 26940 I BeaconConfigManager: beacon onUpdate:normal
2508-06 17:04:46.348 26880 26942 I beacon : [fetchByAppKey] result: {"errCode":"OK","result":[{"value":"{\"status\":\"normal\",\"ut\":\"enable\"}","key":"___push_service___"},{"value":"{\"status\":\"normal\",\"ut\":\"enable\"}","key":"___hotfix_service___"},{"value":"{\"status\":\"normal\",\"ut\":\"enable\"}","key":"___feedback_service___"},{"value":"{\"status\":\"normal\",\"ut\":\"enable\",\"ip-ranking\":\"enable\"}","key":"___httpdns_service___"},{"value":"{\"status\":\"normal\"}","key":"___cloudcode_service___"}]}
2608-06 17:04:46.348 26880 26942 D HTTPDNS:BeaconManager: httpdns configs:{"status":"normal","ut":"enable","ip-ranking":"enable"}
2708-06 17:04:46.348 26880 26942 D HTTPDNS:BeaconManager: is report enabled:enable
2808-06 17:04:46.348 26880 26942 D HTTPDNS:BeaconManager: is IP probe enabled:enable
2908-06 17:04:46.394 26880 26915 I myApp: initDefault, isEmulator:false(P:26880)(T:2)(C:IConfigProvider)at (BuglyProvider.kt:39)
3008-06 17:04:46.394 26880 26915 I myApp: detectEmulator false(P:26880)(T:9741)(C:CoreValue)at (CoreValue.java:234)
3108-06 17:04:46.394 26880 26915 E myApp: Exception occurs at(P:26880)(T:9741)(C:Executor)at (Pools.java:24)
3208-06 17:04:46.394 26880 26915 I myApp: native init uMappKey---5f83d18380455950e4a789e7, isTestEnv:false, (P:26880)(T:2)(C:PushManager)at (PushProvider.kt:36)
3308-06 17:04:46.396 26880 26880 I MMKV : <MMKV.cpp:330::loadFromFile> loading [.configuration] with 0 size in total, file size is 4096
3408-06 17:04:46.396 26880 26880 I MMKV : <MMKV.cpp:375::loadFromFile> loaded [.configuration] with 0 values
3508-06 17:04:46.396 26880 26915 I myApp: init uMappKey:5f83d18380455950e4a789e7,---isInit:false, hasPrivacy:false, hasPermission:false, isTestEnv:false, granted! (P:26880)(T:2)(C:PushManager)at (PushManager.kt:44)
3608-06 17:04:46.422 26880 26880 I TetheringManager: registerTetheringEventCallback:com.xxx.xxx
3708-06 17:04:46.429 26880 26880 W System.err: java.lang.NumberFormatException: For input string: ""
3808-06 17:04:46.429 26880 26880 W System.err: at java.lang.Integer.parseInt(Integer.java:627)
3908-06 17:04:46.429 26880 26880 W System.err: at java.lang.Integer.parseInt(Integer.java:650)
4008-06 17:04:46.429 26880 26880 W System.err: at com.dysdk.lib.push.DYPush.isEMUI(DYPush.java:304)
4108-06 17:04:46.429 26880 26880 W System.err: at com.dysdk.lib.push.DYPush.registerHUAWEIPush(DYPush.java:205)
4208-06 17:04:46.429 26880 26880 W System.err: at com.dysdk.lib.push.DYPush.startThirdPush(DYPush.java:193)
4308-06 17:04:46.429 26880 26880 W System.err: at com.dysdk.lib.push.DYPush.init(DYPush.java:71)
4408-06 17:04:46.429 26880 26880 W System.err: at com.zygote.frog_push_plugin.PushManager$Companion.init(PushManager.kt:47)
4508-06 17:04:46.429 26880 26880 W System.err: at com.xxx.xxx.providers.PushProvider.initDefault(PushProvider.kt:37)
4608-06 17:04:46.429 26880 26880 W System.err: at com.xxx.xxx.app.ConfigProvider.initDefault(ConfigProvider.kt:40)
4708-06 17:04:46.429 26880 26880 W System.err: at com.tcloud.core.app.AppConfig.init(AppConfig.java:25)
4808-06 17:04:46.429 26880 26904 D CompatibilityChangeReporter: Compat change id reported: 150939131; UID 10235; state: DISABLED
4908-06 17:04:46.429 26880 26880 W System.err: at com.tcloud.core.app.BaseApp.onCreate(BaseApp.java:68)
5008-06 17:04:46.429 26880 26880 W System.err: at com.xxx.xxx.app.myAppApp.onCreate(myAppApp.kt:21)
5108-06 17:04:46.429 26880 26880 W System.err: at com.tcloud.core.tinker.TinkerLikeApp.onCreate(TinkerLikeApp.java:34)
5208-06 17:04:46.429 26880 26880 W System.err: at com.tencent.tinker.entry.TinkerApplicationInlineFence.onCreateImpl_$noinline$(TinkerApplicationInlineFence.java:99)
5308-06 17:04:46.429 26880 26880 W System.err: at com.tencent.tinker.entry.TinkerApplicationInlineFence.onCreate(TinkerApplicationInlineFence.java:110)
5408-06 17:04:46.429 26880 26880 W System.err: at com.tencent.tinker.loader.app.TinkerApplication.onCreate(TinkerApplication.java:153)
5508-06 17:04:46.429 26880 26880 W System.err: at com.xxx.xxx.app.myAppApplication.onCreate(myAppApplication.kt:19)
5608-06 17:04:46.429 26880 26880 W System.err: at com.wrapper.proxyapplication.WrapperProxyApplication.Ooo0ooO0oO(Native Method)
5708-06 17:04:46.429 26880 26880 W System.err: at com.wrapper.proxyapplication.WrapperProxyApplication.onCreate(WrapperProxyApplication.java:466)
5808-06 17:04:46.429 26880 26880 W System.err: at com.xxx.xxx.MyWrapperProxyApplication.onCreate(MyWrapperProxyApplication.java:13)
5908-06 17:04:46.429 26880 26880 W System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1193)
6008-06 17:04:46.429 26880 26880 W System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6974)
6108-06 17:04:46.429 26880 26880 W System.err: at android.app.ActivityThread.access$1400(ActivityThread.java:249)
6208-06 17:04:46.429 26880 26880 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2013)
6308-06 17:04:46.429 26880 26880 W System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
6408-06 17:04:46.429 26880 26880 W System.err: at android.os.Looper.loop(Looper.java:223)
6508-06 17:04:46.429 26880 26880 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7959)
6608-06 17:04:46.429 26880 26880 W System.err: at java.lang.reflect.Method.invoke(Native Method)
6708-06 17:04:46.429 26880 26880 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
6808-06 17:04:46.429 26880 26880 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:956)
6908-06 17:04:46.431 26880 26880 E mcssdk---: MCS-->isExistPackage NameNotFoundException:com.coloros.mcs
7008-06 17:04:46.438 26880 26968 D VivoPush.PushClientThread: (26880)PushClientThread-handleMessage, task = c{InitCommand}
7108-06 17:04:46.438 26880 26880 E ActivityThread: Failed to find provider info for com.vivo.push.sdk.service.SystemPushConfig
7208-06 17:04:46.438 26880 26880 E VivoPush.PushPackageUtils: (26880)cursor is null
7308-06 17:04:46.438 26880 26880 E VivoPush.Utility: (26880)systemPushPkgName is null
7408-06 17:04:46.441 26880 26968 W System.err: java.io.FileNotFoundException: /storage/emulated/0/.vivo/pushsdk/config/config.txt: open failed: EACCES (Permission denied)
7508-06 17:04:46.441 26880 26968 W System.err: at libcore.io.IoBridge.open(IoBridge.java:492)
7608-06 17:04:46.441 26880 26968 W System.err: at java.io.FileInputStream.<init>(FileInputStream.java:160)
7708-06 17:04:46.441 26880 26968 W System.err: at java.io.FileInputStream.<init>(FileInputStream.java:115)
7808-06 17:04:46.441 26880 26968 W System.err: at com.vivo.push.util.u.a(SdcardCache.java:117)
7908-06 17:04:46.441 26880 26968 W System.err: at com.vivo.push.util.u.a(SdcardCache.java:57)
8008-06 17:04:46.441 26880 26968 W System.err: at com.vivo.push.util.y.a(SystemCache.java:87)
8108-06 17:04:46.441 26880 26968 W System.err: at com.vivo.push.cache.d.c(ICacheSettings.java:2078)
8208-06 17:04:46.441 26880 26968 W System.err: at com.vivo.push.cache.d.<init>(ICacheSettings.java:28)
8308-06 17:04:46.441 26880 26968 W System.err: at com.vivo.push.cache.a.<init>(AppConfigSettings.java:35)
8408-06 17:04:46.441 26880 26968 W System.err: at com.vivo.push.cache.ClientConfigManagerImpl.<init>(ClientConfigManagerImpl.java:26)
8508-06 17:04:46.441 26880 26968 W System.err: at com.vivo.push.cache.ClientConfigManagerImpl.getInstance(ClientConfigManagerImpl.java:35)
8608-06 17:04:46.441 26880 26968 W System.err: at com.vivo.push.c.c.a(InitTask.java:21)
8708-06 17:04:46.441 26880 26968 W System.err: at com.vivo.push.v.run(PushClientTask.java:34)
8808-06 17:04:46.441 26880 26968 W System.err: at com.vivo.push.x.handleMessage(PushClientThread.java:27)
8908-06 17:04:46.441 26880 26968 W System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
9008-06 17:04:46.441 26880 26968 W System.err: at android.os.Looper.loop(Looper.java:223)
9108-06 17:04:46.441 26880 26968 W System.err: at android.os.HandlerThread.run(HandlerThread.java:67)
9208-06 17:04:46.441 26880 26968 W System.err: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
9308-06 17:04:46.441 26880 26968 W System.err: at libcore.io.Linux.open(Native Method)
9408-06 17:04:46.441 26880 26968 W System.err: at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
9508-06 17:04:46.441 26880 26968 W System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
9608-06 17:04:46.441 26880 26968 W System.err: at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
9708-06 17:04:46.441 26880 26968 W System.err: at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7845)
9808-06 17:04:46.441 26880 26968 W System.err: at libcore.io.IoBridge.open(IoBridge.java:478)
9908-06 17:04:46.441 26880 26968 W System.err: ... 16 more
10008-06 17:04:46.442 26880 26968 W System.err: java.io.FileNotFoundException: /storage/emulated/0/.vivo/pushsdk/config/config.txt: open failed: EACCES (Permission denied)
10108-06 17:04:46.442 26880 26968 W System.err: at libcore.io.IoBridge.open(IoBridge.java:492)
10208-06 17:04:46.442 26880 26968 W System.err: at java.io.FileInputStream.<init>(FileInputStream.java:160)
10308-06 17:04:46.442 26880 26968 W System.err: at java.io.FileInputStream.<init>(FileInputStream.java:115)
10408-06 17:04:46.442 26880 26968 W System.err: at com.vivo.push.util.u.a(SdcardCache.java:117)
10508-06 17:04:46.442 26880 26968 W System.err: at com.vivo.push.util.u.a(SdcardCache.java:57)
10608-06 17:04:46.442 26880 26968 W System.err: at com.vivo.push.util.y.a(SystemCache.java:87)
10708-06 17:04:46.442 26880 26968 W System.err: at com.vivo.push.cache.d.c(ICacheSettings.java:2078)
10808-06 17:04:46.442 26880 26968 W System.err: at com.vivo.push.cache.d.<init>(ICacheSettings.java:28)
10908-06 17:04:46.442 26880 26968 W System.err: at com.vivo.push.cache.f.<init>(PushConfigSettings.java:126)
11008-06 17:04:46.442 26880 26968 W System.err: at com.vivo.push.cache.ClientConfigManagerImpl.<init>(ClientConfigManagerImpl.java:27)
11108-06 17:04:46.442 26880 26968 W System.err: at com.vivo.push.cache.ClientConfigManagerImpl.getInstance(ClientConfigManagerImpl.java:35)
11208-06 17:04:46.442 26880 26968 W System.err: at com.vivo.push.c.c.a(InitTask.java:21)
11308-06 17:04:46.442 26880 26968 W System.err: at com.vivo.push.v.run(PushClientTask.java:34)
11408-06 17:04:46.442 26880 26968 W System.err: at com.vivo.push.x.handleMessage(PushClientThread.java:27)
11508-06 17:04:46.442 26880 26968 W System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
11608-06 17:04:46.442 26880 26968 W System.err: at android.os.Looper.loop(Looper.java:223)
11708-06 17:04:46.442 26880 26968 W System.err: at android.os.HandlerThread.run(HandlerThread.java:67)
11808-06 17:04:46.442 26880 26968 W System.err: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
11908-06 17:04:46.442 26880 26968 W System.err: at libcore.io.Linux.open(Native Method)
12008-06 17:04:46.442 26880 26968 W System.err: at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
12108-06 17:04:46.442 26880 26968 W System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
12208-06 17:04:46.442 26880 26968 W System.err: at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
12308-06 17:04:46.442 26880 26968 W System.err: at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7845)
12408-06 17:04:46.442 26880 26968 W System.err: at libcore.io.IoBridge.open(IoBridge.java:478)
12508-06 17:04:46.442 26880 26968 W System.err: ... 16 more
12608-06 17:04:46.443 26880 26968 W System.err: java.io.FileNotFoundException: /storage/emulated/0/.vivo/pushsdk/config/config.txt: open failed: EACCES (Permission denied)
12708-06 17:04:46.443 26880 26968 W System.err: at libcore.io.IoBridge.open(IoBridge.java:492)
12808-06 17:04:46.443 26880 26968 W System.err: at java.io.FileInputStream.<init>(FileInputStream.java:160)
12908-06 17:04:46.443 26880 26968 W System.err: at java.io.FileInputStream.<init>(FileInputStream.java:115)
13008-06 17:04:46.443 26880 26968 W System.err: at com.vivo.push.util.u.a(SdcardCache.java:117)
13108-06 17:04:46.443 26880 26968 W System.err: at com.vivo.push.util.u.a(SdcardCache.java:57)
13208-06 17:04:46.443 26880 26968 W System.err: at com.vivo.push.util.y.a(SystemCache.java:87)
13308-06 17:04:46.443 26880 26968 W System.err: at com.vivo.push.cache.d.c(ICacheSettings.java:2078)
13408-06 17:04:46.443 26880 26968 W System.err: at com.vivo.push.cache.ClientConfigManagerImpl.isDebug(ClientConfigManagerImpl.java:152)
13508-06 17:04:46.443 26880 26968 W System.err: at com.vivo.push.c.c.a(InitTask.java:21)
13608-06 17:04:46.443 26880 26968 W System.err: at com.vivo.push.v.run(PushClientTask.java:34)
13708-06 17:04:46.443 26880 26968 W System.err: at com.vivo.push.x.handleMessage(PushClientThread.java:27)
13808-06 17:04:46.443 26880 26968 W System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
13908-06 17:04:46.443 26880 26968 W System.err: at android.os.Looper.loop(Looper.java:223)
14008-06 17:04:46.443 26880 26968 W System.err: at android.os.HandlerThread.run(HandlerThread.java:67)
14108-06 17:04:46.443 26880 26968 W System.err: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
14208-06 17:04:46.443 26880 26968 W System.err: at libcore.io.Linux.open(Native Method)
14308-06 17:04:46.443 26880 26968 W System.err: at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
14408-06 17:04:46.443 26880 26968 W System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
14508-06 17:04:46.443 26880 26968 W System.err: at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
14608-06 17:04:46.443 26880 26968 W System.err: at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7845)
14708-06 17:04:46.443 26880 26968 W System.err: at libcore.io.IoBridge.open(IoBridge.java:478)
14808-06 17:04:46.443 26880 26968 W System.err: ... 13 more
14908-06 17:04:46.458 26880 26985 D FileCheckUtils: st.getAvailableBlocks()=41920807,st.getAvailableBlocks() * blockSize=171707625472
15008-06 17:04:46.468 26880 26963 E huan.myApp: No implementation found for int org.android.netutil.UdpConnectType.nativeTestUdpConnectIpv4() (tried Java_org_android_netutil_UdpConnectType_nativeTestUdpConnectIpv4 and Java_org_android_netutil_UdpConnectType_nativeTestUdpConnectIpv4__)
15108-06 17:04:46.489 26880 26915 I myApp: initProduct(P:26880)(T:2)(C:IConfigProvider)at (BuglyProvider.kt:34)
15208-06 17:04:46.489 26880 26915 I myApp: afterInit(P:26880)(T:2)(C:IConfigProvider)at (BuglyProvider.kt:30)
15308-06 17:04:46.489 26880 26915 I myApp: app init, v3.0.2-1159-82-Lenovo-Lenovo L70081-11(P:26880)(T:2)(C:BaseApp)at (BaseApp.java:77)
15408-06 17:04:46.490 26880 26915 I myApp: registerReceiver---,topActivity:null(P:26880)(T:2)(C:pushLog)at (UniLinkUtil.kt:29)
15508-06 17:04:46.491 26880 26880 I YES_FD : startCheckFD start
15608-06 17:04:46.530 26880 26915 I myApp: init with channel:82,appId:541235c1ac, test:false (P:26880)(T:2)(C:BuglyCrash)at (BuglyCrash.java:55)
15708-06 17:04:46.531 26880 26915 I myApp: registerNetworkChange(P:26880)(T:2)(C:NetworkModule)at (NetworkModule.java:58)
15808-06 17:04:46.533 26880 26915 I myApp: loadService interface com.tcloud.core.connect.service.IConnectService(P:26880)(T:2)(C:ServiceLoader)at (ServiceLoader.java:71)
15908-06 17:04:46.533 26880 26915 I myApp: onAvailable(P:26880)(T:9796)(C:NetworkModule)at (NetworkModule.java:68)
16008-06 17:04:46.533 26880 26915 I myApp: loadService ok com.tcloud.core.connect.service.ConnectService(P:26880)(T:2)(C:ServiceLoader)at (ServiceLoader.java:78)
16108-06 17:04:46.534 26880 26915 I myApp: sFirstCheck: false, networkAvailable: true(P:26880)(T:9796)(C:NetworkModule)at (NetworkModule.java:42)
16208-06 17:04:46.534 26880 26915 I myApp: Mars init(P:26880)(T:2)(C:MarsServiceProxy)at (MarsServiceProxy.java:114)
16308-06 17:04:46.534 26880 26915 I myApp: stopConnect(P:26880)(T:2)(C:ConnectService)at (ConnectService.java:203)
16408-06 17:04:46.534 26880 26915 I myApp: stopService(P:26880)(T:2)(C:Mars.MarsServiceProxy)at (MarsServiceProxy.java:277)
16508-06 17:04:46.535 26880 26915 E myApp: initHttpDns mMarsProfile == null(P:26880)(T:2)(C:TransmitCenter)at (TransmitCenter.java:74)
16608-06 17:04:46.536 26880 26915 I myApp: networkType: 4G(P:26880)(T:9796)(C:NetworkModule)at (NetworkModule.java:52)
16708-06 17:04:46.537 26880 26915 I myApp: moduleInit com.tcloud.core.module.CoreModule takes :7 ms(P:26880)(T:2)(C:ModuleMgr)at (ModuleMgr.java:50)
16808-06 17:04:46.537 26880 26915 I myApp: onModuleInit ---(P:26880)(T:2)(C:pushLog)at (myAppApp.kt:32)
16908-06 17:04:46.543 26880 26880 W Typeface: setThemeFont(): FontPath Not Changed!
17008-06 17:04:46.545 26880 26915 I myApp: created: MainActivity(P:26880)(T:2)(C:AppLifeCycleHelper)at (AppLifeCycleHelper.java:37)
17108-06 17:04:46.547 26880 26915 E myApp: Exception occurs at(P:26880)(T:9743)(C:Executor)at (Pools.java:24)
17208-06 17:04:46.553 26880 26880 W huan.myApp: type=1400 audit(0.0:158248): avc: denied { read } for name="max_map_count" dev="proc" ino=31524126 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:proc_max_map_count:s0 tclass=file permissive=0 app=com.xxx.xxx
17308-06 17:04:46.560 26880 26880 E DartVM : Exhausted heap space, trying to allocate 8 bytes.
mraleph commented 3 years ago

So this is indeed some form of OOM:

17308-06 17:04:46.560 26880 26880 E DartVM : Exhausted heap space, trying to allocate 8 bytes.

OS has likely refused to allow VM to map necessary memory. Need either strace output (which unfortunately requires rooted device) or a custom/instrumented build of engine to confirm.

Is this crash device / Android version specific?

SawyerEve commented 3 years ago

Sorry, this is the customer’s machine and we cannot root it. Device Information: Lenovo L70081 (mobile) • Android 11 (API 30)

Hixie commented 3 years ago

If we are just running out of memory there's not much we can do about this. The fact that the crash happens in Dart VM initialization and not other code (including possibly your own code) is probably just bad luck. Do you know if your application does much memory allocation? Do you have maybe a lot of code, or many assets, or something else?

If it's a bug in Dart (and not "just" the host application allocating a lot) it would be ideal if you could attach a sample app that reproduces the problem.

eggfly commented 3 years ago

@SawyerEve https://github.com/flutter/flutter/issues/85372 this issue maybe the related issue, both they have large memory device, only arm32 .so library no 64 bit, and both have error log: Exhausted heap space, trying to allocate 8 bytes.

eggfly commented 3 years ago

And this issue: https://github.com/flutter/flutter/issues/86855

BeEagle commented 3 years ago

Help,We have the same problem with our app, it crashes when the app is first launched, and looking at the stack, it crashes after the nativeAttach method。

`#00 pc 0043c5b4 /data/app/lib/arm/libflutter.so

01 pc 00186ae0 /data/app/lib/arm/libflutter.so

#02 pc 0019495e  /data/app/lib/arm/libflutter.so
#03 pc 00156c90  /data/app//lib/arm/libflutter.so

at io.flutter.embedding.engine.FlutterJNI.nativeAttach(Native Method) at io.flutter.embedding.engine.FlutterJNI.performNativeAttach(ProGuard:317) at io.flutter.embedding.engine.FlutterJNI.attachToNative(ProGuard:312) at io.flutter.embedding.engine.FlutterEngine.attachToJni(ProGuard:350) at io.flutter.embedding.engine.FlutterEngine.(ProGuard:329) at io.flutter.embedding.engine.FlutterEngine.(ProGuard:260) at io.flutter.embedding.engine.FlutterEngine.(ProGuard:240)`

Hixie commented 3 years ago

@BeEagle It would be ideal if you could attach a sample app that reproduces the problem; we're unlikely to be able to track down the problem without steps to reproduce.

github-actions[bot] commented 3 years ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

rmacnak-google commented 3 years ago

I think this has the same underlying cause as https://github.com/flutter/flutter/issues/86855

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.