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 371405 - Crashes when removing rows from header pane
Crashes when removing rows from header pane
Status: RESOLVED INCOMPLETE
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other Linux
: Normal major
: ---
Assigned To: Charles Kerr
Pan QA Team
: 373184 401398 402678 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-11-06 07:23 UTC by Søren Boll Overgaard
Modified: 2011-01-07 04:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test patch #1 (1.15 KB, patch)
2007-01-28 17:59 UTC, Charles Kerr
committed Details | Review
Fix referencing condition when switching groups (872 bytes, patch)
2007-01-31 14:14 UTC, Charles Kerr
committed Details | Review
sterner assertions and tests in pan-tree (9.96 KB, patch)
2007-02-01 21:00 UTC, Charles Kerr
none Details | Review
even harsher assertions (11.03 KB, patch)
2007-02-01 21:21 UTC, Charles Kerr
none Details | Review
Valgrind log of running Pan for some time. No crash. (239.81 KB, application/x-bzip2)
2007-02-08 20:43 UTC, Bruno Barberi Gnecco
  Details
My config.log for 0.123 (34.06 KB, text/x-log)
2007-02-08 23:44 UTC, Bruno Barberi Gnecco
  Details
Valgrind log for segmentation fault (298.78 KB, application/x-bzip2)
2007-02-09 22:19 UTC, Bruno Barberi Gnecco
  Details
test version of pan-tree.cc (35.16 KB, patch)
2007-02-10 05:57 UTC, Charles Kerr
none Details | Review

Description Søren Boll Overgaard 2006-11-06 07:23:09 UTC
Hi,

A Debian user has reported the following at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=397273 :

----8<----

I am a relatively new pan user, and have been using it since around version
0.113.  I have been experiencing crashes when I try to delete a post for
quite some time, but it's not very reliably reproducible, i.e., some
other activities are needed before the deletion to trigger the crash.

Now I've finally decided to use a script to run pan so that I can catch
the debug runlog and core dump, and submit a useful bug report.
Attached is the backtrace generated by "thread apply all backtrace" and
the final 500 lines of the runlog.  I still keep the core dump and the
whole ~1MB runlog, so if more information is needed (such as a backtrace
with -dbg packages installed), please ask.

----8<----

A backtrace is available at the URL mentioned above.
Comment 1 Charles Kerr 2006-11-09 23:36:10 UTC
*** Bug 373184 has been marked as a duplicate of this bug. ***
Comment 2 Charles Kerr 2006-11-09 23:36:36 UTC
373184 has an interesting backtrace:

  • #0 gtk_tree_view_set_model
    from /usr/lib/libgtk-x11-2.0.so.0
  • #1 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #2 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #3 g_signal_has_handler_pending
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #6 gtk_tree_model_row_deleted
    from /usr/lib/libgtk-x11-2.0.so.0
  • #7 PanTreeStore::remove_siblings
  • #8 PanTreeStore::remove
  • #9 pan::HeaderPane::on_tree_change
  • #10 pan::DataImpl::MyTree::remove_articles
  • #11 pan::DataImpl::MyTree::apply_filter
  • #12 pan::DataImpl::MyTree::set_filter
  • #13 pan::HeaderPane::filter

Comment 3 Charles Kerr 2006-11-09 23:46:52 UTC
And from the original Debian report:

  • #0 _gtk_tree_view_find_node
    from /usr/lib/libgtk-x11-2.0.so.0
  • #1 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #2 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #3 g_signal_chain_from_overridden
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #6 gtk_tree_model_row_deleted
    from /usr/lib/libgtk-x11-2.0.so.0
  • #7 PanTreeStore::remove_siblings
  • #8 PanTreeStore::remove
  • #9 pan::HeaderPane::on_tree_change
  • #10 pan::DataImpl::MyTree::remove_articles
  • #11 pan::DataImpl::on_articles_removed
  • #12 pan::DataImpl::delete_articles
  • #13 pan::GUI::do_delete_article

Comment 4 Søren Boll Overgaard 2006-11-20 11:25:11 UTC
An updated backtrace for 0.119 was submitted at http://bugs.debian.org/cgi-bin/bugreport.cgi/backtrace?bug=397273;msg=17;att=1 
The associated run log is available at http://bugs.debian.org/cgi-bin/bugreport.cgi/runlog.gz?bug=397273;msg=17;att=2

I include the backtrace here for convenience:

