GNOME Bugzilla – Bug 641711
Crash in remove_queued_alarm
Last modified: 2013-06-25 12:35:40 UTC
Moving this from a downstream bug report: https://bugzilla.redhat.com/show_bug.cgi?id=675589 abrt version: 1.1.14 architecture: i686 Attached file: backtrace cmdline: /usr/libexec/evolution/2.32/evolution-alarm-notify comment: the aplett is just notifiying me about an appointment component: evolution crash_function: remove_queued_alarm executable: /usr/libexec/evolution/2.32/evolution-alarm-notify kernel: 2.6.35.10-74.fc14.i686.PAE package: evolution-2.32.1-1.fc14 rating: 4 reason: Process /usr/libexec/evolution/2.32/evolution-alarm-notify was killed by signal 11 (SIGSEGV) release: Fedora release 14 (Laughlin) time: 1297025413 uid: 500 How to reproduce ----- 1. the aplett is just notifiying me about an appointment Core was generated by `/usr/libexec/evolution/2.32/evolution-alarm-notify'. Program terminated with signal 11, Segmentation fault.
+ Trace 225873
Thread 1 (Thread 2601)
Multiple duplicates on RH bugzilla ( https://bugzilla.redhat.com/show_bug.cgi?id=675589 ) Also for version 3.0.x.
Possible reproducer and analysis from the downstream bug by Ramon de C Valle: After a brief analysis of the source code, a way to reproduce this issue is: 1. Open Evolution 2. Create a new appointment 3. Set an alarm for this event 4. Wait the alarm to be triggered 5. Wait the pop up to close 6. Without iteracting with the tray icon of the alam, delete both the alarm and the appointment in Evolution 7. Click in the tray icon of the alarm A dump will be created at /var/spool/abrt directory. [...] 300 301 d(printf("%s:%d (remove_queued_alarm) \n",__FILE__, __LINE__)); 302 303 for (l = cqa->queued_alarms; l; l = l->next) { 304 qa = l->data; 305 if (qa->alarm_id == alarm_id) 306 break; 307 } 308 309 if (!l) 310 return FALSE; 311 312 cqa->queued_alarms = g_slist_delete_link (cqa->queued_alarms, l); 313 [...] In remove_queued_alarm function, it does not check if the component still exists or, if this was the last queued alarm for this component, if the component was not already removed.
I tried to reproduce this on current git master, which is after 3.3.2, and I cannot let it crash with the above steps. I also tried to run evolution-alarm-notify under valgrind, but it doesn't show any issue with memory. If I just add an event with alarm, which can trigger the alarm and show me the notification icon, then keeping the icon as is and deleting the appointment leads to no action when clicking the notification icon with the left mouse button, because tray_icon_clicked_cb() function checks how many alarms are stored, with g_list_length (tray_icons_list) > 0 , and if there is none then it just ignores the request. Clicking with the right button removes the icon from the notification tray.
Downstream bug report from 3.2.2: https://bugzilla.redhat.com/show_bug.cgi?id=771392
+ Trace 229386
Thread 1 (Thread 0xb7863880 (LWP 13866))
So given that you couldn't reproduce, let's assume it's fixed. We'll reopen if it happens with evolution 3.4.
Hrm, I just got this crash report from 3.6.2: https://bugzilla.redhat.com/show_bug.cgi?id=884908 Version-Release number of selected component: evolution-3.6.2-3.fc18 Additional info: backtrace_rating: 4 cmdline: /usr/libexec/evolution/3.6/evolution-alarm-notify crash_function: remove_queued_alarm executable: /usr/libexec/evolution/3.6/evolution-alarm-notify kernel: 3.6.7-5.fc18.x86_64 remote_result: 675589 uid: 1000 Core was generated by `/usr/libexec/evolution/3.6/evolution-alarm-notify'. Program terminated with signal 11, Segmentation fault.
+ Trace 231276
Thread 1 (Thread 0x7f06e64afa00 (LWP 11051))
One way to reproduce this for me: a) Make sure that Edit->Preferences->Calendar and Tasks->Reminders tab, [ ] Display alarms in notification area only is not checked b) run /usr/libexec/evolution/X.Y/evolution-alarm-notify on a console, if not running already c) in Evolution's Calendar view add a new On This Computer calendar, name it anyhow, like 'test', and when created then select it in the left tree and make sure it's checked for Alarm notification on the same tab as a) d) switch to a day view and create a new event with these values: Calendar: test Summary: alarm 1 Time: today, not more than 60 minutes from current time (like if it's 2:10 PM, then at 2:30 PM) Set an alarm on it: 1 hour before the appointment [Save] e) a notification window with the appointment alarm is shown; left it as is and switch back to evolution. Create the second alarm event same as the one at d), only make the time for it's start one minute later than the alarm 1; Name it "alarm 2" [Save] f) a notification for "alarm 2" is shown, the new event is added to the previously opened notification window, below the alarm 1 g) in the notification window select "alarm 2" and click "Dismiss"; the notification window contains only one event now, the "alarm 1". h) keep the notification window as is and switch to evolution; right click the "test" calendar and "Delete" it i) switch to the notification window and close it with [x] at the right top corner (or whenever your window manager shows the button to close the window) The evolution-alarm-notify process crashed at remove_queued_alarm()
Created attachment 247724 [details] [review] evo patch for evolution; Instead of crashing, the events from removed calendar are removed also from the notification dialog, which can lead to the dialog close too. The patch also fixes a memory leak and makes sure that GtkTreeIter-s are accessed only if they are valid.
Created commit f6f4a73 in evo master (3.9.4+) Created commit 02a8f3e in evo gnome-3-8 (3.8.4+)