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

Hyprland freezes and crashes after running for a couple hours #2742

Closed
Maybegus opened this issue Jul 19, 2023 · 27 comments
Closed

Hyprland freezes and crashes after running for a couple hours #2742

Maybegus opened this issue Jul 19, 2023 · 27 comments
Labels
bug Something isn't working

Comments

@Maybegus
Copy link

Hyprland Version

Hyprland, built from branch at commit 62c7588

Bug or Regression?

Bug

Description

After running Hyprland for 1-2hrs, the display completely freezes except for the mouse cursor.

This only happens on my desktop system using an AMD gpu, my laptop with an Intel gpu works fine, both are using the same nixos configuration for hyprland.

How to reproduce

Run Hyprland for a couple hours

Crash reports, logs, images, videos

hyprlandCrashReport1610.txt

@MightyPlaza
Copy link
Contributor

if it freezes you shouldn't have a crash report

@day0xy
Copy link

day0xy commented Jul 20, 2023

It may be a problem with AMD drive

@MightyPlaza
Copy link
Contributor

Also happens to me sometimes, but I can't move the mouse so is likely unrelated.
Mine looks like hyprland got stuck in a loop

@vaxerski vaxerski added the bug Something isn't working label Jul 20, 2023
@droc12345
Copy link

droc12345 commented Jul 22, 2023

I just updated to the latest git version last night and I just had my first system freeze, not even the mouse would move, all keyboard input ignored. Had to ssh in to kill hyprland. I'm also running on an amd gpu(rx 560).

The last time I updated from git (June 24) I've been running without a problem so something in the last months changes with either hyprland or wlroots seems to be causing this.

Edit to add: no crash log as I killed hyprland with a SIGHUP.

@vaxerski
Copy link
Member

if you can ssh then please do sudo gdb attach $(pidof Hyprland) and provide a bt -full to see where it got stuck.

@droc12345
Copy link