Thread 1 (process 2981)

  • #0 _gtk_tree_view_find_node
    from /usr/lib/libgtk-x11-2.0.so.0
  • #1 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #2 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #3 g_signal_chain_from_overridden
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #6 gtk_tree_model_row_deleted
    from /usr/lib/libgtk-x11-2.0.so.0
  • #7 PanTreeStore::remove_siblings
  • #8 PanTreeStore::remove
  • #9 pan::HeaderPane::on_tree_change
  • #10 pan::DataImpl::MyTree::remove_articles
  • #11 pan::DataImpl::on_articles_removed
  • #12 pan::DataImpl::delete_articles
  • #13 pan::GUI::do_delete_article
  • #14 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_signal_chain_from_overridden
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #19 _gtk_action_emit_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #20 gtk_action_new
    from /usr/lib/libgtk-x11-2.0.so.0
  • #21 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #22 g_signal_chain_from_overridden
    from /usr/lib/libgobject-2.0.so.0
  • #23 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #24 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #25 gtk_accel_group_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #26 gtk_accel_groups_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #27 gtk_window_activate_key
    from /usr/lib/libgtk-x11-2.0.so.0
  • #28 gtk_window_activate_key
    from /usr/lib/libgtk-x11-2.0.so.0
  • #29 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #30 g_value_set_boxed
    from /usr/lib/libgobject-2.0.so.0
  • #31 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #32 g_signal_chain_from_overridden
    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_get_default_style
    from /usr/lib/libgtk-x11-2.0.so.0
  • #36 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #37 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #38 _gdk_events_init
    from /usr/lib/libgdk-x11-2.0.so.0
  • #39 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #40 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #41 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #42 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #43 (anonymous namespace)::run_pan_in_window
  • #44 main

