• kylechar's avatar
    Add GPU process mojo error handler · 5b3db8d8
    kylechar authored
    There is a recurring issue where bugs in browser process code introduce
    deserialization errors on the main viz browser-to-GPU process message
    pipe. The message pipe is closed and the GPU process crashes trying to
    reinitialize the viz thread. Without a way to differentiate message pipe
    closure due to a deserialization error vs the other side closing it, the
    crash only happens when the browser tries to reinitialize the viz thread
    after what it thinks is a GPU crash. There is a very little information
    available in these crash reports, the message pipe is shared by multiple
    interfaces and figuring out what IPC message the error occurred in is a
    guessing game.
    
    There is a global error handler that triggers for any mojo
    deserialization errors which includes a string containing the interface
    name and a message identifier. This CL adds a handler which stores the
    error string. If the GPU process crashes due to reinitializing the viz
    thread within 5 seconds after the handler fired, it populates a crash
    key with that error message. While it's not guaranteed the last
    deserialization error was what caused the viz thread to get
    reinitialized, deserialization errors are infrequent enough it shouldn't
    be an issue.
    
    Bug: 1075495
    Change-Id: I3a762fd5e9d50c0c1c301b3179f08ce892ff4912
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2356546
    Commit-Queue: kylechar <kylechar@chromium.org>
    Reviewed-by: default avatarKen Rockot <rockot@google.com>
    Cr-Commit-Position: refs/heads/master@{#798645}
    5b3db8d8
viz_main_impl.cc 14.6 KB