From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.213.28.69 with SMTP id l5cs91666ebc; Fri, 5 Feb 2010 08:43:54 -0800 (PST) Received: by 10.224.7.130 with SMTP id d2mr1115000qad.217.1265388233213; Fri, 05 Feb 2010 08:43:53 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 15si6428034qyk.110.2010.02.05.08.43.52; Fri, 05 Feb 2010 08:43:53 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id A0190158806C; Fri, 5 Feb 2010 11:43:52 -0500 (EST) Received: from mail-iw0-f173.google.com (mail-iw0-f173.google.com [209.85.223.173]) by rubyforge.org (Postfix) with ESMTP id 1FCB518582CC for ; Fri, 5 Feb 2010 11:19:09 -0500 (EST) Received: by iwn3 with SMTP id 3so1121620iwn.23 for ; Fri, 05 Feb 2010 08:19:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:subject:from:to :date:message-id:user-agent:content-transfer-encoding; bh=Fr9DAplezKpGqbuCcAll9VyBJbh8ARnZeKqgm7ymR1Q=; b=jP5uZoV3YP2Jss4BEsASbz97OzxM5dBCWb3SCimgO1HNzsIXGbw1aOKcBHZsfbxZ8A zJMom9d7ccRJYODbj0RUKDUa6yAr1fiiTMymNimht+2vh9oxUDmldnnIuGfUXgZd5ivn 3qUHNwBT/vZYSQ1GA6jMflXDMCuRcPJjrnpDM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:subject:from:to:date:message-id:user-agent :content-transfer-encoding; b=TCMKkACa11cf9N05ul7hr51cCnqstjsQHmuG2ZIVmVLjK3n7ccO3CX0N+1XdZs0TWi yzjwCG1hlxl2PIN26T4FhjiXmGm1ny+JoeEQ8tpG2F6wwUGMBsFKBPg80tzltymNgOPG 9ZGIVRR917/+lmE1lq3x4bTnnsOBRQcH2dong= Received: by 10.231.147.148 with SMTP id l20mr2125161ibv.77.1265386746118; Fri, 05 Feb 2010 08:19:06 -0800 (PST) Received: from localhost (c-76-98-110-216.hsd1.nj.comcast.net [76.98.110.216]) by mx.google.com with ESMTPS id 22sm1173115iwn.12.2010.02.05.08.19.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Feb 2010 08:19:05 -0800 (PST) From: Eric Sherman To: sup-devel Date: Fri, 05 Feb 2010 11:19:03 -0500 Message-Id: <1265386698-sup-8060@changeling.local> User-Agent: Sup/git Subject: [sup-devel] [PATCH] prevent "year too big to marshal" crashes X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org Xapian::Document#entry= performs a Marshal.dump which was throwing a "year too big to marshal" when adding a new message. I just truncate_date'd the message's date when the entry hash is created in sync_message and this problem went away for me. It was a spam message, as the MIN_DATE/MAX_DATE comments hinted. --- lib/sup/xapian_index.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb index 443b88d..44531a2 100644 --- a/lib/sup/xapian_index.rb +++ b/lib/sup/xapian_index.rb @@ -435,7 +435,7 @@ EOS :message_id => m.id, :source_id => m.source.id, :source_info => m.source_info, - :date => m.date, + :date => truncate_date(m.date), :snippet => snippet, :labels => m.labels.to_a, :from => [m.from.email, m.from.name], -- 1.6.6 _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel