hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.1k stars 884 forks source link

Crashes after updating (`GL_INNOCENT_CONTEXT_RESET`) #6142

Closed TheSunCat closed 5 months ago

TheSunCat commented 5 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch main at commit 2ead1fd22103ce065661555513bace5897083ded dirty (virtual-keyboard: emit event before finishing keyboard). Date: Fri May 17 21:07:33 2024 Tag: v0.40.0-111-g2ead1fd2, commits: 4717 flags: (if any) System Information: System name: Linux Node name: apg Release: 6.9.1-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 17 May 2024 16:56:38 +0000 GPU information: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 23 [Radeon RX 6650 XT / 6700S / 6800S] [1002:73ef] (rev c2) (prog-if 00 [VGA controller]) 37:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt [Radeon 680M] [1002:1681] (rev c7) (prog-if 00 [VGA controller]) os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: ```

Bug or Regression?

Bug

Description

Hyprland crashes sometimes while running a simple SDL_Renderer app (source: https://git.allpurposem.at/mat/Tron/commit/7e1844243dd970f147531b98a5b6ffdb20623211 ), sometimes shortly after closing.

I have never seen this happen before, but I did update Hyprland a few hours ago, so it may be related.

How to reproduce

You could try running the app, but I assume it's got something to do with the specific GPU driver since I see an OpenGL assertion is being hit.

Crash reports, logs, images, videos

The latest crash left a 0 byte crash report, so I am leaving the end of the logs for it (click here) ``` [LOG] Callback 5827448839b0 -> 5827448839a8, CRenderbuffer removed. [LOG] Searching for matching rules for firefox (title: Mozilla Firefox) [LOG] Window rule suppressevent maximize -> title:.* matched [Window 5827448d0910: title: "Mozilla Firefox"] [LOG] Window rule idleinhibit fullscreen -> firefox matched [Window 5827448d0910: title: "Mozilla Firefox"] [LOG] Callback 5827430f32a0 -> 5827430f3298, CSeatManager removed. [LOG] Callback 58274487fec0 -> 58274487feb8, CWLKeyboardResource removed. [LOG] Callback 58274488c140 -> 58274488c138, CWLKeyboardResource removed. [LOG] Registered signal for owner 5827448dc5d0: 5827448c91d8 -> 5827448dc5e8 (owner: CWLKeyboardResource) [LOG] Registered signal for owner 0: 5827448c91d8 -> 5827430f3278 (owner: CSeatManager) [LOG] Set keyboard focus to surface 5827448c8ec0, with [Window 5827448ce900: title: "tron;#toggleterm#1 - (term://~/School/Tron/...734:/home/apm/School/Tron/out/Debug) - NVIM"] [LOG] Searching for matching rules for foot (title: tron;#toggleterm#1 - (term://~/School/Tron/...734:/home/apm/School/Tron/out/Debug) - NVIM) [LOG] Window rule suppressevent maximize -> title:.* matched [Window 5827448ce900: title: "tron;#toggleterm#1 - (term://~/School/Tron/...734:/home/apm/School/Tron/out/Debug) - NVIM"] [LOG] Callback 5827430f3308 -> 5827430f3300, CSeatManager removed. [LOG] Callback 582744889e60 -> 582744889e58, CWLPointerResource removed. [LOG] Registered signal for owner 5827448cbac0: 5827448c91d8 -> 5827448cbad8 (owner: CWLPointerResource) [LOG] Registered signal for owner 0: 5827448c91d8 -> 5827430f32e0 (owner: CSeatManager) [LOG] cursorImage request: shape 1 -> default [LOG] Callback 58274312b308 -> 58274312b300, CWLSurface removed. [LOG] Callback 58274312b370 -> 58274312b368, CWLSurface removed. [LOG] CWLSurface 58274312b260 called destroy() [LOG] Callback 582743113828 -> 582743113820, CPointerManager removed. [LOG] Registered signal for owner 5827431136f0: 582744456518 -> 582743113800 (owner: CPointerManager) [LOG] Registered signal for owner 582744883980: 5827448f4cc8 -> 582744883988 (owner: CRenderbuffer) [LOG] Callback 5827448839b0 -> 5827448839a8, CRenderbuffer removed. [LOG] [seatmgr] Rejecting a setCursor because the client ain't in focus [LOG] [XDGShell] xdg_surface 582743d5c200 requests geometry 0x0 1011x1228 [LOG] Callback 582744918380 -> 582744918378, XWayland Window Late removed. [LOG] Callback 5827449182b0 -> 5827449182a8, Xwayland Window Late removed. [LOG] Callback 582744918248 -> 582744918240, Xwayland Window Late removed. [LOG] Callback 582744918178 -> 582744918170, XWayland Window Late removed. [LOG] Callback 5827449180a8 -> 5827449180a0, XWayland Window Late removed. [LOG] Cleanup: destroyed a window [LOG] Searching for matching rules for foot (title: CMakeLists.txt (~/School/Tron) - NVIM) [LOG] Window rule suppressevent maximize -> title:.* matched [Window 5827448ce900: title: "CMakeLists.txt (~/School/Tron) - NVIM"] ```

Two crashes earlier today that do have reports: hyprlandCrashReport4268.txt hyprlandCrashReport1355.txt

Agent00Ming commented 5 months ago

image

[CRITICAL] 
==========================================================================================
ASSERTION FAILED! 

Aborting, glGetGraphicsResetStatus returned GL_INNOCENT_CONTEXT_RESET. Cannot continue until proper GPU reset handling is implemented.

at: line 263 in OpenGL.cpp

GPU driver caught in a bad state caused it to flush all video memory thus killing hyprland.

TheSunCat commented 5 months ago

So this indeed depends on GPU reset handling being implemented. It has never happened before with this crash log, so could something have changed recently in Hyprland that would surface this?

Agent00Ming commented 5 months ago

You sure could help by bisecting the first commit where this is reproducible starting from cba1ade848feac44b2eda677503900639581c3f4, if not then maybe 0.39.1. If it's still reproducible then it isn't a hyprland bug but rather one where the application is misbehaving on exit or something.

vaxerski commented 5 months ago

this is not a hyprland issue. Handling resets is (imo) quite pointless as most of your apps (if not all that use the gpu) can't survive a reset either