Public bug reported:

## Summary

Since the Chromium snap was refreshed from 155.0.8059.39 (rev 3554) to
158.0.8127.88 (rev 3610), the browser process crashes with SIGTRAP a few
seconds after the machine resumes from suspend-to-RAM (S3), usually within one
second of the GNOME lock screen being unlocked. All windows and tabs are lost;
Chromium has to be started again.

The previous build (155) ran for 4.5 days across many suspend/resume cycles on
the same machine without crashing.

## Environment

- Chromium: 158.0.8127.88, snap rev 3610, channel latest/stable
- OS: Ubuntu 26.04, kernel 7.0.0-44-generic
- Session: GNOME Shell on Wayland (Chromium running with 
`--ozone-platform=wayland`,
  chosen automatically; no user flags)
- GPU: NVIDIA GeForce GTX 1050 Ti, proprietary driver 580.196.07
  (ANGLE, OpenGL ES 3.2 NVIDIA 580.196.07)
- One monitor, connected over DisplayPort
- Command line as recorded in the crash dump:
  `chrome --password-store --gtk-version=3 
--disable-features=TFLiteLanguageDetectionEnabled`

## Steps to reproduce

1. Start Chromium in a GNOME Wayland session on an NVIDIA GPU (proprietary 
driver).
2. Suspend the machine (S3, "deep").
3. Wake it up and unlock the screen.

## Expected result

Chromium keeps running.

## Actual result

The browser process aborts. Reproduced in 4 of 5 suspend/resume cycles over
24 hours (suspend durations between 90 seconds and 9 hours):

| Resume (kernel "PM: suspend exit") | Screen unlocked | Crash    |
|------------------------------------|-----------------|----------|
| 21:58:48                           | 21:59:00        | 21:59:00 |
| 09:32:25                           | not logged      | 09:32:30 |
| 12:11:08                           | 12:11:20        | 12:11:20 |
| 13:52:05                           | 13:52:18        | no crash |
| 19:01:31                           | 19:02:16        | 19:02:16 |

## Crash analysis

All four minidumps are identical in the relevant part:

- Signal: SIGTRAP (5), on the browser main thread (thread name `chrome`)
- Faulting instruction: `chrome+0x644eb66` (`ud2` after `int3`) in every dump
- No symbols are available for the snap build, so the following is derived from
  disassembling the binary:
  - The function at `chrome+0x644eb00` takes a rectangle (x, y, width, height),
    jumps to the `int3` if width == 0 or height == 0, and otherwise calls
    `wl_proxy_marshal_flags` with opcode 3 on an `xdg_surface`
    (`xdg_surface.set_window_geometry`). The function right before it sends
    opcode 4 (`ack_configure`), and the neighbouring code references
    `ui/ozone/platform/wayland/host/xdg_surface.cc`.
  - This matches `XDGSurface::SetWindowGeometry()` hitting its
    `CHECK(!bounds.IsEmpty())`.
  - Return addresses on the stack lie in code that references
    `ui/ozone/platform/wayland/host/wayland_frame_manager.cc`
    (`ApplySurfaceConfigure`, `HandleFrameCallback`, `OnWlBufferRelease`,
    `CreateFrameCallback`) and 
`ui/events/platform/wayland/wayland_event_watcher.cc`,
    i.e. the crash happens while a Wayland event is dispatched and a pending
    frame / surface configure is applied.

So after resume a window ends up with empty bounds, and Chromium aborts instead
of skipping the `set_window_geometry` request.

## Related log messages

At every Chromium start, gnome-shell logs:

    Client provided invalid window geometry for xdg_surface#NN (chromium
- ... (New Tab - Chromium)). Working around.

At every resume, before the crash, gnome-shell logs:

    Page flip failed: drmModeAtomicCommit: Invalid argument
    Failed to post KMS update: drmModeAtomicCommit: Invalid argument
    Cursor update failed: drmModeAtomicCommit: Invalid argument

While running, Chromium repeatedly logs:

    ERROR:ui/ozone/platform/wayland/host/wayland_frame_manager.cc:707]
The server has buggy presentation feedback. Discarding all presentation
feedback requests in all frames except the last 3.

The crash handler itself logs (it cannot read the crashed process' memory
because of the snap AppArmor profile, which may limit the dump contents):

    apparmor="DENIED" operation="open" profile="snap.chromium.chromium" 
name="/proc/<pid>/mem" comm="chrome_crashpad" requested_mask="r"
    ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:607] ptrace: 
Input/output error (5)

## Notes

- The NVIDIA driver was updated from 580.178.04 to 580.196.07 in the same
  update run as the Chromium snap refresh, so a contribution from the driver
  (e.g. the output briefly disappearing on resume) cannot be ruled out. The
  failing assertion is in Chromium's Wayland host code either way.
- A similar report exists for Brave on native Wayland:
  
https://community.brave.app/t/brave-crashes-with-sigtrap-after-suspend-resume-on-native-wayland-zero-size-window-geometry/658973
- Workaround in use: `--ozone-platform=x11`.
- Minidumps are available on request.

** Affects: chromium-browser (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2190918

Title:
  Chromium 158 (snap) browser process aborts after resume from suspend
  on native Wayland: empty bounds in xdg_surface.set_window_geometry

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/2190918/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to