"index record past end of file": is this a bug in pop3d?

S. Barnes barnes at uni-koeln.de
Tue Sep 18 05:16:51 EDT 2012


Hello,


After upgrading to Cyrus 2.4, we are seeing a lot of errors like this:
"IOERROR: index record 11009 for user.X past end of file"
This only happens with POP users. So far nobody has complained about 
POP3 not working, so I assume it is not a grave error.

I took a look into the source yesterday:

 From what I see, the error message comes from 
mailbox_read_index_record() in imap/mailbox.c
This presumably reads data from the cyrus.index file.

In pop3d.c we operate on popd_msg an array, that gets filled from 
position 1 to popd_mailbox->i.num_records in openinbox().

There are two loops going through all the messages, that use 
mailbox_read_index_record().

There is one in update_seen():
for (i = 0; i < popd_exists; i++) {
	...
	if (mailbox_read_index_record(popd_mailbox, popd_msg[i].recno, &record))


And one in expunge_deleted():
for (msgno = 1; msgno <= popd_exists; msgno++) {
	...
	r = mailbox_read_index_record(popd_mailbox, popd_msg[msgno].recno, 
&record);


Unless I am missing something, one of them is counting the wrong way. I 
would think update_seen() is the problem. Am I right?


Regards
Susan


More information about the Cyrus-devel mailing list