Skip to content

Engine crashes #6503

Closed
Closed

Description

@Hixie

I've been getting a lot of engine crashes today. I ran with a debug engine but that didn't get me a stack trace. Here's one example of the logs around a crash. At the time, I was on the gallery's progress indicator page, poking at it with the Observatory.

10-24 16:09:30.358 15164 15185 F libc    : Fatal signal 11 (SIGSEGV), code 2, fault addr 0x82b41e60 in tid 15185 (Thread-4)
10-24 16:09:30.360   271   271 W         : debuggerd: handling request: pid=15164 uid=10112 gid=10112 tid=15185
10-24 16:09:30.378 15502 15502 E         : debuggerd: process stopped due to unexpected signal 27
10-24 16:09:30.408   271   271 W         : debuggerd: resuming target 15164
10-24 16:09:30.409  2231 15503 W ActivityManager:   Force finishing activity io.flutter.examples.gallery/org.domokit.sky.shell.SkyActivity
10-24 16:09:30.432   295   295 E lowmemorykiller: Error writing /proc/15164/oom_score_adj; errno=22
10-24 16:09:30.471  2231  2870 W InputDispatcher: channel '20eb12d io.flutter.examples.gallery/org.domokit.sky.shell.SkyActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
10-24 16:09:30.471  2231  2870 E InputDispatcher: channel '20eb12d io.flutter.examples.gallery/org.domokit.sky.shell.SkyActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
10-24 16:09:30.476  2231  8212 D GraphicsStats: Buffer count: 4
10-24 16:09:30.476  2231 26028 I ActivityManager: Process io.flutter.examples.gallery (pid 15164) has died
10-24 16:09:30.476  2231 26028 D ActivityManager: cleanUpApplicationRecord -- 15164
10-24 16:09:30.485  2231  3156 I OpenGLRenderer: Initialized EGL, version 1.4
10-24 16:09:30.485  2231  3156 D OpenGLRenderer: Swap behavior 1
10-24 16:09:30.486  2231  8212 I WindowManager: WIN DEATH: Window{20eb12d u0 io.flutter.examples.gallery/org.domokit.sky.shell.SkyActivity}
10-24 16:09:30.486  2231  8212 W InputDispatcher: Attempted to unregister already unregistered input channel '20eb12d io.flutter.examples.gallery/org.domokit.sky.shell.SkyActivity (server)'
10-24 16:09:30.486  2231  8212 W WindowManager: Force-removing child win Window{a41679b u0 SurfaceView - io.flutter.examples.gallery/org.domokit.sky.shell.SkyActivity} from container Window{20eb12d u0 io.flutter.examples.gallery/org.domokit.sky.shell.SkyActivity}
10-24 16:09:30.486  2231  8212 I WindowManager: Destroying surface Surface(name=SurfaceView - io.flutter.examples.gallery/org.domokit.sky.shell.SkyActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2457 com.android.server.wm.WindowManagerService.removeWindowLocked:2436 com.android.server.wm.WindowState$DeathRecipient.binderDied:1780 android.os.BinderProxy.sendDeathNotice:688 
10-24 16:09:30.490  2231  8212 I WindowManager: Destroying surface Surface(name=io.flutter.examples.gallery/org.domokit.sky.shell.SkyActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.WindowManagerService.removeWindowLocked:2436 com.android.server.wm.WindowState$DeathRecipient.binderDied:1780 android.os.BinderProxy.sendDeathNotice:688 <bottom of call stack> 
10-24 16:09:30.496  2231 31778 W WindowManager: Failed looking up window
10-24 16:09:30.496  2231 31778 W WindowManager: java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@b5662 does not exist
10-24 16:09:30.496  2231 31778 W WindowManager:     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9100)
10-24 16:09:30.496  2231 31778 W WindowManager:     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9091)
10-24 16:09:30.496  2231 31778 W WindowManager:     at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1777)
10-24 16:09:30.496  2231 31778 W WindowManager:     at android.os.BinderProxy.sendDeathNotice(Binder.java:688)
10-24 16:09:30.496  2231 31778 I WindowManager: WIN DEATH: null
10-24 16:09:31.137  3884  4056 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...

Activity

  1. added
    c: crashStack traces logged to the console
    engineflutter/engine related. See also e: labels.
    on Oct 24, 2016
  2. Hixie commented on Oct 24, 2016

    @Hixie
    ContributorAuthor
    10-24 16:28:04.944 17324 17355 F libc    : Fatal signal 11 (SIGSEGV), code 2, fault addr 0x8ecfd5f8 in tid 17355 (Thread-7)
    10-24 16:28:04.945   271   271 W         : debuggerd: handling request: pid=17324 uid=10141 gid=10141 tid=17355
    10-24 16:28:05.036 17815 17815 E         : debuggerd: process stopped due to unexpected signal 27
    10-24 16:28:05.041  2231 17816 W ActivityManager:   Force finishing activity com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity
    10-24 16:28:05.045   271   271 W         : debuggerd: resuming target 17324
    10-24 16:28:05.077   295   295 E lowmemorykiller: Error writing /proc/17324/oom_score_adj; errno=22
    10-24 16:28:05.128  2231  3047 D GraphicsStats: Buffer count: 4
    10-24 16:28:05.129  2231 26504 I ActivityManager: Process com.yourcompany.dummy2 (pid 17324) has died
    10-24 16:28:05.129  2231 26504 D ActivityManager: cleanUpApplicationRecord -- 17324
    10-24 16:28:05.129  2231  2870 W InputDispatcher: channel 'ff37c77 com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
    10-24 16:28:05.129  2231  2870 E InputDispatcher: channel 'ff37c77 com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
    10-24 16:28:05.153  2231  3156 I OpenGLRenderer: Initialized EGL, version 1.4
    10-24 16:28:05.153  2231  3797 I WindowManager: WIN DEATH: Window{ff37c77 u0 com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity}
    10-24 16:28:05.153  2231  3156 D OpenGLRenderer: Swap behavior 1
    10-24 16:28:05.153  2231  3797 W InputDispatcher: Attempted to unregister already unregistered input channel 'ff37c77 com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity (server)'
    10-24 16:28:05.153  2231  3797 W WindowManager: Force-removing child win Window{d2d4ef1 u0 SurfaceView - com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity} from container Window{ff37c77 u0 com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity}
    10-24 16:28:05.153  2231  3797 I WindowManager: Destroying surface Surface(name=SurfaceView - com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2457 com.android.server.wm.WindowManagerService.removeWindowLocked:2436 com.android.server.wm.WindowState$DeathRecipient.binderDied:1780 android.os.BinderProxy.sendDeathNotice:688 
    10-24 16:28:05.158  2231  3797 I WindowManager: Destroying surface Surface(name=com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.WindowManagerService.removeWindowLocked:2436 com.android.server.wm.WindowState$DeathRecipient.binderDied:1780 android.os.BinderProxy.sendDeathNotice:688 <bottom of call stack> 
    10-24 16:28:05.164  2231  3047 W WindowManager: Failed looking up window
    10-24 16:28:05.164  2231  3047 W WindowManager: java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@d196913 does not exist
    10-24 16:28:05.164  2231  3047 W WindowManager:     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9100)
    10-24 16:28:05.164  2231  3047 W WindowManager:     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9091)
    10-24 16:28:05.164  2231  3047 W WindowManager:     at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1777)
    10-24 16:28:05.164  2231  3047 W WindowManager:     at android.os.BinderProxy.sendDeathNotice(Binder.java:688)
    10-24 16:28:05.164  2231  3047 I WindowManager: WIN DEATH: null
    10-24 16:28:05.797  3884  4056 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
    10-24 16:28:06.961  2231 17816 W ActivityManager: Ignoring remove of inactive process: ProcessRecord{65df674 0:com.yourcompany.dummy2/u0a141}
    10-24 16:28:06.994  2231  2245 W InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
    10-24 16:28:06.994  2231  2245 W ViewRootImpl[dummy2]: Dropping event due to root view being removed: MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=692.0, y[0]=-249.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=408383061, downTime=408383054, deviceId=5, source=0x1002 }
    10-24 16:28:06.994  2231  2245 W InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
    
  3. Hixie commented on Oct 24, 2016

    @Hixie
    ContributorAuthor
    10-24 16:38:53.489 18248 18282 F libc    : Fatal signal 11 (SIGSEGV), code 128, fault addr 0x0 in tid 18282 (ui_thread)
    10-24 16:38:53.490   271   271 W         : debuggerd: handling request: pid=18248 uid=10141 gid=10141 tid=18282
    10-24 16:38:53.584 19027 19027 E         : debuggerd: process stopped due to unexpected signal 27
    10-24 16:38:53.591  2231 19028 W ActivityManager:   Force finishing activity com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity
    10-24 16:38:53.594   271   271 W         : debuggerd: resuming target 18248
    10-24 16:38:53.617   295   295 E lowmemorykiller: Error writing /proc/18248/oom_score_adj; errno=22
    10-24 16:38:53.672  2231  3156 I OpenGLRenderer: Initialized EGL, version 1.4
    10-24 16:38:53.672  2231  3156 D OpenGLRenderer: Swap behavior 1
    10-24 16:38:53.699  2231 26028 D GraphicsStats: Buffer count: 4
    10-24 16:38:53.699  2231  4835 I WindowManager: WIN DEATH: Window{5d9d515 u0 com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity}
    10-24 16:38:53.700  2231  4835 W WindowManager: Force-removing child win Window{f764c41 u0 SurfaceView - com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity} from container Window{5d9d515 u0 com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity}
    10-24 16:38:53.700  2231  4835 I WindowManager: Destroying surface Surface(name=SurfaceView - com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2457 com.android.server.wm.WindowManagerService.removeWindowLocked:2436 com.android.server.wm.WindowState$DeathRecipient.binderDied:1780 android.os.BinderProxy.sendDeathNotice:688 
    10-24 16:38:53.711  2231  4835 I WindowManager: Destroying surface Surface(name=com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.WindowManagerService.removeWindowLocked:2436 com.android.server.wm.WindowState$DeathRecipient.binderDied:1780 android.os.BinderProxy.sendDeathNotice:688 <bottom of call stack> 
    10-24 16:38:53.717  2231 10359 I ActivityManager: Process com.yourcompany.dummy2 (pid 18248) has died
    10-24 16:38:53.717  2231 10359 D ActivityManager: cleanUpApplicationRecord -- 18248
    10-24 16:38:53.725  2231 26028 W WindowManager: Failed looking up window
    10-24 16:38:53.725  2231 26028 W WindowManager: java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@5ad1e1b does not exist
    10-24 16:38:53.725  2231 26028 W WindowManager:     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9100)
    10-24 16:38:53.725  2231 26028 W WindowManager:     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9091)
    10-24 16:38:53.725  2231 26028 W WindowManager:     at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1777)
    10-24 16:38:53.725  2231 26028 W WindowManager:     at android.os.BinderProxy.sendDeathNotice(Binder.java:688)
    10-24 16:38:53.725  2231 26028 I WindowManager: WIN DEATH: null
    10-24 16:38:54.451  3884  3905 I art     : Background sticky concurrent mark sweep GC freed 26513(1844KB) AllocSpace objects, 135(3MB) LOS objects, 12% free, 43MB/50MB, paused 54.217ms total 97.342ms
    10-24 16:38:54.552  3884  4056 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
    
  4. eseidelGoogle commented on Oct 25, 2016

    @eseidelGoogle
    Contributor

    Do you have a tombstone file by chance? @chinmaygarde or @jason-simmons
    might recognize the failure from logs.

    On Mon, Oct 24, 2016 at 4:39 PM, Ian Hickson [email protected]
    wrote:

    10-24 16:38:53.489 18248 18282 F libc : Fatal signal 11 (SIGSEGV), code 128, fault addr 0x0 in tid 18282 (ui_thread)
    10-24 16:38:53.490 271 271 W : debuggerd: handling request: pid=18248 uid=10141 gid=10141 tid=18282
    10-24 16:38:53.584 19027 19027 E : debuggerd: process stopped due to unexpected signal 27
    10-24 16:38:53.591 2231 19028 W ActivityManager: Force finishing activity com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity
    10-24 16:38:53.594 271 271 W : debuggerd: resuming target 18248
    10-24 16:38:53.617 295 295 E lowmemorykiller: Error writing /proc/18248/oom_score_adj; errno=22
    10-24 16:38:53.672 2231 3156 I OpenGLRenderer: Initialized EGL, version 1.4
    10-24 16:38:53.672 2231 3156 D OpenGLRenderer: Swap behavior 1
    10-24 16:38:53.699 2231 26028 D GraphicsStats: Buffer count: 4
    10-24 16:38:53.699 2231 4835 I WindowManager: WIN DEATH: Window{5d9d515 u0 com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity}
    10-24 16:38:53.700 2231 4835 W WindowManager: Force-removing child win Window{f764c41 u0 SurfaceView - com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity} from container Window{5d9d515 u0 com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity}
    10-24 16:38:53.700 2231 4835 I WindowManager: Destroying surface Surface(name=SurfaceView - com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2457 com.android.server.wm.WindowManagerService.removeWindowLocked:2436 com.android.server.wm.WindowState$DeathRecipient.binderDied:1780 android.os.BinderProxy.sendDeathNotice:688
    10-24 16:38:53.711 2231 4835 I WindowManager: Destroying surface Surface(name=com.yourcompany.dummy2/org.domokit.sky.shell.SkyActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.WindowManagerService.removeWindowLocked:2436 com.android.server.wm.WindowState$DeathRecipient.binderDied:1780 android.os.BinderProxy.sendDeathNotice:688
    10-24 16:38:53.717 2231 10359 I ActivityManager: Process com.yourcompany.dummy2 (pid 18248) has died
    10-24 16:38:53.717 2231 10359 D ActivityManager: cleanUpApplicationRecord -- 18248
    10-24 16:38:53.725 2231 26028 W WindowManager: Failed looking up window
    10-24 16:38:53.725 2231 26028 W WindowManager: java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@5ad1e1b does not exist
    10-24 16:38:53.725 2231 26028 W WindowManager: at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9100)
    10-24 16:38:53.725 2231 26028 W WindowManager: at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9091)
    10-24 16:38:53.725 2231 26028 W WindowManager: at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1777)
    10-24 16:38:53.725 2231 26028 W WindowManager: at android.os.BinderProxy.sendDeathNotice(Binder.java:688)
    10-24 16:38:53.725 2231 26028 I WindowManager: WIN DEATH: null
    10-24 16:38:54.451 3884 3905 I art : Background sticky concurrent mark sweep GC freed 26513(1844KB) AllocSpace objects, 135(3MB) LOS objects, 12% free, 43MB/50MB, paused 54.217ms total 97.342ms
    10-24 16:38:54.552 3884 4056 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...

    —
    You are receiving this because you are subscribed to this thread.
    Reply to this email directly, view it on GitHub
    #6503 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/ALTvi2fjoBgy5LHxh3OTtrkGU1VFEEPnks5q3UG_gaJpZM4KfY5k
    .

  5. chinmaygarde commented on Oct 25, 2016

    @chinmaygarde
    Contributor

    Theory: The application is running out of memory.

    Reasoning:

    • lowmemorykiller is attempting to first modify /proc/<pid>/oom_score_adj to see if the process is a candidate for lowering the priority for termination under memory stress. That presumably fails because there is nothing special about this process. Notice the PIDs match in all log instances.
    • The different instances of the crash are on different threads.
    • As to why the signal is not a SIGTERM/SIGKILL, the issue is likely there was spike in memory stress that cause an allocation failure. Most software doesn't check for this and subsequently tried to dereference the NULL allocation causing the issue you see.

    Possible Causes:

    • If this seems like a regression, the most significant changes recently were rolls of both Dart and Skia.

    More Investigation:

    • Observe heap sizes in observatory to see if the crashes correlate to large heaps.
    • Try it on different devices. Are crashes occurring in different spots. You should also probably be testing on the weakest/oldest device you can get a hold of.
  6. jason-simmons commented on Oct 25, 2016

    @jason-simmons
    Contributor

    The third trace looks like a null pointer dereference - possibly similar to #6025?

  7. Hixie commented on Oct 25, 2016

    @Hixie
    ContributorAuthor

    I was suspicious of a memory leak issue because I had caused one of those myself earlier, and so on several occasions I was actually staring at the Dart heap data when it crashed and the heap was < 50MB.

  8. Hixie commented on Oct 25, 2016

    @Hixie
    ContributorAuthor

    (How do I get a tombstone file?)

  9. chinmaygarde commented on Oct 25, 2016

    @chinmaygarde
    Contributor

    (How do I get a tombstone file?)

    I haven't used those for diagnosing issues. @eseidel, @jason-simmons ?

  10. eseidelGoogle commented on Oct 25, 2016

    @eseidelGoogle
    Contributor

    Typically adb pull /data/tombstones/tombstone_01 etc should pull one. But normally when they're written it says so in the adb logcat to tell you to go looking. :)

  11. chinmaygarde commented on Oct 25, 2016

    @chinmaygarde
    Contributor

    I was wrong about the lowmemorykiller message. That seems to always be present irrespective of the type of crash.

  12. eseidelGoogle commented on Feb 17, 2017

    @eseidelGoogle
    Contributor

    I don't think there is anything to do with this bug anymore? Please re-open if you disagree.

  13. github-actions commented on Sep 5, 2021

    @github-actions

    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.

  14. locked as resolved and limited conversation to collaborators on Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: crashStack traces logged to the consoleengineflutter/engine related. See also e: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions