[Samsung Galaxy S7 Questions and Answers] dany123i:
TLDR: random freeze (for 10-15s) followed by reboot, tried everything, it's getting worse (can't use the phone at all), no idea what to do, probably throw to bin and not buy samsungs anymore

Hello everyone,

My daily phone started having crashes yesterday: in (arguably random) moments while using it, it just hangs for ~10s then reboots immediately. After some tinkling/searching/trying stuff, I found out it crashes with 95% probability if I go to settings, debugging options and click on running services, it also crashed a few times while loading the app list, and a few times while using waze.

The phone is completely official, not even custom recovery, no root, nothing. I didn't install anything new right before the crashes, but I still deleted all the recent apps I've downloaded for the last weeks and it still crashes. It also crashed in SAFE MODE which is pretty disturbing as it seems to me it's something very serious and not just some random app.

The story:

The very first crash happened while using the Waze app and trying to open Samsung music and connecting to my bluetooth headphones (which I usually do without problems, last time I did this was 2 days ago for a 1h trip without problems), a few seconds after my headphones connected the screen just froze and the phone rebooted. My first reaction was it probably got overheated (as It was really hot outside) so I just put it in the air vent and continued driving with google maps. About 30 mins later I switched again to waze, no crashes, also powered on my headphones, again no crashes. 1h later I got a phone call and immediately after finishing the call and the phone tried to switch back to the homescreen (or waze app, not sure), it crashed.

After getting home I uninstalled waze (the main suspect here) and turned off bluetooth and it just crashed after 5-10 mins of randomly trying to see what's wrong. I kept having more and more frequent crashes (it seems that not touching the phone right after rebooting for at least 10 mins is helping here as it otherwise would crash again). It also got stuck in the Samsung logo for a while and I thought I completely lost it but it seems like to force reboot the combination is 8seconds of power+volume up (not just power). At this point I started deleting most of the apps I didn't have for more than a few months and even tried safe mode but still going through settings, app list and into the services menu almost always crashed the phone. I also removed the microsd card (which seemed to help temporarily as I could see the services now, but the crashes came back after a very short while even without the card and sim) and cleaned up recent photos (took some raw photos the night before for the first time in a long while, moved them to the pc and deleted them from the phone).

Debugging:

After having no luck with removing the microsd card, the sim and deleting all the recently installed apps (from the last 2-3 weeks) and also wiping cache (and some data) to most of the bigger apps, I installed adb and tried some adb logcat > file.txt and used the phone to try to get to the crash.

The logcat files are huge, but trying to look at the last few seconds (hundreds of lines) the only obvious error is this one regarding memory/memtrack:

[ 07-19 12:47:22.389 3666: 4249 W/android.os.Debug ]
failed to get memory consumption info: -1

[ 07-19 12:47:22.409 3666: 4249 E/memtrack ]
Couldn't load memtrack module

[ 07-19 12:47:22.409 3666: 4249 W/android.os.Debug ]
failed to get memory consumption info: -1

[ 07-19 12:47:22.429 3666: 4249 E/memtrack ]
Couldn't load memtrack module

[ 07-19 12:47:22.429 3666: 4249 W/android.os.Debug ]
failed to get memory consumption info: -1

Searching for memtrack in the 5 logcat files I got (only 3 of them had the crash) results in about 3400+ hits for this word.

---------

I just tried again to get a crash for fresh logs and this time I couldn't get it in the settings services/app list but while opening and closing a few apps, last one gmail and yahoo mail, before the samsung's game launcher. There seems to be something new with thousands of hits:

07-19 22:35:26.904 9074 9074 W ResourceType: For resource 0x7f0607f8, entry index(2040) is beyond type entryCount(533)
07-19 22:35:26.904 9074 9074 W ResourceType: For resource 0x7f1405f5, entry index(1525) is beyond type entryCount(385)
07-19 22:35:26.904 9074 9074 W ResourceType: For resource 0x7f1406bd, entry index(1725) is beyond type entryCount(385)
07-19 22:35:26.904 9074 9074 W ResourceType: For resource 0x7f1406a2, entry index(1698) is beyond type entryCount(385)
07-19 22:35:26.904 9074 9074 W ResourceType: For resource 0x7f1406a3, entry index(1699) is beyond type entryCount(385)
07-19 22:35:26.904 9074 9074 W ResourceType: For resource 0x7f1406ba, entry index(1722) is beyond type entryCount(385)
07-19 22:35:26.904 9074 9074 W ResourceType: For resource 0x7f14073e, entry index(1854) is beyond type entryCount(385)

filtering for 9074 gives some weird stuff (20.000+ search results):