Comment 5 Charles Kerr 2007-01-24 20:07:06 UTC
I haven't been able to reproduce this for over a month,
though I don't know whether it was due to a change in
Pan or Gtk+.  Is this still happening for anyone?
Comment 6 Bruno Barberi Gnecco 2007-01-26 20:40:00 UTC
Yes, I still get segfaults when searching the groups for keywords (I'm using 0.121). The problem usually happens after two or three searches. I could try to get a backtrace, but I think it would be equal to the one I submitted before.
Comment 7 Charles Kerr 2007-01-27 06:25:40 UTC
Bruno, what version of gtk+ do you have installed?
Comment 8 Bruno Barberi Gnecco 2007-01-27 12:17:55 UTC
GTK+ version 2.8.20.
Comment 9 Charles Kerr 2007-01-28 17:39:17 UTC
Original bug reporter was/is also using 2.8.20.
Comment 10 Charles Kerr 2007-01-28 17:59:01 UTC
Created attachment 81380 [details] [review]
test patch #1

This is a test patch based on the theory that there are live GtkTreeIters to
some of the rows being deleted.  The patch frees the row's memory only after
the row_removed signals have been fired.

Since I'm not able to reproduce this bug, I'd appreciate feedback from testers
who give this patch a spin.

Also, if it's possible, exact instructions on how to trigger this crash
would be good too.
Comment 11 Charles Kerr 2007-01-28 18:00:14 UTC
Soren, could you forward the patch to the original reporter,
of ask him to cc himself to this ticket?
Comment 12 Søren Boll Overgaard 2007-01-28 18:40:27 UTC
Done.
Comment 13 Charles Kerr 2007-01-29 01:49:11 UTC
More questions for any and all comers: does it matter whether or not
you have rows selected when you apply the filter?  Can you make it
crash when no rows are selected?
Comment 14 Bruno Barberi Gnecco 2007-01-29 13:17:15 UTC
I'm running 0.121 with the patch above and still experienced the bugs. It doesn't matter whether there are rows selected. The method I use to reproduce is simple: perform a few searches, open another group, perform a few other searches, another group. It usually crashes after 10-15 searches. 

I'm compiling pan with -g right now, and I'll run it in gdb from now on. Anything else aside a backtrace that could help you to track this bug?
Comment 15 Charles Kerr 2007-01-29 14:52:44 UTC
Hm.  Installing the glib and gtk debuginfo RPMs would be helpful
so that the gtk+ part of the backtrace will also have -g info.
Comment 16 Charles Kerr 2007-01-29 14:56:23 UTC
Also if you have valgrind installed, running Pan inside of valgrind
can give very helpful information in cases of memory errors -- more
helpful than gdb.  It's kind of slow, and better if you compile pan
_without_ optimizations before running it:

 % export G_SLICE=always-malloc
 % export G_DEBUG=gc-friendly
 % export GLIBCXX_FORCE_NEW=1
 % valgrind --tool=memcheck --leak-check=full --leak-resolution=high \
            --num-callers=64 --log-file=pan-valgrind --show-reachable=yes ./pan
Comment 17 Bruno Barberi Gnecco 2007-01-30 14:20:51 UTC
Running pan with valgrind was *unbearably* slow. I'm attaching a new backtrace, hoping it will be useful. This happened after I clicked on another newsgroup and it started to download new headers, a different situation from my previous one. I wasn't watching pan, so I can't say at what point it happened.

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 4502)

  • #0 gtk_tree_view_set_model
    from /usr/lib/libgtk-x11-2.0.so.0
  • #1 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #2 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #3 g_signal_has_handler_pending
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #6 gtk_tree_model_row_deleted
    from /usr/lib/libgtk-x11-2.0.so.0
  • #7 PanTreeStore::remove_siblings
  • #8 PanTreeStore::remove
  • #9 PanTreeStore::reparent
  • #10 pan::HeaderPane::on_tree_change
  • #11 pan::Data::ArticleTree::fire_diffs
  • #12 pan::DataImpl::MyTree::add_articles
  • #13 pan::DataImpl::MyTree::apply_filter
  • #14 pan::DataImpl::MyTree::add_articles
  • #15 pan::DataImpl::on_articles_added
  • #16 pan::DataImpl::xover_add
  • #17 pan::TaskXOver::on_nntp_line
  • #18 pan::NNTP::on_socket_response
  • #19 pan::GIOChannelSocket::do_read
  • #20 pan::GIOChannelSocket::gio_func
  • #21 g_vasprintf
    from /usr/lib/libglib-2.0.so.0
  • #22 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #23 g_main_context_acquire
    from /usr/lib/libglib-2.0.so.0
  • #24 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #25 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #26 (anonymous namespace)::run_pan_in_window
  • #27 main
  • #0 pthread_cond_wait
    from /lib/tls/libpthread.so.0
  • #1 g_async_queue_push_sorted
    from /usr/lib/libglib-2.0.so.0
  • #2 g_thread_pool_free
    from /usr/lib/libglib-2.0.so.0
  • #3 g_static_private_free
    from /usr/lib/libglib-2.0.so.0
  • #4 start_thread
    from /lib/tls/libpthread.so.0
  • #5 clone
    from /lib/tls/libc.so.6
  • #0 pthread_cond_wait
    from /lib/tls/libpthread.so.0
  • #1 g_async_queue_push_sorted
    from /usr/lib/libglib-2.0.so.0
  • #2 g_thread_pool_free
    from /usr/lib/libglib-2.0.so.0
  • #3 g_static_private_free
    from /usr/lib/libglib-2.0.so.0
  • #4 start_thread
    from /lib/tls/libpthread.so.0
  • #5 clone
    from /lib/tls/libc.so.6
  • #0 pthread_cond_wait
    from /lib/tls/libpthread.so.0
  • #1 g_async_queue_push_sorted
    from /usr/lib/libglib-2.0.so.0
  • #2 g_thread_pool_free
    from /usr/lib/libglib-2.0.so.0
  • #3 g_static_private_free
    from /usr/lib/libglib-2.0.so.0
  • #4 start_thread
    from /lib/tls/libpthread.so.0
  • #5 clone
    from /lib/tls/libc.so.6
  • #0 pthread_cond_wait
    from /lib/tls/libpthread.so.0
  • #1 g_async_queue_push_sorted
    from /usr/lib/libglib-2.0.so.0
  • #2 g_thread_pool_free
    from /usr/lib/libglib-2.0.so.0
  • #3 g_static_private_free
    from /usr/lib/libglib-2.0.so.0
  • #4 start_thread
    from /lib/tls/libpthread.so.0
  • #5 clone
    from /lib/tls/libc.so.6
              
Could this be linked to the number of simultaneous connections to the news server, leading to some sort of race condition?
Comment 18 Charles Kerr 2007-01-30 14:47:40 UTC
This backs up the backtrace in comment #2...

No, it's not a race condition.  The only threads remaining in Pan
is a worker thread to make new server connections without blocking
the main thread.
Comment 19 Charles Kerr 2007-01-30 16:25:39 UTC
*** Bug 401398 has been marked as a duplicate of this bug. ***
Comment 20 Charles Kerr 2007-01-30 21:45:47 UTC
All: can you reproduce it without reading any articles,
without deleting any articles, and without fetching new
articles when you enter the group?
Comment 21 Charles Kerr 2007-01-31 02:37:21 UTC
Darren Albers reports on pan-users:

