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 501914 - assert failure on startup: "pch == part_mid_buf + part_mid_buf_len'"
assert failure on startup: "pch == part_mid_buf + part_mid_buf_len'"
Status: RESOLVED DUPLICATE of bug 535413
Product: Pan
Classification: Other
Component: general
0.13.2
Other Linux
: Normal blocker
: ---
Assigned To: Charles Kerr
Pan QA Team
: 468102 479654 482423 492911 494254 499811 504359 540443 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-12-05 22:34 UTC by DMCorsa
Modified: 2008-07-04 16:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Crash report (59.89 KB, text/plain)
2008-01-12 04:17 UTC, Alan Olsen
Details
An example NZB which trips assertion. (371.73 KB, text/plain)
2008-04-30 15:16 UTC, Roger C. Pao
Details

Description DMCorsa 2007-12-05 22:34:22 UTC
Running openSuse 10.3.  Get the following message when trying to execute from console mode.

pan: parts.cc:244: void pan::Parts::set_parts(const pan::PartBatch&): Assertion `pch == part_mid_buf + part_mid_buf_len' failed.
Aborted

Any help would be appreciated.
Comment 1 Alan Olsen 2008-01-01 20:26:29 UTC
According to reports I have seen on the net, they are caused by a group of posts where the first segment does not start with "1".

The last post on http://ubuntuforums.org/archive/index.php/t-441073.html

from chkno
November 11th, 2007, 05:06 PM
When I got this error, I found this in my ~/.pan2/tasks.nzb:
<file ...>
...
<segments>
<segment ... number="3">...</segment>
<segment ... number="4">...</segment>
<segment ... number="5">...</segment>
<segment ... number="6">...</segment>
<segment ... number="7">...</segment>
</segments>
</file>

That is, this one <file> entry did not have a segment numbered 1 or 2. I removed this one <file> node from tasks.nzb (with vim) and pan was then able to start normally.

Here is the error and a backtrace.  (Using FC8.)

pan: parts.cc:244: void pan::Parts::set_parts(const pan::PartBatch&): Assertion `pch == part_mid_buf + part_mid_buf_len' failed.

Program received signal SIGABRT, Aborted.

Thread 46912496423408 (LWP 4440)

  • #0 raise
    from /lib64/libc.so.6
  • #1 abort
    from /lib64/libc.so.6
  • #2 __assert_fail
    from /lib64/libc.so.6
  • #3 pan::Parts::set_parts
    at parts.cc line 244
  • #4 end_element
    at ../../pan/data/article.h line 50
  • #5 g_markup_parse_context_parse
    from /lib64/libglib-2.0.so.0
  • #6 pan::NZB::tasks_from_nzb_string
    at nzb.cc line 172
  • #7 pan::DataImpl::load_tasks
    at task-archive.cc line 56
  • #8 Queue
    at queue.cc line 50
  • #9 main
    at pan.cc line 282

Comment 2 Alan Olsen 2008-01-12 04:17:56 UTC
Created attachment 102641 [details]
Crash report

This is a crash report from trying to reload the tasks.nzb.
Comment 3 Charles Kerr 2008-01-28 14:15:52 UTC
*** Bug 504359 has been marked as a duplicate of this bug. ***
Comment 4 Charles Kerr 2008-01-28 16:12:00 UTC
*** Bug 499811 has been marked as a duplicate of this bug. ***
Comment 5 Charles Kerr 2008-01-28 16:13:46 UTC
*** Bug 494254 has been marked as a duplicate of this bug. ***
Comment 6 Charles Kerr 2008-01-28 16:15:49 UTC
*** Bug 482423 has been marked as a duplicate of this bug. ***
Comment 7 Charles Kerr 2008-01-28 16:16:17 UTC
*** Bug 492911 has been marked as a duplicate of this bug. ***
Comment 8 Charles Kerr 2008-01-28 16:17:57 UTC
in Bug 482423 Henry Pfeil had this comment:



This results from a corrupt tasks.nzb when parts.cc can't find all of the parts
of an attachment. When I encountered this behavior, I found the following
sequence of numbers at the end of a <file><segments> section:
<file...
 <segments>...
  <segment...number="122">...</segment>
  <segment...number="124">...</segment>
  <segment...number="124">...</segment>
 </segments>
</file>
Notice that the last two segments have identical sequence numbers. When I
changed the first "124" to "123" pan started up as advertised. However, the
article is supposed to have over 200 parts, according to the <file> tag, so I
imagine the discrepancy was introduced by the server, perhaps by downloading
the headers while the article was still in the process of being propagated?
Maybe a consistency check during startup would generate a somewhat-less obtuse
error message, perhaps toss out the entire <file></file> then suggest the user
get new headers and re-queue the article? Should it be up to pan to reload the
headers for the file and fix the queue behind the scenes? A more elegant
solution might check for such errors while the header is being downloaded, but
that could affect performance.
Comment 9 Charles Kerr 2008-01-28 16:31:12 UTC
*** Bug 479654 has been marked as a duplicate of this bug. ***
Comment 10 Charles Kerr 2008-01-28 16:31:53 UTC
Bug 479654 includes an nzb attachment that can be used to trigger the crash.
Comment 11 Charles Kerr 2008-01-28 16:33:52 UTC
*** Bug 468102 has been marked as a duplicate of this bug. ***
Comment 12 Roger C. Pao 2008-04-30 15:16:34 UTC
Created attachment 110166 [details]
An example NZB which trips assertion.

rcpao@bun:~/Desktop$ pan --debug --nzb horton-hears-a-who.nfo-horton-hears-a-who.nzb 
(article-cache.cc:175:ArticleCache) loaded 63 articles into cache from /home/rcpao/.pan2/article-cache
pan: parts.cc:244: void pan::Parts::set_parts(const pan::PartBatch&): Assertion `pch == part_mid_buf + part_mid_buf_len' failed.
Aborted
rcpao@bun:~/Desktop$ 

I'm using pan 0.132.  Let me know if you need a backtrace.
Comment 13 Mace Moneta 2008-06-05 03:24:54 UTC
I just ran into this today.  I wasn't able to see any missing or replicated segment numbers in the nzb (but it was a large file, I may have missed it).  The nzb did load and process in another nzb handling program (the old standby, nzbperl.pl) without error.
Comment 14 Charles Kerr 2008-07-04 16:11:48 UTC
This appears to be the same bug RH's heap overflow ticket -- at least, after a quick test on my end I'm not able to trigger the crash anymore.  Marking as a duplicate, but feel free to re-open if I'm mistaken.

*** This bug has been marked as a duplicate of 535413 ***
Comment 15 Charles Kerr 2008-07-04 16:14:33 UTC
*** Bug 540443 has been marked as a duplicate of this bug. ***