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 357735 - crash when updating headers and selecting a range of messages to Save As...
crash when updating headers and selecting a range of messages to Save As...
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other All
: Normal critical
: ---
Assigned To: Charles Kerr
Pan QA Team
: 353622 357737 357911 358661 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-09-26 03:14 UTC by David Kelly
Modified: 2006-10-07 14:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0.115 patch (1.37 KB, patch)
2006-10-06 16:54 UTC, Charles Kerr
none Details | Review

Description David Kelly 2006-09-26 03:14:12 UTC
Steps to reproduce:
1. Started with an "Update headers in all subscribed groups"
2. Deleted a few messages while the update was running as this used to crash for me. See 356206.
3. Selecting a range and delete did not crash, so I selected another range and right-clicked to download. Download dialog box was drawn but application was core dumping.


Stack trace:
(gdb) thread apply all bt

Thread 3 (LWP 100121)

  • #0 pthread_testcancel
    from /usr/lib/libpthread.so.2
  • #1 pthread_mutexattr_init
    from /usr/lib/libpthread.so.2
  • #2 ??

Thread 2 (Thread 0x8293000 (runnable))

  • #0 pan::DataImpl::xover_add
    at quark.h line 156
  • #1 pan::TaskXOver::on_nntp_line
    at string-view.h line 147
  • #2 pan::NNTP::on_socket_response
    at nntp.cc line 143
  • #3 pan::GIOChannelSocket::do_read
    at string-view.h line 149
  • #4 pan::GIOChannelSocket::gio_func
    at socket-impl-gio.cc line 480
  • #5 g_vasprintf
    from /usr/local/lib/libglib-2.0.so.0
  • #6 g_main_context_dispatch
    from /usr/local/lib/libglib-2.0.so.0
  • #7 g_main_context_acquire
    from /usr/local/lib/libglib-2.0.so.0
  • #8 g_main_loop_run
    from /usr/local/lib/libglib-2.0.so.0
  • #9 gtk_main
    from /usr/X11R6/lib/libgtk-x11-2.0.so.0
  • #10 (anonymous namespace)::run_pan_in_window
    at pan.cc line 141
  • #11 main
    at pan.cc line 282

Thread 1 (Thread 0x9120c00 (LWP 100072))

  • #0 pthread_testcancel
    from /usr/lib/libpthread.so.2
  • #1 pthread_mutexattr_init
    from /usr/lib/libpthread.so.2
  • #2 ??
  • #0 pthread_testcancel
    from /usr/lib/libpthread.so.2


Other information:
% uname -a
FreeBSD Grumpy.DynDNS.org 6.1-STABLE FreeBSD 6.1-STABLE #3: Wed Sep  6 16:30:46 CDT 2006     dkelly@Grumpy.DynDNS.org:/usr5/obj/usr/src/sys/OPUS  i386
Comment 1 Christophe Lambin 2006-09-26 19:27:08 UTC
*** Bug 357737 has been marked as a duplicate of this bug. ***
Comment 2 Christophe Lambin 2006-09-27 05:42:57 UTC
*** Bug 357911 has been marked as a duplicate of this bug. ***
Comment 3 Charles Kerr 2006-09-27 05:55:20 UTC
A lot of people seem to be hitting this bug. :)
Comment 4 Charles Kerr 2006-09-30 02:26:19 UTC
I strongly suspect this is a side-effect of the corrupted
data files where duplicates were allowed in 0.111-0.112.

Could you "rm $HOME/.pan2/groups/*" and see if that
makes the errors go away?
Comment 5 David Kelly 2006-10-01 01:22:53 UTC
(In reply to comment #4)
> I strongly suspect this is a side-effect of the corrupted
> data files where duplicates were allowed in 0.111-0.112.
> 
> Could you "rm $HOME/.pan2/groups/*" and see if that
> makes the errors go away?

I did have duplicates in my header listings. Have since deleted all of ~/.pan2/, upgraded to 0.115, and crashed similarly again in bug 358661.
Comment 6 Charles Kerr 2006-10-01 04:22:54 UTC
Thanks for testing that.  Well, that's one theory down. :|
Comment 7 Charles Kerr 2006-10-01 04:23:25 UTC
*** Bug 358661 has been marked as a duplicate of this bug. ***
Comment 8 will 2006-10-02 02:56:10 UTC
i think i'm getting a duplicate of this bug.
1. mark all headers as read in a group, except for some incompletes.
2. Select download new headers.
3. download headers task is added to bottom of task list. 
4. I select that task, and click the top button.
5. At the end of the update to the headers. pan aborts.


i did start pan from a terminal and save the text.


 /# /usr/local/bin/pan
pan: task-pane.cc:159: virtual void pan::TaskPane::on_queue_task_removed(pan::Queue&, pan::Task&, int): Assertion `list_index == index' failed.
Aborted
Comment 9 will 2006-10-02 03:20:48 UTC
The way i have been getting around the abort in comment #8 is to make sure that all articles including incompletes are marked as read.  then the group shows no unreads, and the new header download completes successfully.
Comment 10 Christophe Lambin 2006-10-04 21:01:11 UTC
*** Bug 353622 has been marked as a duplicate of this bug. ***
Comment 11 Charles Kerr 2006-10-06 16:54:19 UTC
Created attachment 74157 [details] [review]
0.115 patch

Aaaaaaaah, I see the problem now.  This patch should fix it.

Also has a small Quark tweak I noticed while testing this...
the patch avoids creating temporary StringViews when
testing a Quark and StringView for equality.
Comment 12 Charles Kerr 2006-10-06 16:59:45 UTC
Could someone test & confirm this fix?
Comment 13 Christophe GISQUET 2006-10-06 19:14:47 UTC
I don't observe the crash anymore, but I am not sure that my context, deleting a post for which headers are still being retrieved, is sufficient to trigger it.
Comment 14 Charles Kerr 2006-10-06 21:04:30 UTC
Chris: that's the _exact_ trigger for this bug -- deleting articles
during an xover.  That's what all the backtraces are caused by.
The lookup table calls find_article() on the Message-Id that xover
has cached, and then dereferences the Article pointer without
first checking to make sure it's non-null.

whansard: the bug in comment #8 is a valid & separate issue though.
Could you open a new bugzilla for it?
Comment 15 will 2006-10-06 22:40:42 UTC
whansard: the bug in comment #8 is a valid & separate issue though.
Could you open a new bugzilla for it?

yes i can.  (and i had just finished compiling pan with this patch and was about to test it. I think i will anyway.)
Comment 16 Christophe GISQUET 2006-10-07 14:25:50 UTC
OK, it's just that it was not obvious that the conditions avoided by all other additional checks were not the culprit. And that I'm not used to technical usenet terminology such as "xover" (in spite of the file and function names) :-)