> I tried and no luck after ~30 searches between various groups.  
> 
> This is on my Feisty box which is running GTK 2.10.9
Comment 22 Charles Kerr 2007-01-31 02:38:56 UTC
*** Bug 402678 has been marked as a duplicate of this bug. ***
Comment 23 Charles Kerr 2007-01-31 02:42:08 UTC
    David Shochat reports on pan-users:

    > I just thought I'd mention that this all reminds me of the segfault
    > (involving gtk_tree) problem I had a while back:
    > http://bugzilla.gnome.org/show_bug.cgi?id=346588
    > Nobody could reproduce it. Meanwhile I was getting it consistently.
    > Then I discovered that the problem went away when I tried using a
    > fresh home directory. So I assume it was one of my dot files or
    > directories that was somehow corrupt. The reporter could just
    > create a new temporary account with a new home and try there.
    >
    > -- David 
Comment 24 Charles Kerr 2007-01-31 03:26:31 UTC
I've now tried hundreds of search strings on four separate computers
with varying architectures and Linux versions, and have yet to trigger
this bug even once.
Comment 25 Charles Kerr 2007-01-31 14:14:34 UTC
Created attachment 81592 [details] [review]
Fix referencing condition when switching groups

This may fix potential corruption issues that occur when changing groups.
Comment 26 Bruno Barberi Gnecco 2007-01-31 19:49:40 UTC
I've already tried deleting .pan2 once, but to no avail. The bug seems to be more likely to appear in groups with a large number of articles.
Comment 27 Charles Kerr 2007-01-31 21:06:37 UTC
Bruno, does the patch in Comment #25 help anything?
Comment 28 Bruno Barberi Gnecco 2007-02-01 19:30:58 UTC
No, even with the patch in Comment #25 it still crashed here. The backtrace is the same as the last one, so I won't duplicate it: again, I was downloading new headers for a group. I had not opened the group in this session before, so I hadn't made any searches in it. 

Do you guys have a PanTreeStore with printfs() that I could run for you? It could help you to catch the bug. 
Comment 29 Charles Kerr 2007-02-01 21:00:30 UTC
Created attachment 81701 [details] [review]
sterner assertions and tests in pan-tree

Here's another patch that may shed light on the problem.  This one checks
the integrity of the tree before and after every call that changes it.
This will make the tree run more slowly -- though still usable, not like
valgrind -- but should let us know if there is any memory corruption taking
place in pan-tree itself.
Comment 30 Charles Kerr 2007-02-01 21:21:53 UTC
Created attachment 81706 [details] [review]
even harsher assertions
Comment 31 paolo 2007-02-02 00:39:12 UTC
Hi
anybody can tell me how can have a bactrace for pan using Windows OS??
How can I help programmers?

thank

Comment 32 Bruno Barberi Gnecco 2007-02-02 22:43:36 UTC
I tested all day long with the assertions (and the two first patches) and couldn't reproduce the bug. I'll keep testing to see if I get something.
Comment 33 Charles Kerr 2007-02-03 00:39:25 UTC
The first two bugs do fix potential problems -- whether they fix this
particular bug ticket or not -- so I'm going to check them in. :)
Comment 34 Bruno Barberi Gnecco 2007-02-05 21:31:32 UTC
No, it's still there, and the asserts don't seem to have caught it:

(gdb) r
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1219508544 (LWP 23077)]
[New Thread -1226503248 (LWP 23078)]
[New Thread -1234891856 (LWP 23079)]
[New Thread -1243280464 (LWP 23080)]
[New Thread -1251669072 (LWP 23081)]


Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 23077)

  • #0 gtk_tree_view_set_model
    from /usr/lib/libgtk-x11-2.0.so.0
  • #1 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #2 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #3 g_signal_has_handler_pending
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #6 gtk_tree_model_row_deleted
    from /usr/lib/libgtk-x11-2.0.so.0
  • #7 PanTreeStore::remove_siblings
  • #8 PanTreeStore::remove
  • #9 PanTreeStore::reparent
  • #10 pan::HeaderPane::on_tree_change
  • #11 pan::Data::ArticleTree::fire_diffs
  • #12 pan::DataImpl::MyTree::add_articles
  • #13 pan::DataImpl::MyTree::apply_filter
  • #14 pan::DataImpl::MyTree::add_articles
  • #15 pan::DataImpl::on_articles_added
  • #16 pan::DataImpl::xover_add
  • #17 pan::TaskXOver::on_nntp_line
  • #18 pan::NNTP::on_socket_response
  • #19 pan::GIOChannelSocket::do_read
  • #20 pan::GIOChannelSocket::gio_func
  • #21 g_vasprintf
    from /usr/lib/libglib-2.0.so.0
  • #22 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #23 g_main_context_acquire
    from /usr/lib/libglib-2.0.so.0
  • #24 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #25 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #26 (anonymous namespace)::run_pan_in_window
  • #27 main

Comment 35 Charles Kerr 2007-02-06 15:33:58 UTC
Bruno, I can't figure out why gtk_tree_view_set_model is being called 
from PanTreeStore::remove_siblings.  It doesn't make sense, so I wonder
if the backtrace is corrupted.

