shevery icon indicating copy to clipboard operation
shevery copied to clipboard

App causes device to lag out a lot, crashing System UI and rendering device unresponsive for a few seconds

Open DaRealXx2023xX opened this issue 1 month ago • 2 comments

Requirements

  • [x] I am using the latest version from GitHub Releases.
  • [x] I am using a standard, tested ROM (no custom/untested forks).
  • [x] I have searched existing issues and this is not a duplicate.
  • [x] I am providing text logs, not screenshots of logs.

Shizuku Version

14.6

Operation Mode

ADB Mode

Device Model & OS Version

Galaxy A57 - OneUI 9.0/Android 17

Steps to Reproduce

  1. Open the app
  2. Attempt to start service normally
  3. Entire device will freeze and stop accepting any sort of input(power button, back gesture, etc). A prompt will come up about a System UI crash which will then lock the device and restore everything

Logcat / Crash Logs

This is just an excerpt full log is ~60MB

--- Server start: 64 process starts like these within ~1 second (33 distinct apps), all for the ShizukuProvider ---
11-01 09:52:27.507  1447  1510 I ActivityManager: Start proc 30634:com.grinch.rivo4/u0a577 for content provider {com.grinch.rivo4/rikka.shizuku.ShizukuProvider}
11-01 09:52:27.521  1447  1510 I ActivityManager: Start proc 30635:deltazero.amarok.foss/u0a404 for content provider {deltazero.amarok.foss/rikka.shizuku.ShizukuProvider}
11-01 09:52:27.547  1447  1510 I ActivityManager: Start proc 30644:in.hridayan.ashell/u0a451 for content provider {in.hridayan.ashell/rikka.shizuku.ShizukuProvider}
11-01 09:52:27.581  1447  1510 I ActivityManager: Start proc 30660:me.zhanghai.android.files/u0a352 for content provider {me.zhanghai.android.files/rikka.shizuku.ShizukuProvider}
11-01 09:52:27.603  1447  1510 I ActivityManager: Start proc 30682:com.ceyhan.sets/u0a505 for content provider {com.ceyhan.sets/rikka.shizuku.ShizukuProvider}
11-01 09:52:27.619  1447  1510 I ActivityManager: Start proc 30683:net.dinglisch.android.taskerm/u0a393 for content provider {net.dinglisch.android.taskerm/rikka.shizuku.ShizukuProvider}

--- 52x "Timeout waiting for provider" (caller=unknown/2000 is the server). Worst case: ---
11-01 09:52:47.621  1447  2229 E ContentProviderHelper: Timeout waiting for provider com.dex2oathelper/10494 for provider com.dex2oathelper.shizuku providerRunning=false caller=unknown/2000
11-01 09:52:47.936  1447  2274 E ContentProviderHelper: Timeout waiting for provider com.dex2oathelper/10494 for provider com.dex2oathelper.shizuku providerRunning=false caller=unknown/2000
11-01 09:52:47.937  1447  1509 I ActivityManager: Killing 30854:com.dex2oathelper/u0a494 (adj 0): timeout publishing content providers

--- UI freeze in the same window (pid 17550 = SystemUI, pid 14108 = Shevery) ---
11-01 09:52:37.756  2508  2508 I Choreographer: Skipped 528 frames!  The application may be doing too much work on its main thread.
11-01 09:52:37.957 17550 17550 I Choreographer: Skipped 1058 frames!  The application may be doing too much work on its main thread.
11-01 09:52:47.645 14108 14108 I Choreographer: Skipped 591 frames!  The application may be doing too much work on its main thread.
11-01 09:52:48.079 17550 17550 I Choreographer: Skipped 607 frames!  The application may be doing too much work on its main thread.

DaRealXx2023xX avatar Nov 01 '26 15:11 DaRealXx2023xX

🤖 AI Triage

The log excerpt shows massive Shizuku provider timeouts and broadcast storms across dozens of apps, but no repository source files were successfully read to confirm internal process management behavior. Please provide full reproducer steps or specific component logs from Shevery's manager package to investigate further.

Note: this is an automated AI bot (Gemini); its verdict isn't 100% accurate and can be wrong. The bot doesn't read or reply to further comments in this thread — if it got this wrong, ping a human maintainer.

github-actions[bot] avatar Nov 01 '26 15:11 github-actions[bot]

Fixed in release 14.6.1.

Root Cause Analysis:

  • In ShizukuService.java, sendBinderToClient() enumerated all installed packages and dispatched binder queries simultaneously using an unbounded cached thread pool (Executors.newCachedThreadPool).
  • Querying ActivityManagerApis.getContentProviderExternal for inactive/stopped apps forced Android's ActivityManagerService to launch processes for all installed client apps simultaneously (64 process launches within ~1 second for 33 apps).
  • This saturated Android's system_server Binder thread pool and caused severe AMS lock contention, triggering provider publish timeouts (CONTENT_PROVIDER_PUBLISH_TIMEOUT_MILLIS), 1000+ frame skips in System UI, and ANR crashes.

Fix:

  1. sendBinderToClient now verifies whether a package is already active/running via ActivityManagerApis.getPackageProcessState before initiating contact. Inactive applications are skipped entirely.
  2. Applications opened dynamically by the user receive the binder on-demand via BinderSender process/UID observers.
  3. Bounded the dispatch executor to 4 threads to prevent saturating system binder channels.
  4. Removed aggressive forceStopPackage retry calls on dead/unresponsive providers.

HmnDev-Tech avatar Nov 01 '26 17:11 HmnDev-Tech