GrapheneOS / os-issue-tracker

Issue tracker for GrapheneOS Android Open Source Project hardening work. Standalone projects like Auditor, AttestationServer and hardened_malloc have their own dedicated trackers.
https://grapheneos.org/
346 stars 19 forks source link

Crashing between user profiles returning to Owner #3841

Open UnblssedCinnamon90 opened 1 month ago

UnblssedCinnamon90 commented 1 month ago
type: crash
SystemUptimeMs: 13534104
Process: system_server
Build: google/cheetah/cheetah:14/AP2A.240805.005/2024080600:user/release-keys
Crash-Handler: com.android.internal.os.RuntimeInit$KillApplicationHandler
Loading-Progress: 1.0
Dropped-Count: 0

java.lang.RuntimeException: Keyguard is not shown in 20000 ms.
    at com.android.server.am.UserController.lambda$showKeyguard$19(UserController.java:2361)
    at com.android.server.am.UserController.$r8$lambda$wT8N0XZjIuEx-KppGzSNgZ41LjE(UserController.java:0)
    at com.android.server.am.UserController$$ExternalSyntheticLambda16.run(R8$$SyntheticClass:0)
    at com.android.server.am.UserController.lambda$runWithTimeout$20(UserController.java:2381)
    at com.android.server.am.UserController.$r8$lambda$3Otwh3XBWjxmOUSz6G331crra7Q(UserController.java:0)
    at com.android.server.am.UserController$$ExternalSyntheticLambda20.run(R8$$SyntheticClass:0)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.os.HandlerThread.run(HandlerThread.java:85)
    at com.android.server.ServiceThread.run(ServiceThread.java:46)
thestinger commented 1 month ago

Looks like this wasn't fully resolved upstream. Do you have a lock method set for both users?

mfld-pub commented 1 month ago

@thestinger I just came here to report the same issue. In my case the default keyboard on owner account is not the graphene keyboard. After creating the user it asked to create a PIN or password during onboarding. I had to skip it because no keyboard came up on either option. So the owner does have a passphrase set, the new user account does not (yet). Then getting the crash dump when switching back to owner.

thestinger commented 1 month ago

@mfld-pub Are you on 2024080600 though? There was an upstream fix.

mfld-pub commented 1 month ago

Yes it's 2024080600

VeryNaughtyBoy commented 1 month ago
type: crash
SystemUptimeMs: 25061264
Process: system_server
Build: google/bluejay/bluejay:14/AP2A.240805.005.F1/2024080600:user/release-keys
Crash-Handler: com.android.internal.os.RuntimeInit$KillApplicationHandler
Loading-Progress: 1.0
Dropped-Count: 0

java.util.concurrent.TimeoutException: android.window.WindowContext.finalize() timed out after 10 seconds
    at com.android.server.wm.WindowManagerService.detachWindowContext(WindowManagerService.java:2917)
    at android.window.WindowTokenClientController.detachIfNeeded(WindowTokenClientController.java:178)
    at android.window.WindowContextController.detachIfNeeded(WindowContextController.java:153)
    at android.window.WindowContext.release(WindowContext.java:114)
    at android.window.WindowContext.finalize(WindowContext.java:107)
    at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:362)
    at java.lang.Daemons$FinalizerDaemon.processReference(Daemons.java:342)
    at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:314)
    at java.lang.Daemons$Daemon.run(Daemons.java:131)
    at java.lang.Thread.run(Thread.java:1012)

On pixel 6a switching from owner to other profile. BN:2024080600 I'm using the gboard on the other profile but not on owner. But I believe I've had crashes when switching in other directions. I have three profile I use alongside each other pretty much all the time and two for irregularly used apps as well as testing. So 5 in total. I cannot recreate the issue nor does it happened every time.

Kinderok1 commented 3 weeks ago
type: crash
SystemUptimeMs: 13534104
Process: system_server
Build: google/cheetah/cheetah:14/AP2A.240805.005/2024080600:user/release-keys
Crash-Handler: com.android.internal.os.RuntimeInit$KillApplicationHandler
Loading-Progress: 1.0
Dropped-Count: 0

java.lang.RuntimeException: Keyguard is not shown in 20000 ms.
  at com.android.server.am.UserController.lambda$showKeyguard$19(UserController.java:2361)
  at com.android.server.am.UserController.$r8$lambda$wT8N0XZjIuEx-KppGzSNgZ41LjE(UserController.java:0)
  at com.android.server.am.UserController$$ExternalSyntheticLambda16.run(R8$$SyntheticClass:0)
  at com.android.server.am.UserController.lambda$runWithTimeout$20(UserController.java:2381)
  at com.android.server.am.UserController.$r8$lambda$3Otwh3XBWjxmOUSz6G331crra7Q(UserController.java:0)
  at com.android.server.am.UserController$$ExternalSyntheticLambda20.run(R8$$SyntheticClass:0)
  at android.os.Handler.handleCallback(Handler.java:959)
  at android.os.Handler.dispatchMessage(Handler.java:100)
  at android.os.Looper.loopOnce(Looper.java:232)
  at android.os.Looper.loop(Looper.java:317)
  at android.os.HandlerThread.run(HandlerThread.java:85)
  at com.android.server.ServiceThread.run(ServiceThread.java:46)

Yeap, i have absolutely the same issue. I cant use other profiles, when i switch then OS crashes.

bn:2024080600

VeryNaughtyBoy commented 3 weeks ago
type: crash
SystemUptimeMs: 33333970
Process: system_server
Build: google/bluejay/bluejay:14/AP2A.240805.005.F1/2024080600:user/release-keys
Crash-Handler: com.android.internal.os.RuntimeInit$KillApplicationHandler
Loading-Progress: 1.0
Dropped-Count: 0

java.util.concurrent.TimeoutException: android.window.WindowContext.finalize() timed out after 10 seconds
    at com.android.server.wm.WindowManagerService.detachWindowContext(WindowManagerService.java:2917)
    at android.window.WindowTokenClientController.detachIfNeeded(WindowTokenClientController.java:178)
    at android.window.WindowContextController.detachIfNeeded(WindowContextController.java:153)
    at android.window.WindowContext.release(WindowContext.java:114)
    at android.window.WindowContext.finalize(WindowContext.java:107)
    at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:362)
    at java.lang.Daemons$FinalizerDaemon.processReference(Daemons.java:342)
    at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:314)
    at java.lang.Daemons$Daemon.run(Daemons.java:131)
    at java.lang.Thread.run(Thread.java:1012)

I was able to reproduce the issue. It happens every time I quickly switch to another profile to check a separated app and then switch back to my main profile. The loading screen of the profile freezes. I use a separate profile as my daily driver not the owner profile. It doesn't matter whether I change to the owner profile or a secondary one. Hope I'm making sense...

Edit: I've just tried to force the issue after a crash reboot and it's not happening. So I guess the system has to have run for while. Mind you switching profiles in general works fine.