From 6a9b5fb0c33b35046c3a70c859a095fb7b093da6 Mon Sep 17 00:00:00 2001 From: Jed Brown Date: Fri, 10 May 2013 15:58:28 +1800 Subject: [PATCH] Xapian recovery after kernel oops --- c9/26ae9de7b2587409f9a63ec3937408ce6eb3b9 | 92 +++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 c9/26ae9de7b2587409f9a63ec3937408ce6eb3b9 diff --git a/c9/26ae9de7b2587409f9a63ec3937408ce6eb3b9 b/c9/26ae9de7b2587409f9a63ec3937408ce6eb3b9 new file mode 100644 index 000000000..fa2cf7872 --- /dev/null +++ b/c9/26ae9de7b2587409f9a63ec3937408ce6eb3b9 @@ -0,0 +1,92 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 63FF9431FAF + for ; Thu, 9 May 2013 14:58:44 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.915 +X-Spam-Level: +X-Spam-Status: No, score=0.915 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SORBS_WEB=0.614] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id uvdkXrlWcJid for ; + Thu, 9 May 2013 14:58:39 -0700 (PDT) +Received: from mail-ia0-f169.google.com (mail-ia0-f169.google.com + [209.85.210.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 9C8CD431FAE + for ; Thu, 9 May 2013 14:58:39 -0700 (PDT) +Received: by mail-ia0-f169.google.com with SMTP id k38so1792703iah.28 + for ; Thu, 09 May 2013 14:58:39 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=x-received:sender:from:to:subject:user-agent:date:message-id + :mime-version:content-type; + bh=OKur6hDcEcBJ7MLpcvAtywJcuAdjNuXZikf5HKj8zvY=; + b=yNu1wydmF6Qm6OHWo0rwuFrUUk78+VkL4xpWUJtfk4LyYQJX599bKAOc6zgRgs43kE + 5Nqn1BIqWmN3dvhw5C/KF78jvvfyPQ6QuY6NknaJ9MEWKR5S995i5OufbVo3Kt6FCiy0 + QhdTfoNUdm/8adWlWOp7d/y3tlDh1j0aKO7iFfaaxOdP9myjkZoV32WACX8l0nDMVmm8 + j1xZQ72iXJy7OP5Xj+jlLMTzQM9mH96gIKskXPIp0nI2L4uy9fOasMlA6HuGAIDSvpRM + rOSn3hKEPXQgLNmQA1ua+7pIGJkAej8avcQ53MQ68g7P7P033AWaoHzTh6cToeIzAVy2 + PYfw== +X-Received: by 10.50.110.10 with SMTP id hw10mr10001753igb.55.1368136717938; + Thu, 09 May 2013 14:58:37 -0700 (PDT) +Received: from localhost (m800436d0.tmodns.net. [208.54.4.128]) + by mx.google.com with ESMTPSA id qs4sm55229igb.10.2013.05.09.14.58.36 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Thu, 09 May 2013 14:58:37 -0700 (PDT) +Sender: Jed Brown +From: Jed Brown +To: notmuch +Subject: Xapian recovery after kernel oops +User-Agent: Notmuch/0.15.2+84~gfa8aadf (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +Date: Thu, 09 May 2013 15:58:28 -0600 +Message-ID: <87txmb4xyz.fsf@mcs.anl.gov> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Thu, 09 May 2013 21:58:44 -0000 + +My laptop had a kernel oops this morning, apparently triggered by +getting bumped (not very hard, actually). Upon restarting, I have a +corrupt database: + + $ notmuch search tag:inbox + A Xapian exception occurred opening database: The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation + +This is with Linux 3.8.11 and btrfs, though nothing else on the file +systems appears to have been affected. + + $ xapian-check Mail/.notmuch/xapian/ + Database couldn't be opened for reading: DatabaseModifiedError: The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation + Continuing check anyway + Cross-checking document lengths between the postlist and termlist tables would use more than 1GB of memory, so skipping that check + record: + xapian-check: DatabaseCorruptError: Db block overwritten - are there multiple writers? + +>From the xapian list archives, recovery doesn't look likely. According +to this mail, it sounds like the commit should have been atomic. + + http://lists.xapian.org/pipermail/xapian-discuss/2009-September/007126.html + +Is there likely to be any information in my database that would help +track down the reason why the commit was not atomic? I don't rule out +the possibility that the corruption was entirely the kernel's fault, but +I don't want to leap to conclusions either. -- 2.26.2