07-19 22:35:27.913 9074 9074 W ResourceType: For resource 0x7f06033a, entry index(826) is beyond type entryCount(533)
07-19 22:35:27.972 3653 3795 D MdnieScenarioControlService: packageName : com.google.android.gm className : com.google.android.gm.ConversationListActivityGmail
07-19 22:35:27.973 3653 3795 V MdnieScenarioControlService: setUIMode from UI function(3)
07-19 22:35:27.990 9074 9074 V InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@17443a5 nm : com.google.android.gm ic=null
07-19 22:35:27.990 9074 9074 I InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
07-19 22:35:27.990 3653 10860 D InputMethodManagerService: startInputOrWindowGainedFocus : startInput
07-19 22:35:27.991 3653 10860 D InputMethodManagerService: setCurrentInputInfo - inputContext : null eidtorInfo : android.view.inputmethod.EditorInfo@15e4e91 missingMethods : 0
07-19 22:35:27.991 23401 23401 I InputMethodWrapper: call dispatchStartInputWithToken
07-19 22:35:27.992 23401 23401 I InputMethodService: dispatchStartInputWithToken
07-19 22:35:27.992 9074 9074 W Gmail : RVGmail:Problem with folder list cursor returned from loader
07-19 22:35:28.004 9074 9074 W Gmail : RVGmail:Problem with folder list cursor returned from loader
07-19 22:35:28.013 3323 3602 D DnsProxyListener: DNSDBG::dns addrinfo af 2
07-19 22:35:28.014 3323 3602 D DnsProxyListener: DNSDBG::dns addrinfo af 2
07-19 22:35:28.039 9074 9074 W Gmail : AccountUtils:For b/73513912, load account <.................removed some id that looked private.....................> from MailAppProvider. Is account valid result: 2.
07-19 22:35:28.055 9074 9079 I zygote64: Do partial code cache collection, code=243KB, data=138KB
07-19 22:35:28.056 9074 9079 I zygote64: After code cache collection, code=236KB, data=135KB
07-19 22:35:28.056 9074 9079 I zygote64: Increasing code cache capacity to 1024KB
07-19 22:35:28.070 9074 9246 I zygote64: Deoptimizing void bcel.a(java.lang.Object) due to JIT inline cache
07-19 22:35:28.093 9074 9252 I zygote64: Deoptimizing void beuy.run() due to class hierarchy analysis
07-19 22:35:28.098 9074 9074 W atvt : FirebaseCrash1p.isCrashCollectionEnabled threw an exception
07-19 22:35:28.098 9074 9074 W atvt : java.lang.IllegalStateException: FirebaseCrash1p not initialized. Call FirebaseCrash1p.initFirebase() first.
07-19 22:35:28.098 9074 9074 W atvt :	at yap.b(Unknown Source:4)
07-19 22:35:28.098 9074 9074 W atvt :	at yap.a(Unknown Source:0)
07-19 22:35:28.098 9074 9074 W atvt :	at atvt.<init>(PG:2)
07-19 22:35:28.098 9074 9074 W atvt :	at osj.aI(PG:3)
07-19 22:35:28.098 9074 9074 W atvt :	at orv.b(PG:75)
07-19 22:35:28.098 9074 9074 W atvt :	at bhwj.b(PG:1)
07-19 22:35:28.098 9074 9074 W atvt :	at osj.aK(PG:7)
07-19 22:35:28.098 9074 9074 W atvt :	at osj.dX(PG:4)
07-19 22:35:28.098 9074 9074 W atvt :	at orv.b(PG:187)
07-19 22:35:28.098 9074 9074 W atvt :	at zmc.run(Unknown Source:4)
07-19 22:35:28.098 9074 9074 W atvt :	at android.os.Handler.handleCallback(Handler.java:789)
07-19 22:35:28.098 9074 9074 W atvt :	at android.os.Handler.dispatchMessage(Handler.java:98)
07-19 22:35:28.098 9074 9074 W atvt :	at android.os.Looper.loop(Looper.java:164)
07-19 22:35:28.098 9074 9074 W atvt :	at android.app.ActivityThread.main(ActivityThread.java:6944)
07-19 22:35:28.098 9074 9074 W atvt :	at java.lang.reflect.Method.invoke(Native Method)
07-19 22:35:28.098 9074 9074 W atvt :	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
07-19 22:35:28.098 9074 9074 W atvt :	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
07-19 22:35:28.113 3653 8233 D PowerManagerService: [api] setMasterBrightnessLimit : minBrightnss : -1 maxBrightness : 230 (uid: 1000 pid: 3653)
07-19 22:35:28.113 3653 8233 D PowerManagerService: mDisplayReady: false
07-19 22:35:28.113 3653 3687 D DisplayPowerController: animateScreenStateChange: target2
07-19 22:35:28.113 3653 3687 D DisplayPowerController: getFinalBrightness : Summary is 90 -> 90

