From patchwork Thu Aug 11 22:32:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sage Weil X-Patchwork-Id: 9276111 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 298DF6022E for ; Thu, 11 Aug 2016 22:32:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17D982840E for ; Thu, 11 Aug 2016 22:32:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C9962878A; Thu, 11 Aug 2016 22:32:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, URI_NOVOWEL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AA872840E for ; Thu, 11 Aug 2016 22:32:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751932AbcHKWcH (ORCPT ); Thu, 11 Aug 2016 18:32:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59326 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751494AbcHKWcG (ORCPT ); Thu, 11 Aug 2016 18:32:06 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 389B861A0D; Thu, 11 Aug 2016 22:32:05 +0000 (UTC) Received: from ovpn-112-26.phx2.redhat.com (ovpn-112-26.phx2.redhat.com [10.3.112.26]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7BMW2U1009565 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Aug 2016 18:32:04 -0400 Date: Thu, 11 Aug 2016 22:32:02 +0000 (UTC) From: Sage Weil X-X-Sender: sage@piezo.us.to To: Somnath Roy cc: Mark Nelson , ceph-devel Subject: RE: Bluestore assert In-Reply-To: Message-ID: References: <7dc67e25-4e1c-09a1-8667-ee47572b9290@redhat.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 11 Aug 2016 22:32:05 +0000 (UTC) Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, 11 Aug 2016, Somnath Roy wrote: > Sage, > Regarding the db assert , I hit that again on multiple OSDs while I was populating 40TB rbd images (~35TB written before crash). > I did the following changes in the code.. > > @@ -370,7 +370,7 @@ int RocksDBStore::submit_transaction(KeyValueDB::Transaction t) > utime_t lat = ceph_clock_now(g_ceph_context) - start; > logger->inc(l_rocksdb_txns); > logger->tinc(l_rocksdb_submit_latency, lat); > - return s.ok() ? 0 : -1; > + return s.ok() ? 0 : -s.code(); > } > > int RocksDBStore::submit_transaction_sync(KeyValueDB::Transaction t) > @@ -385,7 +385,7 @@ int RocksDBStore::submit_transaction_sync(KeyValueDB::Transaction t) > utime_t lat = ceph_clock_now(g_ceph_context) - start; > logger->inc(l_rocksdb_txns_sync); > logger->tinc(l_rocksdb_submit_sync_latency, lat); > - return s.ok() ? 0 : -1; > + return s.ok() ? 0 : -s.code(); > } > int RocksDBStore::get_info_log_level(string info_log_level) > { > diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc > index fe7f743..3f4ecd5 100644 > --- a/src/os/bluestore/BlueStore.cc > +++ b/src/os/bluestore/BlueStore.cc > @@ -4989,6 +4989,9 @@ void BlueStore::_kv_sync_thread() > ++it) { > _txc_finalize_kv((*it), (*it)->t); > int r = db->submit_transaction((*it)->t); > + if (r < 0 ) { > + dout(0) << "submit_transaction returned = " << r << dendl; > + } > assert(r == 0); > } > } > @@ -5026,6 +5029,10 @@ void BlueStore::_kv_sync_thread() > t->rm_single_key(PREFIX_WAL, key); > } > int r = db->submit_transaction_sync(t); > + if (r < 0 ) { > + dout(0) << "submit_transaction_sync returned = " << r << dendl; > + } > + > assert(r == 0); > > > This is printing -1 in the log before asset. So, the corresponding code from the rocksdb side is "kNotFound". > It is not related to space as I hit this same issue irrespective of db partition size is 100G or 300G. > It seems some kind of corruption within Bluestore ? > Let me now the next step. Can you add this too? It's not obvious to me how we would get NotFound when doing a Write into the kv store. Thanks! sage > > Thanks & Regards > Somnath > > -----Original Message----- > From: Sage Weil [mailto:sweil@redhat.com] > Sent: Thursday, August 11, 2016 9:36 AM > To: Mark Nelson > Cc: Somnath Roy; ceph-devel > Subject: Re: Bluestore assert > > On Thu, 11 Aug 2016, Mark Nelson wrote: > > Sorry if I missed this during discussion, but why are these being > > called if the file is deleted? > > I'm not sure... rocksdb is the one consuming the interface. Looking through the code, though, this is the only way I can see that we could log an op_file_update *after* an op_file_remove. > > sage > > > > > Mark > > > > On 08/11/2016 11:29 AM, Sage Weil wrote: > > > On Thu, 11 Aug 2016, Somnath Roy wrote: > > > > Sage, > > > > Please find the full log for the BlueFS replay bug in the > > > > following location. > > > > > > > > https://github.com/somnathr/ceph/blob/master/ceph-osd.1.log.zip > > > > > > > > For the db transaction one , I have added code to dump the rocksdb > > > > error code before the assert as you suggested and waiting to reproduce. > > > > > > I'm pretty sure this is the root cause: > > > > > > https://github.com/ceph/ceph/pull/10686 > > > > > > sage > > > -- > > > To unsubscribe from this list: send the line "unsubscribe > > > ceph-devel" in the body of a message to majordomo@vger.kernel.org > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > > > > > PLEASE NOTE: The information contained in this electronic mail message is intended only for the use of the designated recipient(s) named above. If the reader of this message is not the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify the sender by telephone or e-mail (as shown above) immediately and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies). > > --- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc index 638d231..b5467f7 100644 --- a/src/kv/RocksDBStore.cc +++ b/src/kv/RocksDBStore.cc @@ -370,6 +370,9 @@ int RocksDBStore::submit_transaction(KeyValueDB::Transaction t) utime_t lat = ceph_clock_now(g_ceph_context) - start; logger->inc(l_rocksdb_txns); logger->tinc(l_rocksdb_submit_latency, lat); + if (!s.ok()) { + derr << __func__ << " error: " << s.ToString() << dendl; + } return s.ok() ? 0 : -1; }