On Tue, 2009-03-03 at 15:42 -0500, Alan Ferrency wrote:
> On Tue, 3 Mar 2009, Timo Sirainen wrote:
> 
> > On Tue, 2009-03-03 at 15:35 -0500, Alan Ferrency wrote:
> > > I have a core dump available for deliver; here's a backtrace:
> >
> > Could you also do:
> >
> > > #6  0x080bb8a1 in i_stream_read (stream=0x8102e28) at istream.c:93
> >
> > fr 6
> > p *stream
> > p *stream.real_stream
> > p *stream.real_stream.parent
> > p *stream.real_stream.parent.real_stream
> 
> Sure.

There's some bug here, but I'm not really sure where exactly the bug is.
Could you apply the attached patch, remove -O2 from CFLAGS in
src/lib-storage/index/mbox/Makefile, install and see if the assert moves
to the istream-raw-mbox.c. If it does, again do:

fr 6
p ret
p pos
p new_pos
p *rstream
p *stream.parent
p *stream.parent.real_stream

diff -r ae1d3f97d703 src/lib-storage/index/mbox/istream-raw-mbox.c
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c	Mon Mar 02 17:54:01 2009 -0500
+++ b/src/lib-storage/index/mbox/istream-raw-mbox.c	Tue Mar 03 15:49:09 2009 -0500
@@ -181,6 +181,7 @@
 		if (ret == -2) {
 			if (stream->istream.v_offset + pos ==
 			    rstream->input_peak_offset) {
+				i_assert(stream->skip != stream->pos);
 				stream->buffer = buf;
 				return -2;
 			}
@@ -330,6 +331,7 @@
 		if (stream->istream.eof || ret > 0)
 			return i_stream_raw_mbox_read(stream);
 		i_assert(new_pos > 0);
+		i_assert(stream->skip != stream->pos);
 		ret = -2;
 	} else {
 		i_assert(new_pos > stream->pos);

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to