Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent xwayland crashes #3799

Open
Beyley opened this issue Nov 8, 2023 · 41 comments
Open

Intermittent xwayland crashes #3799

Beyley opened this issue Nov 8, 2023 · 41 comments
Labels
bug Something isn't working

Comments

@Beyley
Copy link

Beyley commented Nov 8, 2023

Hyprland Version

Hyprland, built from branch at commit 1b48642 dirty ().

(from the arch repos)

Bug or Regression?

Bug

Description

At complete random (theres no pattern), when i have a Jetbrains tool open (eg. Rider), multiple of my apps (Rider, Ghidra, and WebCord) will be brought down. WebCord closes with no extra information (exit code 1), but it seems to maybe dump some things into dmesg (maybe unrelated?), Rider and Ghidra dont seem to dump any logs anywhere relating to the error, they act as if they were closed normally

[25574.090012] traps: electron[56903] trap int3 ip:563c0662ae87 sp:7ffc629d7a30 error:0 in electron[563c02e7c000+7aaf000]
[25574.367469] traps: electron[57032] trap int3 ip:563c0662ae87 sp:7ffc629d7a30 error:0 in electron[563c02e7c000+7aaf000]
[25574.631896] traps: electron[57076] trap int3 ip:563c0662ae87 sp:7ffc629d7a30 error:0 in electron[563c02e7c000+7aaf000]
[25928.530973] traps: electron[64277] trap int3 ip:557c46eb9e87 sp:7ffcc3123e20 error:0 in electron[557c4370b000+7aaf000]
[25928.930195] traps: electron[64423] trap int3 ip:557c46eb9e87 sp:7ffcc3123e20 error:0 in electron[557c4370b000+7aaf000]
[25929.334403] traps: electron[64500] trap int3 ip:557c46eb9e87 sp:7ffcc3123e20 error:0 in electron[557c4370b000+7aaf000]

This is maybe related to XWayland, as those are the only apps of mine that are running under Xwayland

Important to note this does not happen on compositors such as kwin_wayland

How to reproduce

Open a Jetbrains tool such as Rider alongside WebCord, then just interact with either software for awhile, at random (sometimes after as much as 10mins), both apps will be brought down at the same time (WebCord is running under xwayland on my system)

Crash reports, logs, images, videos

hypr logs
logs.tar.gz

@Beyley Beyley added the bug Something isn't working label Nov 8, 2023
@vaxerski
Copy link
Member

vaxerski commented Nov 11, 2023

that would suggest xwayland crashed. I don't think this is an issue with hyprland. Have you tried testing on sway-git whether it happens there too?

Another note, your hyprland version is very old.

@Beyley
Copy link
Author

Beyley commented Nov 11, 2023

Another note, your hyprland version is very old.

I'll try sway after trying updating hyprland, it seems the hyprland in the arch repos is extremely old, i didnt realize that

@Beyley
Copy link
Author

Beyley commented Nov 11, 2023

I havent gotten the webcord+rider crash yet, but i am now getting a weird rendering bug with the completions, where if the completions update without recreating the separate completions window, it shrinks more and more, didnt happen on the old version
img (i used rider for an hour with no crashes of rider+webcord)

while i was writing this, it seems that the entirety of hyprland was brought down for some reason (kicked back to greeter), log folder from right after are here

and while i was writing that, firefox crashed when i tried to drag and drop a zip from dolphin, im going to assume thats a separate issue though

heres the coredump for hyprland from the above full crash to greeter hyprland.coredump.zip

edit: it just happened on latest hyprland, i'll try sway

@Beyley
Copy link
Author

Beyley commented Nov 12, 2023

after >2hrs of running both rider and webcord (using both constantly), the crash did not occur with sway, and it doesnt happen with kwin either

@vaxerski
Copy link
Member

vaxerski commented Nov 12, 2023

Would be nice to get an xwayland debug stacktrace or a log. Might be a protocol error. Running xwayland with WAYLAND_DEBUG=1 and inspecting the output when it crashes might also help.

@Beyley
Copy link
Author

Beyley commented Nov 12, 2023