but to me it just looks like gmail crashing down due to somethng else happening with the phone.

and before this there's a worrysome database error:

07-19 22:35:22.655 8740 8740 D SamsungAnalytics111040: cf feature is supported
07-19 22:35:22.656 3653 10860 D SamsungAlarmManager: setInexact Intent (T:2/F:0/AC:false) 20200719T223536 - CU:10024/CP:4569
07-19 22:35:22.656 3653 10860 I SamsungAlarmManager: setLocked to kernel - T:2 / 20200719T223536, SetElapsed=19355515, nowELAPSED=19341270
07-19 22:35:22.659 8740 8740 D SamsungAnalytics111040: [Tracker] Tracker start:1.11.040
07-19 22:35:22.659 4569 5388 E SQLiteDatabase: Error inserting period=10000 preferred_charging_state=1 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService required_network_type=0 runtime=1595187322643 required_idleness_state=0 source=16 service_kind=0 target_package=com.google.android.gms persistence_level=1 source_version=202414000 last_runtime=0 user_id=0 job_id=-1 requires_charging=0 tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG flex_time=4000 task_type=0 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}}
07-19 22:35:22.659 4569 5388 E SQLiteDatabase: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: pending_ops.tag, pending_ops.target_class, pending_ops.target_package, pending_ops.user_id (code 2067)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase: #################################################################
07-19 22:35:22.659 4569 5388 E SQLiteDatabase: Error Code : 2067 (SQLITE_CONSTRAINT_UNIQUE)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase: Caused By : Abort due to constraint violation.
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	(UNIQUE constraint failed: pending_ops.tag, pending_ops.target_class, pending_ops.target_package, pending_ops.user_id (code 2067))
07-19 22:35:22.659 4569 5388 E SQLiteDatabase: #################################################################
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:953)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1904)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1771)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at aqui.a(:com.google.android.gms@202414021@20.24.14 (040408-319035315):175)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at aqtk.a(:com.google.android.gms@202414021@20.24.14 (040408-319035315):182)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at aqtk.a(:com.google.android.gms@202414021@20.24.14 (040408-319035315):23)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at aqtk.a(:com.google.android.gms@202414021@20.24.14 (040408-319035315):177)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at aqpu.run(:com.google.android.gms@202414021@20.24.14 (040408-319035315):9)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at soy.b(:com.google.android.gms@202414021@20.24.14 (040408-319035315):12)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at soy.run(:com.google.android.gms@202414021@20.24.14 (040408-319035315):7)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at sux.run(:com.google.android.gms@202414021@20.24.14 (040408-319035315):0)
07-19 22:35:22.659 4569 5388 E SQLiteDatabase:	at java.lang.Thread.run(Thread.java:764)
07-19 22:35:22.660 8740 8740 I GameTools: SCPMHelper : load from saved.
07-19 22:35:22.661 8740 8740 I GameTools: GameToolsApplication : BootCompleteReceiver enabled.
07-19 22:35:22.662 3653 10860 I SamsungAlarmManager: setLocked to kernel - T:2 / 20200719T223718, SetElapsed=19457296, nowELAPSED=19341276
07-19 22:35:22.662 3653 10860 D SamsungAlarmManager: setExact Intent (T:2/F:0/AC:false) 20200719T223532 - CU:10024/CP:4569
07-19 22:35:22.663 3653 10860 I SamsungAlarmManager: setLocked to kernel - T:2 / 20200719T223532, SetElapsed=19351257, nowELAPSED=19341276
07-19 22:35:22.663 8740 8740 I GameTools: GameToolsApplication : initNotificationChannels
07-19 22:35:22.665 8726 8726 I FirebaseInitProvider: FirebaseApp initialization successful
07-19 22:35:22.669 8740 8740 I GameTools: GameToolsApplication : touchScreenLockSecureRecovery

----------------------------

Searching for this on google doesn't really bring in anything helpful so I'm trying my luck with you guys even though it's a really long shot to have anyone with this same exact error and this same exact phone. Any thoughts?

The attached photo is what I see before the reboot, I was trying to enter the My files app and it froze there. It looks like a small graphical artifact but I don't know if it's a cause or the result of the freeze.

My next step at this point would be to back up whatever I can (how do I even backup the 2FA on authenticator apps? ...) and do a factory reset and see how that goes. A new phone really wasn't in the plans right now as the S7 was actually holding up great.

Btw, does google cloud backup/samsung cloud backup even backup anything from the apps?