After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 272988 - gtkhtml from CVS goes into an endless loop
gtkhtml from CVS goes into an endless loop
Status: RESOLVED FIXED
Product: GtkHtml
Classification: Other
Component: Editing
3.8.x
Other All
: High major
: ---
Assigned To: gtkhtml-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2005-02-24 20:05 UTC by Philip Van Hoof
Modified: 2009-01-06 22:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
It wasn (1.77 KB, patch)
2005-02-24 21:53 UTC, Philip Van Hoof
none Details | Review
How it was wasn't how to securely remove an item from a list. Especially not when using multiple threads and few locking mechanisms (1.77 KB, patch)
2005-02-24 21:53 UTC, Philip Van Hoof
needs-work Details | Review

Description Philip Van Hoof 2005-02-24 20:05:43 UTC
Steps to reproduce:
1. Use Evolution
2. Type a new message
3. On random occasions this happens


Stack trace:
remove_spell_errors (spell_errors=0xaa68ffc, offset=85, len=42)
    at htmltext.c:2115
/home/freax/cvs/gnome/gtkhtml/src/htmltext.c:2115:55005:beg:0xb7cf1100
(gdb) bt
  • #0 remove_spell_errors
    at htmltext.c line 2115
  • #1 object_split
    at htmltext.c line 712
  • #2 html_object_split
    at htmlobject.c line 912
  • #3 split_and_add_empty_texts
    at htmlengine-edit-cut-and-paste.c line 344
  • #4 insert_object_do
    at htmlengine-edit-cut-and-paste.c line 853
  • #5 insert_object_for_undo
    at htmlengine-edit-cut-and-paste.c line 1078
  • #6 insert_object
    at htmlengine-edit-cut-and-paste.c line 1091
  • #7 html_engine_insert_text_with_extra_attributes
    at htmlengine-edit-cut-and-paste.c line 1320
  • #8 html_engine_paste_text_with_extra_attributes
    at htmlengine-edit-cut-and-paste.c line 1351
  • #9 html_engine_paste_text
    at htmlengine-edit-cut-and-paste.c line 1358
  • #10 gtk_html_im_commit_cb
    at gtkhtml.c line 3098
  • #11 g_cclosure_marshal_VOID__STRING
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #16 gtk_im_multicontext_new
    from /usr/lib/libgtk-x11-2.0.so.0
  • #17 g_cclosure_marshal_VOID__STRING
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #21 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #22 gtk_im_context_simple_new
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 gtk_im_context_simple_new
    from /usr/lib/libgtk-x11-2.0.so.0
  • #24 gtk_im_context_simple_new
    from /usr/lib/libgtk-x11-2.0.so.0
  • #25 gtk_im_context_filter_keypress
    from /usr/lib/libgtk-x11-2.0.so.0
  • #26 gtk_im_multicontext_new
    from /usr/lib/libgtk-x11-2.0.so.0
  • #27 gtk_im_context_filter_keypress
    from /usr/lib/libgtk-x11-2.0.so.0
  • #28 key_press_event
    at gtkhtml.c line 880
  • #29 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #30 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #31 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #32 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #33 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #34 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #35 gtk_widget_send_expose
    from /usr/lib/libgtk-x11-2.0.so.0
  • #36 gtk_window_propagate_key_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #37 gtk_window_propagate_key_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #38 bonobo_window_get_accel_group
    from /usr/lib/libbonoboui-2.so.0
  • #39 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #40 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #41 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #42 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #43 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #44 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #45 gtk_widget_send_expose
    from /usr/lib/libgtk-x11-2.0.so.0
  • #46 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #47 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #48 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #49 g_main_depth
    from /usr/lib/libglib-2.0.so.0
  • #50 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #51 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #52 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #53 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #54 main
    at main.c line 613

Other information:
I launched the gdb-command with the PID of the evolution0process as argument
while the evolution-process was hanging. Thats how I obtained the backtrace.
Comment 1 Philip Van Hoof 2005-02-24 21:53:10 UTC
Created attachment 44888 [details] [review]
It wasn
Comment 2 Philip Van Hoof 2005-02-24 21:53:49 UTC
Created attachment 44889 [details] [review]
How it was wasn't how to securely remove an item from a list. Especially not when using multiple threads and few locking mechanisms
Comment 3 André Klapper 2005-09-16 18:55:06 UTC
both attachments are the same, so marking one as obsolete
Comment 4 Kaushal Kumar 2005-09-21 07:33:01 UTC
Philip: So, the above patch handles the removing of spell error nodes from the
list using g_list_remove_all instead of g_list_remove_link. Could you tell me
how this change would help avoid an infinite loop.
Also, if the spell_errors list contains two identical data items, wouldn't the
second instance of calling g_list_remove_all be redundant?

Thanks.
Comment 5 André Klapper 2006-01-21 22:52:26 UTC
adding philip to cc list; please answer kaushal's question above. thanks very much in advance. :-)
Comment 6 Philip Van Hoof 2006-03-24 09:10:27 UTC
Well, this was a race condition. So I remember that I tried to find the problem in the path of that stack-trace. And saw that part. I'm not sure if it actually fixed the problem. It it's been a few months since I last checked.

I don't think this bug should be marked as an enhancement. It crashes both Evolution and makes the desktop unusable slow. It even gets difficult to type a command like "killall -9 evolution".

Imho it's a major and critical bug. Note that the bug still happens. I think at least once a week. I basically started typing my e-mails in gedit to avoid this bug. But imagine what 'unstable-feeling' most normal users get.

I feel this bug is being ignored. But fine ...
Comment 7 Philip Van Hoof 2006-03-24 09:12:40 UTC
Oh. I also noticed it often happens a few seconds after copy/pasting text.
Comment 8 André Klapper 2006-03-24 10:50:40 UTC
i also don't think this bug should be marked as an enhancement. seems like i have not run into this bug yet. ok, we have a patch. philip, you still have those crashes. after applying that patch or haven't you applied it? hmm.
Comment 9 Philip Van Hoof 2006-03-24 10:59:59 UTC
Actually, after reviewing my own patch, I don't think it would solve the problem. I think this is happening a few methods higher on the stack. Probably some recursive function calling happning incorrectly.

I should really investigate this, I guess. Anyway, as it's a race condition it's not easy to reproduce the problem. But I'll try to launch a debugger each time it happens.

Which isn't going to be easy, as when it happens, it consumes huge amounts of I/O and makes the desktop itself very slow. It even happens that the kernel kill the process.

Comment 10 Philip Van Hoof 2006-09-11 10:07:12 UTC
I had this bug again yesterday. It had been months since it happened however.
Comment 11 Kjartan Maraas 2007-01-25 15:29:04 UTC
Are we still missing a complete diagnosis on this problem? Is it still there?
Comment 12 Srinivasa Ragavan 2007-08-23 12:49:16 UTC
Setting the patch status from comment #9
Comment 13 Matthew Barnes 2007-11-22 15:06:57 UTC
Possibly fixed in bug #495073.
Comment 14 Philip Van Hoof 2009-01-06 22:35:16 UTC
idd