NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.59k stars 13.07k forks source link

Discord crashes after some time - GPU process exited unexpectedly: exit_code=134 #304214

Open thlr1 opened 3 months ago

thlr1 commented 3 months ago

Describe the bug

Discord launches fine, runs for a few minutes and then crashes

Steps To Reproduce

Steps to reproduce the behavior:

  1. Run Discord
  2. Now you see me
  3. Now you don't 🪄

Expected behavior

I expect that it does not crash

Additional context

I have tried cleaning the cache already.

Complete logs

[Nix] Disabling updates already done
Discord 0.0.49
Starting app.
Starting updater.
2024-04-15T07:39:23.338Z [Modules] Modules initializing
2024-04-15T07:39:23.338Z [Modules] Distribution: remote
2024-04-15T07:39:23.338Z [Modules] Host updates: disabled
2024-04-15T07:39:23.338Z [Modules] Module updates: enabled
2024-04-15T07:39:23.338Z [Modules] Module install path: /home/tlarue/.config/discord/0.0.49/modules
2024-04-15T07:39:23.339Z [Modules] Module installed file path: /home/tlarue/.config/discord/0.0.49/modules/installed.json
2024-04-15T07:39:23.339Z [Modules] Module download path: /home/tlarue/.config/discord/0.0.49/modules/pending
splashScreen.initSplash(false)
CDM component API not found, skipping
blackbox: 2024-04-15T07:39:23.365Z 0 

----------------------------------------------
../../third_party/libc++/src/include/string:935: assertion __s != nullptr failed: basic_string(const char*) detected nullptr
blackbox: 2024-04-15T07:39:23.400Z 1 Discord starting: {"releaseChannel":"stable","version":"0.0.49"}, modulepath: /home/tlarue/.config/discord/0.0.49/modules
blackbox: 2024-04-15T07:39:23.407Z 2 ✅ webContents.created web1 ""
blackbox: 2024-04-15T07:39:23.413Z 3 ✅ window.created win1 "discord"
[28011:0415/093923.709347:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=134
blackbox: 2024-04-15T07:39:23.711Z 4 ❌ child-process-gone { type: 'GPU', reason: 'crashed', exitCode: 134, serviceName: 'GPU' }
../../third_party/libc++/src/include/string:935: assertion __s != nullptr failed: basic_string(const char*) detected nullptr
[28011:0415/093924.048192:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=134
blackbox: 2024-04-15T07:39:24.048Z 5 ❌ child-process-gone { type: 'GPU', reason: 'crashed', exitCode: 134, serviceName: 'GPU' }
../../third_party/libc++/src/include/string:935: assertion __s != nullptr failed: basic_string(const char*) detected nullptr
[28011:0415/093924.376918:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=134
blackbox: 2024-04-15T07:39:24.377Z 6 ❌ child-process-gone { type: 'GPU', reason: 'crashed', exitCode: 134, serviceName: 'GPU' }
DRI driver not from this Mesa build ('23.1.9' vs '24.0.3')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '24.0.3')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '24.0.3')
failed to bind extensions
splashScreen: SPLASH_SCREEN_READY
splashScreen.webContentsSend: SPLASH_SCREEN_QUOTE SPLASH_SCREEN_QUOTE [ 'Hold Tight — Loading Discord' ]
2024-04-15T07:39:24.443Z [Modules] No updates to install
splashScreen: no-pending-updates
2024-04-15T07:39:24.443Z [Modules] Host is up to date.
2024-04-15T07:39:24.444Z [Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
splashScreen: checking-for-updates
splashScreen.updateSplashState checking-for-updates checking-for-updates {}
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'checking-for-updates' } ]
2024-04-15T07:39:24.448Z [Modules] No module updates available.
splashScreen: update-check-finished true 0 false
CDM completed with status (old updater): "api-not-found"
splashScreen.launchMainWindow: false
Optional module ./ElectronTestRpc was not included.
splashScreen.updateSplashState launching launching {}
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'launching' } ]
blackbox: 2024-04-15T07:39:24.505Z 7 ✅ webContents.created web2 ""
blackbox: 2024-04-15T07:39:24.521Z 8 ✅ window.created win2 "Discord"
blackbox: 2024-04-15T07:39:24.536Z 9 ✅ webContents.did-finish-load web1
legacyModuleUpdater: installed-module discord_krisp 1 1 true
legacyModuleUpdater: installed-module discord_game_utils 1 1 true
mainScreen.UpdaterEvents: UPDATER_HISTORY_QUERY_AND_TRUNCATE
mainScreen.UpdaterEvents: UPDATER_HISTORY_QUERY_AND_TRUNCATE
mainScreen.UpdaterEvents: UPDATER_HISTORY_QUERY_AND_TRUNCATE
mainScreen.UpdaterEvents: CHECK_FOR_UPDATES UPDATE_NOT_AVAILABLE
2024-04-15T07:39:26.177Z [Modules] Host is up to date.
2024-04-15T07:39:26.177Z [Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
2024-04-15T07:39:26.179Z [Modules] No module updates available.
legacyModuleUpdater: update-check-finished
legacyModuleUpdater: installed-module discord_rpc 1 1 true
mainScreen.UpdaterEvents: UPDATER_HISTORY_QUERY_AND_TRUNCATE
mainScreen.on(did-finish-load) false false
splashScreen.pageReady
blackbox: 2024-04-15T07:39:26.332Z 10 ✅ webContents.did-finish-load web2
blackbox: 2024-04-15T07:39:26.429Z 11 window.close win1
blackbox: 2024-04-15T07:39:26.458Z 12 webContents.destroyed web1
blackbox: 2024-04-15T07:39:26.460Z 13 window.closed win1
Warning: vkCreateInstance: Found no drivers!
Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
    at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:101)
    at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:493)
    at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:379)
    at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:301)
    at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:556)