It locked up just after I made the above post (hadn't seen your message yet), but it hasn't happened again.
So I'll describe what was going on.

I had a firefox window open (floating), sometime later I opened a terminal window (foot floating),
executed a few command and then typed "exit" to close the terminal, at that point it froze.
Foot terminal window was still showing including the exit command,
but when I ssh'd in foot had already quit running, though it was displaying.

So I'm thinking it has something to do with damage tracking/feedback.
Anyway if it happens again I'll run gdb on it.

@droc12345
Copy link

Just posted the above and ... hang lol

(gdb) bt -full
#0 0x00007fb190ee2576 in () at /lib64/libc.so.6
#1 0x00007fb190ee8b9b in malloc () at /lib64/libc.so.6
#2 0x00007fb1910a9cf8 in operator new(unsigned long) () at /usr/lib/gcc/x86_64-pc-linux-gnu/12.3.0/libstdc++.so.6
#3 0x000000000055c42c in std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >::vector(std::initializer_list<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > const&) ()
#4 0x0000000000558c6f in getRandomMessageabi:cxx11 ()
#5 0x0000000000558f6c in CrashReporter::createAndSaveCrash(int) ()
#6 0x00000000005935ec in handleUnrecoverableSignal(int) ()
#7 0x00007fb190e993c0 in () at /lib64/libc.so.6
#8 0x00007fb190e99341 in raise () at /lib64/libc.so.6
#9 0x00007fb190e832b6 in abort () at /lib64/libc.so.6
#10 0x00007fb190edc077 in () at /lib64/libc.so.6
#11 0x00007fb190ee3e5a in () at /lib64/libc.so.6
#12 0x00007fb190ee5e2c in () at /lib64/libc.so.6
#13 0x00007fb190ee9014 in free () at /lib64/libc.so.6
#14 0x00007fb1917a4f48 in () at /usr/lib64/libwayland-server.so.0
#15 0x00007fb1917a564e in wl_resource_destroy () at /usr/lib64/libwayland-server.so.0
#16 0x00000000004acda8 in CWaylandResource::~CWaylandResource() ()
#17 0x00000000004ab53a in ()
#18 0x00000000004ab630 in ()
#19 0x00007fb19123d23a in () at /usr/lib64/libffi.so.8
#20 0x00007fb19123c654 in () at /usr/lib64/libffi.so.8
#21 0x00007fb19123cdad in ffi_call () at /usr/lib64/libffi.so.8
#22 0x00007fb1917aac24 in () at /usr/lib64/libwayland-server.so.0
#23 0x00007fb1917a5d33 in () at /usr/lib64/libwayland-server.so.0
#24 0x00007fb1917a8c42 in wl_event_loop_dispatch () at /usr/lib64/libwayland-server.so.0
#25 0x00007fb1917a6565 in wl_display_run () at /usr/lib64/libwayland-server.so.0
#26 0x00000000004796cc in main ()

@vaxerski
Copy link
Member

it is stuck in malloc, you sure you're not OOM-ing?

@MightyPlaza
Copy link
Contributor

pretty sure OOM would appear in journalctl and close userspace applications (not what happens here, at least for me)

@vaxerski
Copy link
Member

vaxerski commented Jul 23, 2023

it would not unless you have some OOM prevention daemon running. Speaking from experience, I OOMd a lot of times on 32GB of RAM and no swap. That's what it looks like, everything basically locks up. Even systemd-oomd sometimes can't catch an OOM.

@droc12345
Copy link

droc12345 commented Jul 23, 2023

I'm pretty sure it's not an oom problem (64 gb mem and 40+ gb free), and this didn't start happening until I updated on the 21st.
Prev update was June 24th.

If it happens again I'll run top and a few other diagnostic tools to see if I can narrow down what's happening.

Edit to add: If an oom problem there should be messages from the kernel, and killing off of processes.

@MightyPlaza
Copy link
Contributor

Hyprland or something else could cause a sudden spike in memory use and make you OOM
Also I'm not certain all freezes are caused by the same thing since NumLock light works sometimes but others doesn't.
Also SysReq Key sometimes works sometimes doesn't

@vaxerski
Copy link
Member

vaxerski commented Jul 23, 2023

Edit to add: If an oom problem there should be messages from the kernel, and killing off of processes.

I don't know about kernel messages but no killing will happen unless you have an anti-oom daemon running.

At any rate, gdb shows a hang in malloc, so what else could it be?

@droc12345
Copy link

If there is any OOM condition, the kernel should put out OOM labeled messages.
Unfortunately bt doesn't go far enough back to see what called the malloc.
I am also running openrc not systemd, systemd stuff doesn't apply to me.

What I'm going to do is go back to the version that was working and slowly work my way forward, checking along the way.

@vaxerski
Copy link
Member

sure, a git bisect would be faster probably :)

@droc12345
Copy link

Ok, I'll read up on bisect. :)

@day0xy
Copy link

day0xy commented Jul 24, 2023

After I upgraded to 64g memory last week, the stuck phenomenon no longer appeared. i don't know why

@droc12345
Copy link

droc12345 commented Jul 24, 2023

As of right now it appears to be commit 2c2314f causing my problems, I've undone the patch and no crashes ... yet.
I'll run it for a few days before I'm sure that it's the real cause.

Edit to add: It seems that the commit is not the problem but it took over a day for it to show up once.
So back to searching....

@droc12345
Copy link

Hmm, not sure what to make of things now. I compiled the latest hyprland git earlier and I'm not having the problems I was seeing the other day. I did notice that wlroots got updated to the latest, so I'm thinking the problem might have been wlroots instead of hyprland.

Anyway it seems to be working well now. Solved for me.

@Maybegus
Copy link
Author

Maybegus commented Aug 2, 2023

Solved for me too, closing.

@Maybegus Maybegus closed this as completed Aug 2, 2023
@lcallana
Copy link

lcallana commented Feb 18, 2024

Currently seeing a similar issue to this & #2789 on 0.35.0 installed via pacman (mouse frozen, audio stops) but on an amd 7900xtx. First saw the issue on Jan 20 most likely w/ version 0.34.0.

  • I don't have another machine to easily ssh in from
  • I'm not seeing anything unusual in journalctl.
  • Memory & vram usage seem normal when the freeze happens.
  • The freeze can happen any time between 10 seconds and 1 hour after login

