Skip Menu |

This queue is for tickets about the Mail-IMAPClient CPAN distribution.

Report information
The Basics
Id: 42171
Status: resolved
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: Nobody in particular
Requestors: dan [...] rx.sharpr.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: intermittent migration function error
Date: Mon, 05 Jan 2009 20:23:24 -0800
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Dan <dan [...] rx.sharpr.net>
I'm having a problem Migrating mail, below is the info you request, please let me know if you need more. Perl v5.8.8 built for i386-linux-thread-multi Mail::IMAPClient 3.12 courier-imap 3.0.8-cos5.build83071218.19 CentoOS Linux example.com 2.6.9-023stab044.4-smp #1 SMP Thu May 24 17:20:37 MSD 2007 i686 i686 i386 GNU/Linux What are you doing? I am migrating a message from one IMAP mailbox to another. What happens? Most all migrations work fine with this script. only some fail, I think it might have to do with dashes in the email address, but I really dont know, I wonder if its some sort of badly formatted mail message. I hope you can identify without much effort. When the migrate line of code executes (below) these errors are displayed... and then the script hangs until I kill or ctrl-C. [Mon Jan 5 20:40:31 2009] userlist.pl: Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 790. [Mon Jan 5 20:40:31 2009] userlist.pl: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 790. Have you found a work-around? No. Line of code.... (the code works nearly all the time) my $result = $hold->migrate($imap2, $h_uid, undef ) or die $log = "error line: 255\n"; $hold = Mail::IMAPClient->new $imap2 = Mail::IMAPClient->new $h_uid = message UID - the UID parameter is true Debug: Sending: 2 SELECT inbox Sent 16 bytes Read: * FLAGS ($MDNSent NonJunk $Forwarded \Draft \Answered \Flagged \Deleted \Seen \Recent) * OK [PERMANENTFLAGS ($MDNSent NonJunk $Forwarded \* \Draft \Answered \Flagged \Deleted \Seen)] Limited * 119 EXISTS * 0 RECENT * OK [UIDVALIDITY 1189036698] Ok * OK [MYRIGHTS "acdilrsw"] ACL 2 OK [READ-WRITE] Ok Sending: 3 STATUS INBOX (MESSAGES) Sent 27 bytes Read: * STATUS "INBOX" (MESSAGES 119) 3 OK STATUS Completed. Migrating the following msgs from INBOX: 66104 Migrating message 66104 in folder INBOX Sending: 3 UID FETCH 66104 (RFC822.SIZE) Sent 33 bytes Read: * 66 FETCH (UID 66104 RFC822.SIZE 11212) 3 OK FETCH completed. Sending: 4 UID FETCH 66104 INTERNALDATE Sent 32 bytes Read: * 66 FETCH (UID 66104 INTERNALDATE "05-Jan-2009 08:12:59 -0700") 4 OK FETCH completed. Sending: 5 UID FETCH 66104 FLAGS Sent 25 bytes Read: * 66 FETCH (UID 66104 FLAGS (\Seen NonJunk)) 5 OK FETCH completed. flags: line = '5 UID FETCH 66104 FLAGS' flags: line = '* 66 FETCH (UID 66104 FLAGS (\Seen NonJunk)) ' flags: line = '5 OK FETCH completed. ' Sending: 7 CAPABILITY Sent 14 bytes Read: * CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION 7 OK CAPABILITY completed About to issue APPEND command to peer for msg 66104 Sending: 4 APPEND INBOX (\Seen NonJunk) "05-Jan-2009 08:12:59 -0700" {11212} Sent 69 bytes INBOX: received + OK from server [Mon Jan 5 20:40:31 2009] userlist.pl: Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 790. [Mon Jan 5 20:40:31 2009] userlist.pl: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 790. INBOX: received * BYE Disconnected for inactivity. from server INBOX: received * BYE [ALERT] Fatal error: INTERNAL ERROR: Keyword hashtable memory corruption.: Input/output error from server
Subject: Re: [rt.cpan.org #42171] intermittent migration function error
Date: Tue, 6 Jan 2009 09:55:15 +0100
To: "dan [...] rx.sharpr.net via RT" <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* dan@rx.sharpr.net via RT (bug-Mail-IMAPClient@rt.cpan.org) [090106 04:23]: Show quoted text
> Mon Jan 05 23:23:46 2009: Request 42171 was acted upon. > Transaction: Ticket created by dan@rx.sharpr.net > Queue: Mail-IMAPClient > Subject: intermittent migration function error > > What happens? > Most all migrations work fine with this script. only some fail, > I think it might have to do with dashes in the email address, but I > really dont know, I wonder if its some sort of > badly formatted mail message. I hope you can identify without much effort. > When the migrate line of code executes (below) these errors are displayed... > and then the script hangs until I kill or ctrl-C.
Other people do not complain: there are many other users. So, it looks like a problem specific for your environment, probably your server. Those are extremely difficult to debug, when you have no access to the system. Show quoted text
> [Mon Jan 5 20:40:31 2009] userlist.pl: Use of uninitialized value in > string eq at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 790. > [Mon Jan 5 20:40:31 2009] userlist.pl: Use of uninitialized value in > pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm > line 790.
This is on the second line of this: my $code = 0; until($code eq '+' || $code =~ /NO|BAD|OK/) { ... $code = $fromBuffer =~ /^\+/ ? $1 : $fromBuffer =~ / ^(?:\d+\s(BAD|NO))/ ? $1 : 0; ... } Ah... buglet... the /^\+/ does not set $1. Apparently, the other servers use the other notification. Could you try to change lines 777 until 799 with my $code; until(defined $code) { my $readSoFar = 0; my $fromBuffer = '';; $readSoFar += sysread($toSock, $fromBuffer, 1, $readSoFar) || 0 until $fromBuffer =~ /\r\n/; $code = $fromBuffer =~ /^\+/ ? 'OK' : $fromBuffer =~ / ^(?:\d+\s(BAD|NO|OK))/ ? $1 : undef; $peer->_debug("$folder: received $fromBuffer from server"); # ... and log it in the history buffers $self->_record($trans, [0, "OUTPUT", "Mail::IMAPClient migrating message $mid to $peer->User\@$peer->Server"] ); $peer->_record($ptrans, [0, "OUTPUT", $fromBuffer] ); } if($code ne 'OK') { $self->_debug("Error writing to target host: $@"); next MIGMSG; } Show quoted text
> INBOX: received * BYE Disconnected for inactivity. > from server > INBOX: received * BYE [ALERT] Fatal error: INTERNAL ERROR: Keyword > hashtable memory corruption.: Input/output error > from server
Wow, this seems a horrible crash of the server. That should get an upgrade as well! -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #42171] intermittent migration function error
Date: Tue, 6 Jan 2009 09:57:39 +0100
To: "dan [...] rx.sharpr.net via RT" <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Mark Overmeer (mark@overmeer.net) [090106 09:55]: Show quoted text
> : $fromBuffer =~ / ^(?:\d+\s(BAD|NO|OK))/ ? $1 : undef;
oops: : $fromBuffer =~ /^(?:\d+\s(BAD|NO|OK))/ ? $1 : undef; -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
On Tue Jan 06 03:57:52 2009, Mark@Overmeer.net wrote: Show quoted text
> * Mark Overmeer (mark@overmeer.net) [090106 09:55]: > : $fromBuffer =~ /^(?:\d+\s(BAD|NO|OK))/ ? $1 : undef; >
Please inform me about the status of this ticket. Are your problems resolved?
no support from requestor. Closed ticket