Open MichaelSheely opened 1 year ago
Try to list coredumps to see if dunst crashed:
coredumpctl list
If it did, make sure gdb is installed and set the following environment variable:
export DEBUGINFOD_URLS="https://debuginfod.debian.net"
And run:
coredumpctl debug PID_OF_DUNST_FROM_COREDUMPCTL_OUTPUT
gdb will download all the required symbols from the debuginfod server, and at some point you will be dropped into a gdb shell, run the backtrace
command and post its output here. You should see something like this:
Thanks for the response!
It took some time to reproduce again, but just today I confirmed notifications are not showing up.
I did not have systemd-coredump
installed, but I have installed it now.
It returns
$ coredumpctl list
No coredumps found.
but I'm not familiar with the tool (I could imagine it would only work if it is installed during a crash).
I don't think it crashed though, given that is still appears in the list of running processes:
$ ps aux | grep dunst
msheely 5788 29.3 0.0 604552 36124 ? Ssl Jul31 4242:41 /usr/bin/dunst
Is there anything else I should try now, or just go ahead and manually kill and relaunch as I did before and check for coredumps again the next time it stops displaying notifications?
I could imagine it would only work if it is installed during a crash.
Correct
You might also want to check man systemd-coredump, enabling the service might be required if it's not already.
I don't think it crashed though, given that is still appears in the list of running processes
Doesn't mean it didn't crash, dunst is automatically invoked by dbus if it's not already running when a notification is received. You might want to check the output of journalctl --user -u dunst
to see if anything of interest is there
enabling the service might be required
I believe it was automatically enabled when I installed it based on the return value of this command:
$ sudo sysctl -a | grep kernel.core_pattern
kernel.core_pattern = |/lib/systemd/systemd-coredump %P %u %g %s %t 9223372036854775808 %h
I also tested by sending $ kill -s SIGSEGV 297858
to a vim process I had running, after which there was one coredump available:
$ coredumpctl list
TIME PID UID GID SIG COREFILE EXE SIZE
Fri 2023-08-11 08:48:47 PDT 297858 391236 89939 SIGSEGV present /usr/bin/vim.gtk3 3.8M
dunst is automatically invoked by dbus if it's not already running when a notification is received
Ah good to know. I have tested with multiple notifications once I notice one that didn't come through though. (My thinking here being that if the only problem was that dunst crashed, and then was restarted by the next notification, it would seem that the restart would fix the issue, and then subsequent notifications should be displayed without issue -- which doesn't match observations). But I suppose something could happen that gets even the relaunched dunst into a bad state, but it's curious that manually killing that dunst process and relaunching seems to be a temporary fix.
check the output of journalctl --user -u dunst to see if anything of interest is there
Thanks! You are correct, there are three status=1/Failure messages. Here is the full output:
$ journalctl --user -u dunst
Jun 20 20:59:01 [HOSTNAME] dunst[6515]: XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":20"
Jun 20 20:59:01 [HOSTNAME] dunst[6515]: after 8008989874 requests (8008989874 known processed) with 361 events remaining.
Jun 20 20:59:01 [HOSTNAME] systemd[4349]: dunst.service: Main process exited, code=exited, status=1/FAILURE
Jun 20 20:59:01 [HOSTNAME] systemd[4349]: dunst.service: Failed with result 'exit-code'.
Jun 20 20:59:01 [HOSTNAME] systemd[4349]: dunst.service: Consumed 1w 5d 14h 16min 27.419s CPU time.
-- Boot 1a632811a92c4ca182720e427aca23cb --
Jun 21 13:05:17 [HOSTNAME] systemd[4944]: Starting dunst.service - Dunst notification daemon...
Jun 21 13:05:17 [HOSTNAME] systemd[4944]: Started dunst.service - Dunst notification daemon.
Jun 29 13:15:26 [HOSTNAME] systemd[4944]: dunst.service: Consumed 1d 16h 24min 55.850s CPU time.
Jun 29 13:15:58 [HOSTNAME] systemd[4944]: Starting dunst.service - Dunst notification daemon...
Jun 29 13:15:58 [HOSTNAME] systemd[4944]: Started dunst.service - Dunst notification daemon.
Jul 05 13:20:58 [HOSTNAME] dunst[110777]: X connection to :1 broken (explicit kill or server shutdown).
Jul 05 13:20:58 [HOSTNAME] systemd[4944]: dunst.service: Main process exited, code=exited, status=1/FAILURE
Jul 05 13:20:58 [HOSTNAME] systemd[4944]: dunst.service: Failed with result 'exit-code'.
Jul 05 13:20:58 [HOSTNAME] systemd[4944]: dunst.service: Consumed 28min 6.736s CPU time.
-- Boot eb4d3830155d4f73be38b7b0c816c49d --
Jul 05 13:42:59 [HOSTNAME] systemd[3552]: Starting dunst.service - Dunst notification daemon...
Jul 05 13:42:59 [HOSTNAME] systemd[3552]: Started dunst.service - Dunst notification daemon.
Jul 20 12:40:33 [HOSTNAME] systemd[3552]: dunst.service: Consumed 6d 15h 18min 59.742s CPU time.
Jul 20 12:40:56 [HOSTNAME] systemd[3552]: Starting dunst.service - Dunst notification daemon...
Jul 20 12:40:56 [HOSTNAME] systemd[3552]: Started dunst.service - Dunst notification daemon.
Jul 20 15:04:49 [HOSTNAME] dunst[3896948]: WARNING: Unsupported mouse button: '4'
Jul 27 14:50:41 [HOSTNAME] dunst[3896948]: WARNING: Unsupported mouse button: '4'
Jul 31 10:07:31 [HOSTNAME] dunst[3896948]: X connection to :1 broken (explicit kill or server shutdown).
Jul 31 10:07:31 [HOSTNAME] systemd[3552]: dunst.service: Main process exited, code=exited, status=1/FAILURE
Jul 31 10:07:31 [HOSTNAME] systemd[3552]: dunst.service: Failed with result 'exit-code'.
Jul 31 10:07:31 [HOSTNAME] systemd[3552]: dunst.service: Consumed 20min 26.071s CPU time.
-- Boot 685c56b63bc04cc8b2020d48e932783f --
Jul 31 10:10:57 [HOSTNAME] systemd[3578]: Starting dunst.service - Dunst notification daemon...
Jul 31 10:10:57 [HOSTNAME] systemd[3578]: Started dunst.service - Dunst notification daemon.
I'll go ahead and restart the service today if there is nothing further we can glean from this instance and update again when/if I next observe a missed notification, and will upload any applicable core dumps.
X connection to :1 broken (explicit kill or server shutdown).
and
fatal IO error 11 (Resource temporarily unavailable) on X server ":20"
Seem to suggest that you spawned multiple X11 servers, was it intended behavior ? If it was not, I would try to understand why it's happening.
Did it happen again? If not I think this issue can be closed. It could be something weird about your setup if there are issues connecting to Xorg
Yes, I can reliably reproduce this issue given a few days. I am still able to fix by killing and restarting dunst.
After Shell suggested multiple X11 servers I reached out to the xorg list.
On Tuesday I can check the logs mentioned in this reply again. The other reply suggests that this must be happening locally, but that multiple logins could create multiple X11 servers. There is only one use account on the machine in question, so the only idea I have is that perhaps something strange is going on with the screen lock, resulting in multiple logins -> multiple X11 servers -> problems for dunst until relaunched. This doesn't seem to match the observations though, since entering the password at the lock screen seems to bring back the exact state the session was left in beyond the passage of time.
A workaround would be to set the service to restart when it fails in systemd (Restart=always)
Did you resolve it in the end?
Issue description
The first time this happened, I thought it was a fluke. It has now happened a second time.
After several days (will get a more accurate estimate in a few days) dunst claims to be working, but no notifications are displayed.
A short-term workaround is to manually kill dunst and relaunch.
Installation info
1.9.0 (2022-06-27)
Configuration Details
dunstrc have not created a custom dunstrc, using the builtin default.
Repro (after waiting several days)
After noticing the issue had recurred again today, I set about trying to determine the cause.
No stdout or stderr, no popup displayed.
No popup displayed.
Test with browser notifications:
Also tried this in firefox. Same exact result.
Debugging Attempts
Confirm dunst is running.
Try the debug command, ensure not paused.
Check status.
Check dunst server info.
Used the following to kill and attempt to relaunch:
While the initial attempt to kill and failed, relaunching with systemctl is successful.
Now all notifications work. Will update with details of if I am able to reproduce which action causes notifications to stop working again after several days.