Nothing unusual in the hyprland log (unless I'm missing some flag to enable more verbose logs):

[LOG] Instance Signature: 84ab8d11e8951a6551d1e1bf87796a8589da6d47_1708288156
[LOG] Hyprland PID: 812
[LOG] ===== SYSTEM INFO: =====
[LOG] System name: Linux
[LOG] Node name: ...
[LOG] Release: 6.7.5-arch1-1
[LOG] Version: #1 SMP PREEMPT_DYNAMIC Sat, 17 Feb 2024 14:02:33 +0000


[LOG] GPU information:
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] [1002:744c] (rev c8) (prog-if 00 [VGA controller])
13:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev cb) (prog-if 00 [VGA controller])


[LOG] 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

[LOG] ========================



[INFO] If you are crashing, or encounter any bugs, please consult https://wiki.hyprland.org/Crashes-and-Bugs/


[LOG] 
Current splash: Is this the real life, is this just fantasy


[LOG] Creating the HookSystem!
[LOG] Creating the KeybindManager!
[LOG] [hookSystem] New hook event registered: configReloaded
[LOG] Creating the AnimationManager!
[LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 16.07µs. Estimated average calc time: 0.04µs.
[LOG] Creating the ConfigManager!
[LOG] NOTE: further logs to stdout / logfile are disabled by default. Use debug:disable_logs and debug:enable_stdout_logs to override this.

@flajann2
Copy link

It freezes with me too. Not sure if it is a Hyprland problem or a Wayland problem. I have a 4K monitor, and what happens is that most of the screen freezes except for the upper left corner.

If I leave it for a while, the problem seems to "fix itself", but I normally don't want to wait that long, so I bounce Hyprland.

On Arch.

@anirudhlath
Copy link

anirudhlath commented Apr 19, 2024

Does the exact same for me as well. On nvidia and manjaro. Can't ssh or anything, system completely locks up and needs a cold boot.

@MightyPlaza can we reopen this or #2789 would be more relevant in this specific scenario.

@wassou93
Copy link

I have the same issue everything freeze including cursor! If I re-encounter the issue again I will share another back trace

@jonzuk-real
Copy link

Currently seeing a similar issue to this & #2789 on 0.35.0 installed via pacman (mouse frozen, audio stops) but on an amd 7900xtx. First saw the issue on Jan 20 most likely w/ version 0.34.0.

* I don't have another machine to easily ssh in from

* I'm not seeing anything unusual in journalctl.

* Memory & vram usage seem normal when the freeze happens.

* The freeze can happen any time between 10 seconds and 1 hour after login

Nothing unusual in the hyprland log (unless I'm missing some flag to enable more verbose logs):

[LOG] Instance Signature: 84ab8d11e8951a6551d1e1bf87796a8589da6d47_1708288156
[LOG] Hyprland PID: 812
[LOG] ===== SYSTEM INFO: =====
[LOG] System name: Linux
[LOG] Node name: ...
[LOG] Release: 6.7.5-arch1-1
[LOG] Version: #1 SMP PREEMPT_DYNAMIC Sat, 17 Feb 2024 14:02:33 +0000


[LOG] GPU information:
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] [1002:744c] (rev c8) (prog-if 00 [VGA controller])
13:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev cb) (prog-if 00 [VGA controller])


[LOG] 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

[LOG] ========================



[INFO] If you are crashing, or encounter any bugs, please consult https://wiki.hyprland.org/Crashes-and-Bugs/


[LOG] 
Current splash: Is this the real life, is this just fantasy


[LOG] Creating the HookSystem!
[LOG] Creating the KeybindManager!
[LOG] [hookSystem] New hook event registered: configReloaded
[LOG] Creating the AnimationManager!
[LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 16.07µs. Estimated average calc time: 0.04µs.
[LOG] Creating the ConfigManager!
[LOG] NOTE: further logs to stdout / logfile are disabled by default. Use debug:disable_logs and debug:enable_stdout_logs to override this.

I'm on nixos unstable and im having this exact problem on 0.40.0

@GabriWar
Copy link

yep, same here, in the last version, tried a clean install of everything in another pc and got the same (both nvidia & intel, one with 32gb of ram and other with 16gbs), ill keep earlyOOM running to see if it catches anything.

@GabriWar
Copy link

seems to happens to me when i press enter a lot or while im dragging something, could also be related to browser, im running thorium

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