The next easiest thing I can think of to try is for you to run 0.123
in valgrind, as described above, just long enough to make it crash
(I know valgrind makes things run slowly), and attach valgrind's log file.
Comment 36 Bruno Barberi Gnecco 2007-02-06 23:37:32 UTC
Running 0.123, backtrace, downloading new headers. I'm really sorry about the valgrind output, but it's *WAY* too slow to be usable. If I only could reproduce the bug consistently, I'd try it, but sometimes it takes more than an hour for pan to crash. 

I now noticed that the line numbers aren't showing up; I think make install was stripping the binary or something. Sorry, I'll get a backtrace from the non-stripped program.

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 11065)

  • #0 gtk_tree_view_set_model
    from /usr/lib/libgtk-x11-2.0.so.0
  • #1 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #2 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #3 g_signal_has_handler_pending
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #6 gtk_tree_model_row_deleted
    from /usr/lib/libgtk-x11-2.0.so.0
  • #7 PanTreeStore::remove_siblings
  • #8 PanTreeStore::remove
  • #9 PanTreeStore::reparent
  • #10 pan::HeaderPane::on_tree_change
  • #11 pan::Data::ArticleTree::fire_diffs
  • #12 pan::DataImpl::MyTree::add_articles
  • #13 pan::DataImpl::MyTree::apply_filter
  • #14 pan::DataImpl::MyTree::add_articles
  • #15 pan::DataImpl::on_articles_added
  • #16 pan::DataImpl::xover_add
  • #17 pan::TaskXOver::on_nntp_line
  • #18 pan::NNTP::on_socket_response
  • #19 pan::GIOChannelSocket::do_read
  • #20 pan::GIOChannelSocket::gio_func
  • #21 g_vasprintf
    from /usr/lib/libglib-2.0.so.0
  • #22 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #23 g_main_context_acquire
    from /usr/lib/libglib-2.0.so.0
  • #24 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #25 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #26 (anonymous namespace)::run_pan_in_window
  • #27 main
             
Comment 37 Charles Kerr 2007-02-07 02:23:55 UTC
Bruno I appreciate your help, but this is just the same backtrace
again and again.  So, my comments about moving to the next level
a la valgrind still stand.  Yes, I understand that it is slow.

What OS are you running, and what are you using to build Pan?
Does it also crash on the stock install?
Comment 38 Bruno Barberi Gnecco 2007-02-08 18:27:39 UTC
Okay, I'm trying valgrind, after having two crashes in ten minutes today. Unfortunately, in this first run I couldn't reproduce the bug. I have a long log, though, do you guys want it? Here's the summary:

==4070== LEAK SUMMARY:
==4070==    definitely lost: 50,756 bytes in 207 blocks.
==4070==    indirectly lost: 113,264 bytes in 5,584 blocks.
==4070==      possibly lost: 223,194 bytes in 412 blocks.
==4070==    still reachable: 2,174,065 bytes in 19,109 blocks.
==4070==         suppressed: 0 bytes in 0 blocks.

I'm running Linux 2.6.17.13, gcc 3.4.6, glibc 2.3.6, glib 2.10.3 and gtk 2.8.20, in a slackware system.

More news at six. Thanks for the patience and for pan.
Comment 39 Charles Kerr 2007-02-08 19:41:13 UTC
Yep!  just bzip the pan-valgrind file and attach it here.  Thanks Bruno!
Comment 40 Bruno Barberi Gnecco 2007-02-08 20:43:18 UTC
Created attachment 82183 [details]
Valgrind log of running Pan for some time. No crash.

There's *no* segfault in this log.
Comment 41 Charles Kerr 2007-02-08 21:46:05 UTC
Bruno, could you also please attach the config.log file generated when
you built Pan?  It should be in the top-level of the source directory.

Thanks again.
Comment 42 Bruno Barberi Gnecco 2007-02-08 23:44:19 UTC
Created attachment 82196 [details]
My config.log for 0.123
Comment 43 Bruno Barberi Gnecco 2007-02-09 22:19:43 UTC
Created attachment 82251 [details]
Valgrind log for segmentation fault

So, here's the beast you asked. The full log for a session that crashed with a segmentation fault. I ran it with "valgrind --tool=memcheck --num-callers=64 --log-file=pan-valgrind --show-reachable=yes --leak-check=full --leak-resolution=high pan". I hope you can find this bug at last and squash it with a pleasant *PLOSH* noise. Once again, it segfaulted while downloading headers for a group.
Comment 44 Charles Kerr 2007-02-10 01:55:51 UTC
Wow, this is a very helpful and interesting log file.  There are multiple
errors here, none of which I've ever seen.  I'm going to try to dig into 
this over the weekend.  If you happen to make any more attachments like
this please send 'em along. :)