Would be nice to get an xwayland debug stacktrace or a log. Might be a protocol error. Running xwayland with WAYLAND_DEBUG=1 and inspecting the output when it crashes might also help.

how would i set env vars for XWayland? i glanced through the hyprland wiki and didnt see anything about running xwayland manually
also i dont see xwayland in coredumpctl, so i dont think xwayland itself is fully explicitly crashing, so yeah might be a protocol error

@vaxerski
Copy link
Member

@Beyley
Copy link
Author

Beyley commented Nov 12, 2023

i put env = WLR_XWAYLAND,WAYLAND_DEBUG=1 Xwayland in my hyprland config, but now it seems that Xwayland hasnt started up at all (all xorg apps fail to open), i also tried creating a wrapper script which just has

#!/bin/sh

WAYLAND_DEBUG=1 Xwayland

then setting env = WLR_XWAYLAND,/home/beyley/xwayland_debug.sh
but that didnt work either, am i misunderstanding how this env var is supposed to work?

@vaxerski
Copy link
Member

image

try > the output to a file and see whats wrong

@Beyley
Copy link
Author

Beyley commented Nov 12, 2023

i get this output

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 

@vaxerski
Copy link
Member

odd

@Beyley
Copy link
Author

Beyley commented Nov 14, 2023

update: just had it occur with WebCord, VSCode, and Chromium, all running under XWayland, were just brought down at once, seems to not be related to Rider at least

heres the current state of my scripts, which cause the above mentioned "cannot establish any listening sockets" error
when i remove the env line, xwayland works fine
env = WLR_XWAYLAND,/home/beyley/xwayland_debug.sh

#!/bin/bash

WAYLAND_DEBUG=1 Xwayland >> /home/beyley/xwaylandlog 2>&1

another update: i was doing work and noticed waybar crashed, so i restarted it from a terminal, and then almost all my open apps closed immediately after, with waybar just saying "media suddenly stopped" and nothing else of interest
this time it wasnt exclusive to x11 apps, every app but kitty closed, including anki, firefox, webcord, and vscode (but this could be a totallly different issue manifesting itself as a similar one)

@Beyley Beyley changed the title Multiple apps being brought down at once by Jetbrains tools Intermittent xwayland crashes Nov 15, 2023
@neilking01
Copy link

I get this Xwayland crash on a regular basis and its damn annoying. It seems to be something to do with having something in the clipboard, then opening a file open/save dialog. Here are a couple of logs:

journal log: https://pastes.io/co3dwld8ub
hyprland log: https://pastes.io/gvy6lct3c6

@vaxerski
Copy link
Member

would be nice if there were some clear repro steps, I've not had xwayland crash even once. Copying, pasting, opening dialogs.

@neilking01
Copy link

neilking01 commented Nov 16, 2023

would be nice if there were some clear repro steps, I've not had xwayland crash even once. Copying, pasting, opening dialogs.

I really wish I could reproduce it at will but it doesn't always work when I repeat what triggered it. I'll try and see if I can.

@neilking01
Copy link

I made a wrapper for Xwayland so i can dump its output to a file. The last 2 lines of the output are:

XWAYLAND: wl_display@1: error 1: invalid arguments for wl_shm@4.create_pool (EE) failed to dispatch Wayland events: Invalid argument

@Beyley
Copy link
Author

Beyley commented Nov 17, 2023

I made a wrapper for Xwayland so i can dump its output to a file. The last 2 lines of the output are:

XWAYLAND: wl_display@1: error 1: invalid arguments for wl_shm@4.create_pool (EE) failed to dispatch Wayland events: Invalid argument

Could you send your wrapper script and how to set it up with hyprland? I've been unable to get one working

@neilking01
Copy link

neilking01 commented Nov 17, 2023

mv /usr/bin/Xwayland /usr/bin/Xwayland_orig

/usr/bin/Xwayland:

#!/bin/bash

d=`date +%s`
mv /home/me/xwayland.log /home/me/xwayland_$d.log
/usr/bin/Xwayland_orig $@ &> /home/me/xwayland.log

@neilking01
Copy link

I may have made some progress. In my hyprland.conf i have: env = QT_QPA_PLATFORM,xcb. I have removed this and only set this up for apps that really need it instead of it being system-wide. If you have this set system-wide, try what I did. I'm not 100% sure yet if this fully works around the Xwayland crashes but so far I am unable to reproduce it the way I usually do.

@Beyley
Copy link
Author

Beyley commented Nov 19, 2023

I made a wrapper for Xwayland so i can dump its output to a file. The last 2 lines of the output are:

XWAYLAND: wl_display@1: error 1: invalid arguments for wl_shm@4.create_pool (EE) failed to dispatch Wayland events: Invalid argument

Can confirm this is the issue i am getting as well, using your wrapper script, i have no consistent reproduction, but it happens multiple times a day

XWAYLAND: wl_display@1: error 1: invalid arguments for wl_shm@4.create_pool
(EE) failed to dispatch Wayland events: Invalid argument

@neilking01
Copy link

does the solution i mentioned above apply to you? would be interesting to know if it makes a difference.

@Beyley
Copy link
Author

Beyley commented Nov 19, 2023

does the solution i mentioned above apply to you? would be interesting to know if it makes a difference.

ive had multiple xwayland crashes without any QT apps open, so i dont believe it is relevant to me

@Beyley
Copy link
Author

Beyley commented Nov 22, 2023

i have found a semi-consistent reproduction, open Jetbrains Writerside, open this repository, open some document and start typing, consistently every time, in under a minute it will bring down xwayland

its always the same error inside of the xwayland logs

does not happen on plasma

@Eddio0141
Copy link

also happens on my system on nixos, and never on plasma wayland
happens often more if im playing buckshot roulette for some reason

last few lines of xwayland output

Errors from xkbcomp are not fatal to the X server
XWAYLAND: wl_display@1: error 1: invalid arguments for wl_shm@4.create_pool
(EE) failed to dispatch Wayland events: Invalid argument

is there a way to at least restart xwayland? this happens way too often

@neilking01
Copy link

Still an issue for me. My only solution is to run apps in it as little as possible but there's always the fear that it will crash at a very important moment. I only use QT_QPA_PLATFORM=xcb if the app has issues without it.

@cernoh
Copy link

cernoh commented Mar 4, 2024

Having this issue too, same error

@GyaneshW
Copy link

I get this Xwayland crash on a regular basis and its damn annoying. It seems to be something to do with having something in the clipboard, then opening a file open/save dialog. Here are a couple of logs:我经常遇到 Xwayland 崩溃的情况,这真是太烦人了。这似乎与剪贴板中的内容有关,然后打开文件打开/保存对话框。以下是一些日志:

journal log: https://pastes.io/co3dwld8ub日志日志:https://pastes.io/co3dwld8ub hyprland log: https://pastes.io/gvy6lct3c6 hyprland 日志:https://pastes.io/gvy6lct3c6

Having the same error!!!

@neilking01
Copy link

s/nearset/nearest/g

@Eddio0141
Copy link

modifying hyprland configuration as below:

xwayland {
  # latest configuration
  # use_nearset_neighbor = true
  # force_zero_scaling = true
  # current configuration
  use_nearset_neighbor = false
  force_zero_scaling = false
}

That works for me. Maybe the different scaling between xwayland and wayland lead to this error. If crashing again, I will report.

Tried this, but still causes xwayland crash for me

@neilking01
Copy link

Tried this, but still causes xwayland crash for me

Do you have a reliable way of reproducing the crash?

@Eddio0141
Copy link

Tried this, but still causes xwayland crash for me

Do you have a reliable way of reproducing the crash?

Yes it's a jank way of doing but it crashes xwayland every time for me
I only asked one person to test it and they don't have the same problem that I do with xwayland, and it didn't do anything for them, so I can't guarantee this would work for any of you here

This is a unity project, so get the correct unity version or add the project on unityhub to let it download the correct unity version
Link
Read the readme for the instructions

@Eddio0141
Copy link

Eddio0141 commented Mar 14, 2024

What is you wlroots version? If yours is 1.7, try to use wlroots-1.8.0 instead of wlroots-1.7.

Mine is on the latest git

