GNOME Bugzilla – Bug 482423
Pan wont start: Assertion failed in parts.cc
Last modified: 2008-01-28 16:15:49 UTC
Steps to reproduce: one day pan just stopped working... pavel@localhost ~ $ pan pan: parts.cc:244: void pan::Parts::set_parts(const pan::PartBatch&): Assertion `pch == part_mid_buf + part_mid_buf_len' failed. Aborted Stack trace: Other information:
Deleting the parts.nzb solved this problem. Could not find any xml errors in parts.nzb.
Created attachment 96925 [details] pan backtrace of tasks.nzb error
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.
Created attachment 98151 [details] Pan assertion backtrace. I do not use .nzb files. I select lots of headers and save their attachments to a directory. I had over 2000 tasks when I took pan offline and quit. When I restarted pan, I get this assertion which may be related. rcpao@bun:~$ pan --debug (article-cache.cc:175:ArticleCache) loaded 21 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 (core dumped)
I forgot to mention my version numbers. Pan 0.132 (compiled by me from source) is crashing under Ubuntu 7.10. Pan 0.129 (prebuilt binary) under Ubuntu 7.10 does not crash, and it is now continuing to save the 2951 attachments I have queued.
*** This bug has been marked as a duplicate of 501914 ***