From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Benjamin Subject: Re: assert Date: Wed, 24 Aug 2016 13:05:26 -0400 (EDT) Message-ID: <1122445669.74229115.1472058326460.JavaMail.zimbra@redhat.com> References: <120706851.74131386.1472049260388.JavaMail.zimbra@redhat.com> <20160824154557.GA22386@ultraspiritum.eng.arb.redhat.com> <20160824162643.GB22386@ultraspiritum.eng.arb.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from mx4-phx2.redhat.com ([209.132.183.25]:57409 "EHLO mx4-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932286AbcHXRF2 (ORCPT ); Wed, 24 Aug 2016 13:05:28 -0400 In-Reply-To: Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Yehuda Sadeh-Weinraub Cc: Sage Weil , John Spray , Ceph Development , Mark Nelson You're right, it's non-portable. I think that's a strike against it. Matt ----- Original Message ----- > From: "Yehuda Sadeh-Weinraub" > To: "Sage Weil" , "Matt Benjamin" , "John Spray" , "Ceph > Development" , "Mark Nelson" > Sent: Wednesday, August 24, 2016 12:38:26 PM > Subject: Re: assert > > On Wed, Aug 24, 2016 at 9:26 AM, Adam C. Emerson wrote: > > On 24/08/2016, Sage Weil wrote: > > [snip] > >> This is appealing, except: > >> > >> > > Note that using the system assert isn't a total disaster: system > >> > > assert will trigger an abort, which will trigger the SIGABRT handler > >> > > which *also* dumps a stack trace to the debug log. The problem is > >> > > that it doesn't show the assertion condition and line number. > > [snip] > >> I think not getting the assertion condition and line number in the > >> ceph log is a deal breaker. > > > > We should be able to get the condition and line number in the log, > > they're passed to __assert_fail() so we could pass them to > > ceph_assert_fail (see the commit that Casey linked to.) > > Will that work on any system we compile on? > > > > > I can see arguments either way, the main one I would make AGAINST this > > approach is that it makes portability/building more complicated. > > > > -- > > Senior Software Engineer Red Hat Storage, Ann Arbor, MI, US > > IRC: Aemerson@{RedHat, OFTC, Freenode} > > 0x80F7544B90EDBFB9 E707 86BA 0C1B 62CC 152C 7C12 80F7 544B 90ED BFB9 > > -- > > 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 > -- > 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 > -- Matt Benjamin Red Hat, Inc. 315 West Huron Street, Suite 140A Ann Arbor, Michigan 48103 http://www.redhat.com/en/technologies/storage tel. 734-707-0660 fax. 734-769-8938 cel. 734-216-5309