From: Vladimir Marek Date: Tue, 16 Apr 2013 13:56:00 +0000 (+0200) Subject: crash during saving X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b3b321d49d7d927fa97ab1b1794dcf7224d69437;p=notmuch-archives.git crash during saving --- diff --git a/83/95742e8ed9119dc3aebd16d251f1cb254fbff0 b/83/95742e8ed9119dc3aebd16d251f1cb254fbff0 new file mode 100644 index 000000000..174e39734 --- /dev/null +++ b/83/95742e8ed9119dc3aebd16d251f1cb254fbff0 @@ -0,0 +1,185 @@ +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 D512D431FB6 + for ; Tue, 16 Apr 2013 07:54:00 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.299 +X-Spam-Level: +X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3, UNPARSEABLE_RELAY=0.001] + 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 WV8RKWh6DDAy for ; + Tue, 16 Apr 2013 07:54:00 -0700 (PDT) +X-Greylist: delayed 3359 seconds by postgrey-1.32 at olra; + Tue, 16 Apr 2013 07:54:00 PDT +Received: from userp1050.oracle.com (userp1050.oracle.com [156.151.31.82]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 0B8AB431FAF + for ; Tue, 16 Apr 2013 07:53:59 -0700 (PDT) +Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) + by userp1050.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with + ESMTP id r3GDw1br025306 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) + for ; Tue, 16 Apr 2013 13:58:02 GMT +Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) + by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with + ESMTP id r3GDvxdm032644 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) + for ; Tue, 16 Apr 2013 13:58:00 GMT +Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) + by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id + r3GDvwqS009239 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) + for ; Tue, 16 Apr 2013 13:57:59 GMT +Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) + by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id + r3GDvw1p009228 + for ; Tue, 16 Apr 2013 13:57:58 GMT +Received: from pub.cz.oracle.com (/10.163.101.122) + by default (Oracle Beehive Gateway v4.0) + with ESMTP ; Tue, 16 Apr 2013 06:57:57 -0700 +Date: Tue, 16 Apr 2013 15:56:00 +0200 +From: Vladimir Marek +To: notmuch@notmuchmail.org +Subject: crash during saving +Message-ID: <20130416135600.GA7807@pub.cz.oracle.com> +Mail-Followup-To: notmuch@notmuchmail.org +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Disposition: inline +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Source-IP: userp1040.oracle.com [156.151.31.81] +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: Tue, 16 Apr 2013 14:54:01 -0000 + +Hi, + +I just indexed my mail archive by notmuch and I'm starting to play with +mutt-kz. The biggest stopper right now is that mutt cores when set +already read mail to new (toggle-new in mutt). Once I try to leave the +virtual folder (be it to another folder or because of quitting mutt) it +crashes. + +I haven't had the time yet to investigate deeper, so I'll just post +whatever info I have and hope that it will be something obvious for you +:) + +It seems that mutt is calling "notmuch_message_maildir_flags_to_tags" +which in turn tries to remove flag "draft" which probably is not present +and thus raises an exception. Does +"notmuch_message_maildir_flags_to_tags" expect the mail to be in certain +state (have certain flags set) or it should not crash no matter which +flags were and are now set? + +Now to be fair I have to say that this is on Solaris with handful of +patches applied to make notmuch compilable there by Oracle Studio +compilers. (I'm working on finalizing the patches to have them suitable +for review, which I want to post soon). + +Any tips welcome :) + +Thank you +-- + Vlad + +The stack looks like: + +(dbx) where + [1] _lwp_kill(0x1, 0x6, 0xfeffd028, 0xfe5f2168), at 0xfe5f9265 + [2] thr_kill(0x1, 0x6, 0xfeffd028, 0xfe5a0fe1), at 0xfe5f218a + [3] raise(0x6, 0x0, 0xfeffd084, 0xfe57873d), at 0xfe5a0fed + [4] abort(0x0), at 0xfe57875d + [5] __Cimpl::default_terminate(0x0), at 0x8705898 + [6] std::terminate(0x0, 0x89290a8, 0xfeffd0ac, 0x89290a8, 0x0, 0x89290a8), at 0x87055cb + [7] __Cimpl::ex_terminate(0x884afac, 0x0), at 0x8705736 + ---- hidden frames, use 'where -h' to see them all ---- +=>[10] Xapian::Document::Internal::remove_term(this = 0x8b14cb8, tname = CLASS), line 404 in "omdocument.cc" + [11] Xapian::Document::remove_term(this = 0x98e3684, tname = CLASS), line 156 in "omdocument.cc" + [12] _notmuch_message_remove_term(message = 0x98e3650, prefix_name = 0x884149b "tag", value = 0x88e9f09 "draft"), line 960 in "message.cc" + [13] notmuch_message_remove_tag(message = 0x98e3650, tag = 0x88e9f09 "draft"), line 1019 in "message.cc" + [14] notmuch_message_maildir_flags_to_tags(message = 0x98e3650), line 1126 in "message.cc" + [15] rename_filename(db = 0x98e26c0, old = 0xfeffd48d "/tank/vm/vmarek/mail/archive/064/cur/1366056222.6981_56079.vi64-x3-2e-prg06:2,S", new = 0xfeffd38e "/tank/vm/vmarek/mail/archive/064/cur/1366056222.6981_56079.vi64-x3-2e-prg06:2,", h = 0x8b1b880), line 1192 in "mutt_notmuch.c" + [16] nm_sync(ctx = 0x8ac77f0, index_hint = 0xfeffdb68), line 1277 in "mutt_notmuch.c" + [17] sync_mailbox(ctx = 0x8ac77f0, index_hint = 0xfeffdb68), line 822 in "mx.c" + [18] mx_close_mailbox(ctx = 0x8ac77f0, index_hint = 0xfeffdb68), line 1020 in "mx.c" + [19] mutt_index_menu(), line 954 in "curs_main.c" + [20] main(argc = 1, argv = 0xfeffea38), line 1056 in "main.c" + + + + +(dbx) print -r tname +tname = { + basic_string,std::allocator >::_String_base >::_M_start = 0x8b2b900 "Kdraft" + basic_string,std::allocator >::_String_base >::_M_finish = 0x8b2b906 "" + basic_string,std::allocator >::_String_base >::_M_end_of_storage = { + basic_string,std::allocator >::_String_base >::_STLP_alloc_proxy >::_M_data = 0x8b2b907 "T^O" + } +} + + + +(dbx) list + 404 throw Xapian::InvalidArgumentError("Term `" + tname + + 405 "' is not present in document, in " + 406 "Xapian::Document::Internal::remove_term()"); + 407 } + 408 positions_modified = !i->second.positions.empty(); + 409 terms.erase(i); + 410 } + 411 + 412 void + 413 Xapian::Document::Internal::clear_terms() + + + + +(dbx) frame 15 +Current function is rename_filename + 1192 notmuch_message_maildir_flags_to_tags(msg); +(dbx) list + 1192 notmuch_message_maildir_flags_to_tags(msg); + 1193 update_tags(msg, nm_header_get_tags(h)); + 1194 } + 1195 + 1196 rc = 0; + 1197 done: + 1198 if (msg) + 1199 notmuch_message_destroy(msg); + 1200 notmuch_database_end_atomic(db); + 1201 return rc; + + +(dbx) frame 14 +Current function is notmuch_message_maildir_flags_to_tags + 1126 status = notmuch_message_remove_tag (message, flag2tag[i].tag); + +(dbx) print filename +filename = 0x8b24e10 "/tank/vm/vmarek/mail/archive/064/cur/1366056222.6981_56079.vi64-x3-2e-prg06:2," + +(dbx) print *flags +*flags = '\0' + +(dbx) print *filenames +*filenames = { + iterator = (nil) +} + +