phuhl / linux_notification_center

A notification daemon/center for linux
BSD 3-Clause "New" or "Revised" License
1.01k stars 40 forks source link

Segmentation Fault with AUR bin #218

Closed joe-herbert closed 1 year ago

joe-herbert commented 1 year ago

Firstly, love this project. It looks great and the customisability is fantastic.

Unfortunately, it often crashes on my system. I'm running Arch with BSPWM, with everything up to date and the latest version of deadd-notification-center-bin installed from the AUR.

When running deadd-notification-center it immediately fails with the following output about 75% of the time.

notificationDaemon started
deadd-notification-center: mmap 4096 bytes at (nil): Cannot allocate memory
deadd-notification-center: Try specifying an address with +RTS -xm<addr> -RTS
zsh: segmentation fault (core dumped)  deadd-notification-center

The remaining 25% of the time works great for a while, and then at some point fails with the same error. I haven't worked out what's triggering the failure as it seems to just happen randomly.

Is there a solution to this?

phuhl commented 1 year ago

Hi, thanks :)

Does your system have enough RAM? Looks like there is an issue with allocating more memory.

ktarnaris commented 1 year ago

I have the same problem. I have plenty of ram. Sometimes it is starting and crashes after a while

phuhl commented 1 year ago

Seems like a Haskell issue with the current kernel. Other reports:

https://github.com/IHaskell/IHaskell/issues/1396 https://bbs.archlinux.org/viewtopic.php?id=282429

You could check your kernel version with uname -a to confirm.

From the latter link:

TL;DR It's a kernel bug. Not fixed in 6.1.10 (and most likely neither in 6.2.7).

and also

The fix is queued for 6.2.9 https://git.kernel.org/pub/scm/linux/ke … 1deb8d7db0

Also, if you are comfortable to rebuild your kernel with a patch, that seems to do the trick for now.

If I understand correctly the fix is https://git.kernel.org/pub/scm/linux/ke … 079a7ea480 which is not in mainline yet.

I applied this patch and it did fix the issue as reproduced on the GHC repo. Thanks for the link.

Othewise, we'll have to wait.

Closing as this is an upstream issue. Thanks for the reports, though.

PLNech commented 1 year ago

For the record, hitting the same error with kernel 6.3.2-arch1-1 :sweat:

joe-herbert commented 1 year ago

I was still having the error with 6.3.3-arch1-1 but yesterday I patched my kernel using the link from @phuhl's last comment (the below patch for reference) and since I did that it seems to be completely fixed. That definitely seems to be a solution until the fix is added to the main arch kernel.

https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?h=mm-hotfixes-unstable&id=aa4ec634c24aa2ff24025ed1de763e079a7ea480