Comment 45 Charles Kerr 2007-02-10 02:43:21 UTC
Just for cross-reference, bug #406284 has been opened as a result
of the valgrind log in comment #43.
Comment 46 Charles Kerr 2007-02-10 05:57:04 UTC
Created attachment 82263 [details] [review]
test version of pan-tree.cc

try this out on top of 0.123 and let me know. :)
Comment 47 Bruno Barberi Gnecco 2007-02-10 14:15:20 UTC
Nope, it still segfaulted. I'll try to get a backtrace for you.
Comment 48 Charles Kerr 2007-02-10 18:06:32 UTC
Damn! :)

I am running out of suggestions, but we now know a couple of things
we didn't know before: (1) valgrind indicates it's a null pointer dereference
(2) it seems to be happening directly inside a gtk+ signal handler for 
row-deleted, rather than in a function called by the signal handler, and
(3) the internal state of the Pan Tree doesn't seem to matter, because the
version in comment #46 is slower but tightens up the internal state before
each call to row-deleted.

This is the most frustrating bug I've had in a very long time. Let's see.
Now that we know these things, I think we can try out gdb again, so that
things will be faster, but I have two requests:

(2) install (most important) gtk2-2.8.20-debuginfo
    and (less important) glib-debuginfo-2.10.3.
    This will show us the exact line number of the crash in gtk's
    row-deleted handler.