@GyaneshW
Copy link

What is you wlroots version? If yours is 1.7, try to use wlroots-1.8.0 instead of wlroots-1.7.

There's a 1.8? I only see up to 1.7.2 on the releases on their gitlab

In AUR, there is a git version of wlroots-1.8.
But I'm sorry to tell you, I'm still having this problem with wlroots-1.8, and I don't know how to fix it now.
When I open a choose file dialog in piclist-bin application, the crash happened again. At the time, I run a Window11 virtual machine in VirtualBox, Vivaldi browser with some webs, Obsidian application, and Zotero for paper reading. Along with the crash appeared, virtualbox, piclist-bin suddenly disappeard. Then I try to rerun these application in terminal, but nothing I got, only a freezing terminal with only one command for reruning application.

@jennydaman
Copy link

I am observing the same behavior on NixOS unstable. Running TurboVNC's vncviewer for some while will cause XWayland to crash, without any clear cause.

I set debug:disable_logs = false in hyprland.conf, are there more ways to toggle on logging?

@Eddio0141
Copy link

update to this issue on my pc
after updating hyprland to latest git at this point in time, going through the steps to cause the xwayland crash no longer works, no matter how many times I try
this issue might have been fixed, will see if long term use causes xwayland to crash like it used to

@Eddio0141
Copy link

Yeah this issue doesn't happen anymore on my side

@littleblack111
Copy link
Contributor

same here. crashed a few times. along with a waybar crash.
some logs:

src/gbm_drv_common.c:131: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808669784

src/gbm_drv_common.c:131: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808669784

error in client communication (pid 496472)
Gdk-Message: 21:50:09.371: Error reading events from display: Broken pipe
error in client communication (pid 490771)
error in client communication (pid 496427)
error in client communication (pid 608380)
Gdk-Message: 21:50:09.383: Error reading events from display: Broken pipe
error in client communication (pid 490716)
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
Gdk-Message: 21:50:09.386: Error reading events from display: Broken pipe
Gdk-Message: 21:50:09.386: Error reading events from display: Broken pipe
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
error in client communication (pid 490630)
(EE) failed to read Wayland events: Connection reset by peer
error in client communication (pid 609684)
Io error: Broken pipe (os error 32)
Io error: Broken pipe (os error 32)
Io error: Broken pipe (os error 32)
Error: ExitFailure(1)
polybar|error: X connection error, terminating... (what: Socket, pipe or stream error)
polybar|notice:  Termination signal received, shutting down...
W2024-09-22 21:50:09.458260 xcbeventreader.cpp:51] XCB connection ":2" got error: 1
XIO:  fatal IO error 2 (No such file or directory) on X server ":2"
      after 26 requests (26 known processed) with 0 events remaining.
I2024-09-22 21:50:09.458806 xcbmodule.cpp:76] Disconnected from X11 Display :2
[0922/215009.464885:ERROR:elf_dynamic_array_reader.h(64)] tag not found
No players found
[WebContents] crashed (reason: crashed, exitCode: 134)... reloading
error in client communication (pid 490832)
[490832:0922/215011.057670:ERROR:wayland_event_watcher.cc(68)] Fatal Wayland communication error: Broken pipe.
[490832:0922/215011.057729:FATAL:electron_browser_main_parts.cc(502)] Failed to shutdown.
[0922/215011.062441:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0922/215011.062573:ERROR:elf_dynamic_array_reader.h(64)] tag not found

@littleblack111
Copy link
Contributor

littleblack111 commented Sep 22, 2024

and gnome-polkit seems to be going up 2 100% cpu after this as well...

EDIT: pkexec etc wont work. but sudo does... is gnome polkit running in xwayland?

@Eddio0141
Copy link

@littleblack111
I also have waybar crash happening after resuming from a sleep, so it might not be hyprland related
If you have cava enabled then might be related to Alexays/Waybar#3437

@littleblack111
Copy link
Contributor

same, but i have this issue: #7822
i dont have cava enabled

@littleblack111
Copy link
Contributor

@vaxerski still experiencing this issue, please reopen

@vaxerski vaxerski reopened this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants