[Dovecot] Still corrupt indexes in 1A4
Hello All!
Well I still have users which almost daily get corrupt dovecot files in their IMAP folders (Maildir style) and are unable to read their mail in this particular folders. When I delete dovecot files in this folder (rm -rf dove*) user can again read all messages.
This is regular Linux CentOS 4.2 with SAN storage (boot from SAN) as disks. So this is EXT3 on LVM.
BUT it is VERY interesting that than happens only to two users which are connected to the server via slow links (reading via Thunderbird or Squirrelmail). It never happened (now for weeks) to other 10 users which use it localy or at home (on speedy links).
It's very hard for me to exactly pinpoint the problem, since it never happens to me.
But when it happened to one user again I asked him to send me screenshoot of it. I could see there that SquirrelMail said:
"Warning: fgets() [function fgets]: SSL: fatal protocol error in /usr/share/squirrelmail/functions/imap_general.php on line 93."
Examining this file this line is in function:
--------SQUIRRELMAIL PHP SOURCE------------ /**
- Custom fgets function: gets a line from the IMAP server,
- no matter how big it may be.
- @param stream imap_stream the stream to read from
- @return string a line */ function sqimap_fgets($imap_stream) { $read = ''; $buffer = 4096; $results = ''; $offset = 0; while (strpos($results, "\r\n", $offset) === false) { if (!($read = fgets($imap_stream, $buffer))) {<- THIS IS LINE 93 /* this happens in case of an error */ /* reset $results because it's useless */ $results = false; break; } if ( $results != '' ) { $offset = strlen($results) - 1; } $results .= $read; } return $results; } }
Looks like dovecot drops connection or something. Well must be related to corrupt dovecot files in particular folder, since deleting them solves the problem.
BR, Alen Salamun
Alen Salamun wrote:
But when it happened to one user again I asked him to send me screenshoot of it. I could see there that SquirrelMail said:
"Warning: fgets() [function fgets]: SSL: fatal protocol error in /usr/share/squirrelmail/functions/imap_general.php on line 93."
Just a comment: I've had one user who's experienced the same thing. Using SquirrelMail he got the error:
Warning: fgets(): SSL: fatal protocol error in /usr/share/squirrelmail/functions/imap_general.php on line 93 ERROR: ERROR : Connection dropped by imap-server. Query: SELECT "INBOX"
mbox format on this inbox. This was using Dovecot 1.0 alpha4. A few hours ago I upgraded to version built from CVS on 2005-10-31, but if I hear about this problem again from any of my users I'll let you know.
- Anders
--
Anders Lund Anders.Lund@uninett.no .~.
UNINETT, N-7465 Trondheim, Norway / V
Phone: +47 73 55 79 08 | Fax: +47 73 55 79 01 /( )
^ ^
Hi All!
I have done some more debugging now on actual problem. If I login as affected user and try to acces affected IMAP folder I get this in logs:
Nov 2 13:14:35 golem dovecot: imap(marko): Effective uid=543, gid=545 Nov 2 13:14:35 golem dovecot: imap(marko): maildir: data=/home/marko/Maildir Nov 2 13:14:35 golem dovecot: imap(marko): maildir: root=/home/marko/Maildir, index=/home/marko/Maildir, control=, inbox= Nov 2 13:14:35 golem dovecot: imap(marko): pool_system_malloc(): Out of memory Nov 2 13:14:35 golem dovecot: child 26172 (imap) returned error 83 (Out of memory)
What is interesting is, that this imap child is frozen. If I try to access other folder it won't work anymore. If I kill this process everything works again in same session.
As mentioned before only thing that works is deleting dovecot-uidlist in affected folder!
BR, Alen
Alen Salamun wrote:
Hello All!
Well I still have users which almost daily get corrupt dovecot files in their IMAP folders (Maildir style) and are unable to read their mail in this particular folders. When I delete dovecot files in this folder (rm -rf dove*) user can again read all messages.
This is regular Linux CentOS 4.2 with SAN storage (boot from SAN) as disks. So this is EXT3 on LVM.
BUT it is VERY interesting that than happens only to two users which are connected to the server via slow links (reading via Thunderbird or Squirrelmail). It never happened (now for weeks) to other 10 users which use it localy or at home (on speedy links).
It's very hard for me to exactly pinpoint the problem, since it never happens to me.
But when it happened to one user again I asked him to send me screenshoot of it. I could see there that SquirrelMail said:
"Warning: fgets() [function fgets]: SSL: fatal protocol error in /usr/share/squirrelmail/functions/imap_general.php on line 93."
Examining this file this line is in function:
--------SQUIRRELMAIL PHP SOURCE------------ /**
- Custom fgets function: gets a line from the IMAP server,
- no matter how big it may be.
- @param stream imap_stream the stream to read from
- @return string a line */ function sqimap_fgets($imap_stream) { $read = ''; $buffer = 4096; $results = ''; $offset = 0; while (strpos($results, "\r\n", $offset) === false) { if (!($read = fgets($imap_stream, $buffer))) {<- THIS IS LINE 93 /* this happens in case of an error */ /* reset $results because it's useless */ $results = false; break; } if ( $results != '' ) { $offset = strlen($results) - 1; } $results .= $read; } return $results; } }
Looks like dovecot drops connection or something. Well must be related to corrupt dovecot files in particular folder, since deleting them solves the problem.
BR, Alen Salamun
Not to forget this happens on x86_64 Linux kernel! So as I see this really only happens on 64 bit systems (as one user noticed before)?
Br, Alen
Alen Salamun wrote:
Hello All!
Well I still have users which almost daily get corrupt dovecot files in their IMAP folders (Maildir style) and are unable to read their mail in this particular folders. When I delete dovecot files in this folder (rm -rf dove*) user can again read all messages.
This is regular Linux CentOS 4.2 with SAN storage (boot from SAN) as disks. So this is EXT3 on LVM.
BUT it is VERY interesting that than happens only to two users which are connected to the server via slow links (reading via Thunderbird or Squirrelmail). It never happened (now for weeks) to other 10 users which use it localy or at home (on speedy links).
It's very hard for me to exactly pinpoint the problem, since it never happens to me.
But when it happened to one user again I asked him to send me screenshoot of it. I could see there that SquirrelMail said:
"Warning: fgets() [function fgets]: SSL: fatal protocol error in /usr/share/squirrelmail/functions/imap_general.php on line 93."
Examining this file this line is in function:
--------SQUIRRELMAIL PHP SOURCE------------ /**
- Custom fgets function: gets a line from the IMAP server,
- no matter how big it may be.
- @param stream imap_stream the stream to read from
- @return string a line */ function sqimap_fgets($imap_stream) { $read = ''; $buffer = 4096; $results = ''; $offset = 0; while (strpos($results, "\r\n", $offset) === false) { if (!($read = fgets($imap_stream, $buffer))) {<- THIS IS LINE 93 /* this happens in case of an error */ /* reset $results because it's useless */ $results = false; break; } if ( $results != '' ) { $offset = strlen($results) - 1; } $results .= $read; } return $results; } }
Looks like dovecot drops connection or something. Well must be related to corrupt dovecot files in particular folder, since deleting them solves the problem.
BR, Alen Salamun
participants (2)
-
Alen Salamun
-
Anders Lund