../../third_party/libc++/src/include/string:935: assertion __s != nullptr failed: basic_string(const char*) detected nullptr
[28011:0415/094123.804215:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=134
(electron) 'gpu-process-crashed event' is deprecated and will be removed. Please use 'child-process-gone event' instead.
child-process-gone! child: GPU (undefined) exitCode: 134
blackbox: 2024-04-15T07:41:23.805Z 14 ❌ child-process-gone { type: 'GPU', reason: 'crashed', exitCode: 134, serviceName: 'GPU' }
notificationScreen.webContentsSend: win is invalid undefined.
blackbox: 2024-04-15T07:41:23.809Z 15 before-quit
blackbox: 2024-04-15T07:41:23.813Z 16 window.close win2
blackbox: 2024-04-15T07:41:23.841Z 17 webContents.destroyed web2
DRI driver not from this Mesa build ('23.1.9' vs '24.0.3')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '24.0.3')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '24.0.3')
failed to bind extensions
[29180:0415/094123.858627:ERROR:x11_software_bitmap_presenter.cc(141)] XGetWindowAttributes failed for window 44040197

Notify maintainers

@MP2E @Scrumplex @Artturin @Infinidoge

Thank you so much!

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.84, NixOS, 23.11 (Tapir), 23.11.20240413.90055d5`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

AkechiShiro commented 3 months ago

Could you please mention your hardware and also Desktop env (Gnome/KDE/I3WM/Sway/Hyprland...) ? Wayland/X11 ? or are you using XWayland to run Discord ?

Can you reproduce this crash using armcord or any other discord client ? (I haven't encountered this issue on my side using armcord which is a modded discord client, hence why I'm asking)

AkechiShiro commented 3 months ago

This looks like something wrong with mesa drivers or the X11 server that is running but I'm not sure as I cannot reproduce the issue :

DRI driver not from this Mesa build ('23.1.9' vs '24.0.3')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '24.0.3')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '24.0.3')
failed to bind extensions
[29180:0415/094123.858627:ERROR:x11_software_bitmap_presenter.cc(141)] XGetWindowAttributes failed for window 44040197
AkechiShiro commented 3 months ago

@thlr1 let me know if you can run discord like so : discord --in-process-gpu --use-gl=desktop or discord --disable-gpu

And provide the logs output if it fails to run.

AkechiShiro commented 3 months ago

Your issue might be related to this : https://github.com/electron/electron/issues/41346#issuecomment-2046190134 but I'm not sure, I suggest you investigate if that's the case.

A workaround that should be tested would disabling hardware accel in discord settings.

thlr1 commented 3 months ago

Sure, I should have done that from the start:

11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz No GPU I use qtile with X11

discord --in-process-gpu --use-gl=desktop: crashed discord --disable-gpu: crashed Full logs available here https://gist.github.com/thlr1/37ab08e0cbca25480119039ecbcc3d8f

Disabling hardware acceleration did not work either.

armcord with vencord seems to work just fine so I will be using that for now thanks :) Also it looks stupidly awesome so there's a good chance I won't go back to the standard client that crashes every other day...

Thanks a lot and best of luck with the bug investigation