Bug 1179258 - dunst hangs if a notification is displayed when DUNST_COMMAND_PAUSE is received
Summary: dunst hangs if a notification is displayed when DUNST_COMMAND_PAUSE is received
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dunst
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Zapletal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-06 13:43 UTC by Petr Spacek
Modified: 2015-04-22 22:41 UTC (History)
1 user (show)

Fixed In Version: dunst-1.1.0-2.fc21
Clone Of:
Environment:
Last Closed: 2015-04-22 22:41:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Spacek 2015-01-06 13:43:18 UTC
Description of problem:
Dunst hangs if a notification is displayed and DUNST_COMMAND_PAUSE is received.

Version-Release number of selected component (if applicable):
dunst-1.0.0-5.fc21.x86_64

How reproducible:
100 %

Steps to Reproduce:
1. Let dunst to display a message: $ notify-send test
2. While the message is shown, try to pause dunst: $ notify-send DUNST_COMMAND_PAUSE

Actual results:
CPU usage rockets to 100 %

Expected results:
Well, at lest the CPU should not be eaten by dunst :-) I'm not sure if currently displayed message should be displayed until RESUME or if PAUSE should just hold new messages and let old message disappear.


Additional info:
(gdb) thread apply all bt

Thread 2 (Thread 0x7fa5eebef980 (LWP 10919)):
#0  allocator_categorize (aligned_chunk_size=32) at gslice.c:460
#1  g_slice_free1 (mem_size=mem_size@entry=24, mem_block=0x2602060) at gslice.c:1080
#2  0x00007fa5ec9827ed in g_list_free_1 (list=<optimized out>) at glist.c:200
#3  0x00007fa5ec9976c2 in g_queue_pop_head (queue=0x2602040) at gqueue.c:521
#4  0x00000000004061d4 in update_lists () at dunst.c:108
#5  0x00000000004062b8 in run (data=0x0) at dunst.c:235
#6  0x0000000000406873 in onNotify (invocation=0x7fa5d0003090, parameters=0x7864ccb294db3d00, sender=0x7fa5d0012200 ":1.120", connection=0x260c030) at dbus.c:281
#7  handle_method_call (connection=0x260c030, sender=sender@entry=0x7fa5d0012200 ":1.120", object_path=object_path@entry=0x7fa5d000e9d0 "/org/freedesktop/Notifications", 
    interface_name=interface_name@entry=0x7fa5d0002d70 "org.freedesktop.Notifications", method_name=method_name@entry=0x7fa5d0010cb0 "Notify", 
    parameters=parameters@entry=0x7fa5d0012aa0, invocation=0x7fa5d0003090, user_data=0x0) at dbus.c:84
#8  0x00007fa5ed3ea9dc in call_in_idle_cb (user_data=0x7fa5d0003090) at gdbusconnection.c:4884
#9  0x00007fa5ec986aeb in g_main_dispatch (context=0x2602a30) at gmain.c:3111
#10 g_main_context_dispatch (context=context@entry=0x2602a30) at gmain.c:3710
#11 0x00007fa5ec986e88 in g_main_context_iterate (context=0x2602a30, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
#12 0x00007fa5ec9871b2 in g_main_loop_run (loop=0x262a550) at gmain.c:3975
#13 0x000000000040407c in main (argc=<optimized out>, argv=<optimized out>) at dunst.c:347

Thread 1 (Thread 0x7fa5df424700 (LWP 10921)):
#0  0x00007fa5ebf481dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fa5ec986e24 in g_main_context_poll (priority=2147483647, n_fds=2, fds=0x7fa5d00010c0, timeout=-1, context=0x7fa5d800e4a0) at gmain.c:4076
#2  g_main_context_iterate (context=0x7fa5d800e4a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3776
#3  0x00007fa5ec9871b2 in g_main_loop_run (loop=0x7fa5d800e430) at gmain.c:3975
#4  0x00007fa5ed3f9d96 in gdbus_shared_thread_func (user_data=0x7fa5d800e470) at gdbusprivate.c:273
#5  0x00007fa5ec9ad7b5 in g_thread_proxy (data=0x260e6d0) at gthread.c:764
#6  0x00007fa5ec21752a in start_thread (arg=0x7fa5df424700) at pthread_create.c:310
#7  0x00007fa5ebf5377d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

It seems that it is looping in while loop here:
(gdb) frame
#4  0x00000000004061d4 in update_lists () at dunst.c:108
108	                        g_queue_insert_sorted(queue, g_queue_pop_head(queue),
(gdb) l
103	
104	        check_timeouts();
105	
106	        if (pause_display) {
107	                while (displayed->length > 0) {
108	                        g_queue_insert_sorted(queue, g_queue_pop_head(queue),
109	                                              notification_cmp_data, NULL);
110	                }
111	                return;
112	        }

I'm not sure what is the purpose of this code.

Comment 1 Lukas Zapletal 2015-01-07 08:38:46 UTC
Hey, this should be fixed in the latest stable. Let me rebase the version in F20, I forgot this time.

Comment 2 Fedora Update System 2015-01-07 10:11:54 UTC
dunst-1.1.0-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dunst-1.1.0-2.fc21

Comment 3 Fedora Update System 2015-01-07 23:52:48 UTC
Package dunst-1.1.0-2.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dunst-1.1.0-2.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-0338/dunst-1.1.0-2.fc21
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2015-04-22 22:41:15 UTC
dunst-1.1.0-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.