(2) also helpful, don't don't do a `make install' on Pan because
    that strips the debugging info from Pan.  Just copy the file
    from pan-0.123/pan/gui/pan to /usr/bin (or wherever you keep it)
    by hand.

We're in the home strech... I hope...
Comment 49 Bruno Barberi Gnecco 2007-02-12 14:57:12 UTC
Backtrace below. I'm sorry, but I couldn't find a gtk-debug package for slackware and I don't really have time to recompile gtk, install, possibly mess some application and all that. Sorry. I hope this backtrace is enough somehow. Googling for "gtk_tree_view_set_model segmentation fault" returns a bunch of results, maybe some of them can help you to find the problem?

(gdb) thread apply all bt

Thread 1 (Thread -1219565888 (LWP 3563))

  • #0 gtk_tree_view_set_model
    from /usr/lib/libgtk-x11-2.0.so.0
  • #1 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #2 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #3 g_signal_has_handler_pending
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #6 gtk_tree_model_row_deleted
    from /usr/lib/libgtk-x11-2.0.so.0
  • #7 PanTreeStore::remove_siblings
    at pan-tree.cc line 1220
  • #8 PanTreeStore::remove
    at /usr/lib/gcc/i486-slackware-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_map.h line 152
  • #9 PanTreeStore::reparent
    at pan-tree.cc line 1117
  • #10 pan::HeaderPane::on_tree_change
    at header-pane.cc line 735
  • #11 pan::Data::ArticleTree::fire_diffs
    at /usr/lib/gcc/i486-slackware-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_tree.h line 264
  • #12 pan::DataImpl::MyTree::add_articles
    at my-tree.cc line 532
  • #13 pan::DataImpl::MyTree::apply_filter
    at my-tree.cc line 236
  • #14 pan::DataImpl::MyTree::add_articles
    at my-tree.cc line 351
  • #15 pan::DataImpl::on_articles_added
    at /usr/lib/gcc/i486-slackware-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_tree.h line 246
  • #16 pan::DataImpl::xover_add
    at xover.cc line 315
  • #17 pan::TaskXOver::on_nntp_line
    at ../../pan/general/string-view.h line 147
  • #18 pan::NNTP::on_socket_response
    at nntp.cc line 143
  • #19 pan::GIOChannelSocket::do_read
    at ../../pan/general/string-view.h line 149
  • #20 pan::GIOChannelSocket::gio_func
    at socket-impl-gio.cc line 501
  • #21 g_vasprintf
    from /usr/lib/libglib-2.0.so.0
  • #22 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #23 g_main_context_acquire
    from /usr/lib/libglib-2.0.so.0
  • #24 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #25 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #26 (anonymous namespace)::run_pan_in_window
    at pan.cc line 154
  • #27 main
    at pan.cc line 294

Comment 50 Darren Albers 2007-03-23 13:34:11 UTC
Just a note for Charles (Who is probably reading the bugs anyway ;) ) there is a discussion on bug 420618 about a crash that has some resemblance to the crash bug described here.
Comment 51 devchan1 2007-03-23 18:26:01 UTC
As Charles requested from bug #420618

(gdb) thread apply all bt

Thread 5 (process 9160 thread 0x2903)

  • #0 _semaphore_wait_signal_trap
    at /System/Library/Frameworks/System.framework/PrivateHeaders/mach/syscall_sw.h line 83
  • #1 semaphore_wait_signal
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/mach/semaphore.c line 69
  • #2 _pthread_cond_wait
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/pthreads/pthread_cond.c line 417
  • #3 pthread_cond_wait
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/pthreads/pthread_cond.c line 557
  • #4 g_async_queue_pop_intern_unlocked
    at gasyncqueue.c line 334
  • #5 g_thread_pool_thread_proxy
    at gthreadpool.c line 198
  • #6 g_thread_create_proxy
    at gthread.c line 591
  • #7 _pthread_body
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/pthreads/pthread.c line 642

Thread 4 (process 9160 thread 0x2803)

  • #0 _semaphore_wait_signal_trap
    at /System/Library/Frameworks/System.framework/PrivateHeaders/mach/syscall_sw.h line 83
  • #1 semaphore_wait_signal
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/mach/semaphore.c line 69
  • #2 _pthread_cond_wait
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/pthreads/pthread_cond.c line 417
  • #3 pthread_cond_wait
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/pthreads/pthread_cond.c line 557
  • #4 g_async_queue_pop_intern_unlocked
    at gasyncqueue.c line 334
  • #5 g_thread_pool_thread_proxy
    at gthreadpool.c line 198
  • #6 g_thread_create_proxy
    at gthread.c line 591
  • #7 _pthread_body
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/pthreads/pthread.c line 642

Thread 3 (process 9160 thread 0x1903)

  • #0 _semaphore_wait_signal_trap
    at /System/Library/Frameworks/System.framework/PrivateHeaders/mach/syscall_sw.h line 83
  • #1 semaphore_wait_signal
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/mach/semaphore.c line 69
  • #2 _pthread_cond_wait
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/pthreads/pthread_cond.c line 417
  • #3 pthread_cond_wait
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/pthreads/pthread_cond.c line 557
  • #4 g_async_queue_pop_intern_unlocked
    at gasyncqueue.c line 334
  • #5 g_thread_pool_thread_proxy
    at gthreadpool.c line 198
  • #6 g_thread_create_proxy
    at gthread.c line 591
  • #7 _pthread_body
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/pthreads/pthread.c line 642

Thread 2 (process 9160 thread 0x1503)

  • #0 _semaphore_wait_signal_trap
    at /System/Library/Frameworks/System.framework/PrivateHeaders/mach/syscall_sw.h line 83
  • #1 semaphore_wait_signal
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/mach/semaphore.c line 69
  • #2 _pthread_cond_wait
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/pthreads/pthread_cond.c line 417
  • #3 pthread_cond_wait
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/pthreads/pthread_cond.c line 557
  • #4 g_async_queue_pop_intern_unlocked
    at gasyncqueue.c line 334
  • #5 g_thread_pool_thread_proxy
    at gthreadpool.c line 198
  • #6 g_thread_create_proxy
    at gthread.c line 591
  • #7 _pthread_body
    at /SourceCache/Libc_debug-391.5.16/Libc-391.5.16/pthreads/pthread.c line 642

Comment 52 devchan1 2007-03-23 20:27:34 UTC
FWIW,
pan2 crashes on my machine stopped after I deleted my .pan2 dir and restarted pan2.
Comment 53 Sinan Karasu 2007-03-30 19:27:16 UTC
Version 126
Very reproducible crash. Try to open alt.binaries.amp

Version 125 works fine.

------------------------------------------------------------------------------

GNU DDD 3.3.11 (x86_64-suse-linux), by Dorothea LUsing host libthread_db library "/lib64/libthread_db.so.1".
(gdb) set args
(gdb) run
[Thread debugging using libthread_db enabled]
[New Thread 47605559408048 (LWP 23528)]
[New Thread 1082132800 (LWP 23531)]
[New Thread 1090525504 (LWP 23532)]
[New Thread 1098918208 (LWP 23533)]
[New Thread 1107310912 (LWP 23534)]

** (pan:23528): CRITICAL **: static void PanTreeStore::sortable_set_sort_column_id(GtkTreeSortable*, gint, GtkSortType): assertion `tree->sort_info->count(sort_column_id) != 0' failed

Program received signal SIGSEGV, Segmentation fault.

Thread 47605559408048 (LWP 23528)

  • #0 ??
  • #1 std::__introsort_loop<__gnu_cxx::__normal_iterator<PanTreeStore::Row**, std::vector<PanTreeStore::Row*, std::allocator<PanTreeStore::Row*> > >, long, PanTreeStore::RowCompareByColumn>
    at pan-tree.cc line 855
  • #2 PanTreeStore::insert_sorted
    at /usr/include/c++/4.1.0/bits/stl_algo.h line 2749
  • #3 PanTreeStore::insert_sorted
    at pan-tree.cc line 827
  • #4 pan::HeaderPane::on_tree_change
    at header-pane.cc line 679
  • #5 pan::DataImpl::MyTree::add_articles
    at ../../pan/data/data.h line 447
  • #6 pan::DataImpl::MyTree::apply_filter
    at my-tree.cc line 236
  • #7 pan::DataImpl::MyTree::add_articles
    at my-tree.cc line 352
  • #8 pan::DataImpl::on_articles_added
    at headers.cc line 1123
  • #9 pan::DataImpl::xover_add
    at xover.cc line 326
  • #10 pan::TaskXOver::on_nntp_line
    at task-xover.cc line 307
  • #11 pan::NNTP::on_socket_response
    at nntp.cc line 143
  • #12 pan::GIOChannelSocket::do_read
    at socket-impl-gio.cc line 390
  • #13 pan::GIOChannelSocket::gio_func
    at socket-impl-gio.cc line 501
  • #14 g_main_context_dispatch
    from /opt/gnome/lib64/libglib-2.0.so.0
  • #15 g_main_context_check
    from /opt/gnome/lib64/libglib-2.0.so.0
  • #16 g_main_loop_run
    from /opt/gnome/lib64/libglib-2.0.so.0
  • #17 gtk_main
    from /opt/gnome/lib64/libgtk-x11-2.0.so.0
  • #18 (anonymous namespace)::run_pan_in_window
    at pan.cc line 155
  • #19 main
    at pan.cc line 297

Comment 54 Garrison Hoffman 2007-03-30 22:48:03 UTC
Ubuntu 6.10 (Edgy Eft) AMD64
Linux 2.6.17-11-generic x86_64 GNU/Linux

libaspell15         0.60.4-4
libatk1.0-0         1.12.3-0ubuntu1
libc6               2.4-1ubuntu12.3
libglib2.0-0        2.12.4-0ubuntu1
libgtk2.0-0         2.10.6-0ubuntu3.1
libgtkspell0        2.0.10-3
libpango1.0-0       1.14.5-0ubuntu1
libpcre3            6.4-2ubuntu1
libxml2             2.6.26.dfsg-2ubuntu4
zlib1g              1:1.2.3-13ubuntu2
libpango1.0-common  1.14.5-0ubuntu1
libgmime2.1         2.1.19-0ubuntu2
libgnome2-0         2.16.0-0ubuntu1

  • #0 ??
  • #1 std::__introsort_loop<__gnu_cxx::__normal_iterator<PanTreeStore::Row**, std::vector<PanTreeStore::Row*, std::allocator<PanTreeStore::Row*> > >, long, PanTreeStore::RowCompareByColumn>
  • #2 PanTreeStore::insert_sorted
  • #3 PanTreeStore::insert_sorted
  • #4 pan::HeaderPane::on_tree_change
  • #5 pan::DataImpl::MyTree::add_articles
  • #6 pan::DataImpl::MyTree::apply_filter
  • #7 pan::DataImpl::MyTree::add_articles
  • #8 pan::DataImpl::on_articles_added
  • #9 pan::DataImpl::xover_add
  • #10 pan::TaskXOver::on_nntp_line
  • #11 pan::NNTP::on_socket_response
  • #12 pan::GIOChannelSocket::do_read
  • #13 pan::GIOChannelSocket::gio_func
  • #14 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #15 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #16 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #17 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #18 (anonymous namespace)::run_pan_in_window
  • #19 main

Comment 55 Garrison Hoffman 2007-03-31 03:34:30 UTC
(In reply to comment #54)

Additional information:

   Pan < 0.125 worked fine.

   Deleting .pan2 didn't help me.
Comment 56 Charles Kerr 2007-04-07 03:45:30 UTC
I think I was wrong before in assuming these were the same bug.  I think that the insert_sorted() bug is separate, so I'm moving discussion of it to bug #425993 .  The good news is I think I've got it fixed.
Comment 57 Fabio Durán Verdugo 2010-11-25 03:17:38 UTC
This bug was reported against a version which is not supported any more. Developers are no longer working on this version so there will not be any bug fixes for it.
Can you please check again if the issue you reported here still happens in a recent version of GNOME and update this report by adding a comment and adjusting the 'Version' field?

Again thank you for reporting this and sorry that it could not be fixed for the version you originally used here.

Without feedback this report will be closed as INCOMPLETE after 6 weeks.