All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Adam C. Emerson" <aemerson@redhat.com>
To: Sage Weil <sweil@redhat.com>
Cc: Matt Benjamin <mbenjamin@redhat.com>,
	John Spray <jspray@redhat.com>,
	Ceph Development <ceph-devel@vger.kernel.org>,
	Mark Nelson <mnelson@redhat.com>
Subject: Re: assert
Date: Wed, 24 Aug 2016 12:26:43 -0400	[thread overview]
Message-ID: <20160824162643.GB22386@ultraspiritum.eng.arb.redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1608241621090.25681@piezo.us.to>

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.)

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

  reply	other threads:[~2016-08-24 16:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27 16:16 assert Sage Weil
2016-06-27 16:20 ` assert Ramesh Chander
2016-06-27 16:39 ` assert John Spray
2016-06-27 16:45   ` assert Sage Weil
2016-06-27 16:52     ` assert Allen Samuels
2016-06-27 18:10     ` assert Somnath Roy
2016-08-24 14:34     ` assert Matt Benjamin
2016-08-24 15:45       ` assert Adam C. Emerson
2016-08-24 16:17         ` assert Casey Bodley
2016-08-24 16:26           ` assert Sage Weil
2016-08-24 16:23         ` assert Sage Weil
2016-08-24 16:26           ` Adam C. Emerson [this message]
2016-08-24 16:38             ` assert Yehuda Sadeh-Weinraub
2016-08-24 17:05               ` assert Matt Benjamin
2016-08-24 17:10               ` assert Adam C. Emerson
2016-08-24 17:22                 ` assert Matt Benjamin
2016-08-24 17:26                   ` assert Adam C. Emerson
2016-08-24 17:13             ` assert Willem Jan Withagen
2016-06-28 14:10 ` assert kefu chai
  -- strict thread matches above, loose matches on Subject: below --
2013-09-25 13:18 assert Jon Grant
     [not found] ` <CAGc9EvdE4Fd5QaJ_Rj+CsZkwvktTCPcnupJmSwNfM5SJRefAJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-26 16:31   ` assert Michael Kerrisk (man-pages)
     [not found]     ` <5244617E.3000306-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-27 22:42       ` assert Jonny Grant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160824162643.GB22386@ultraspiritum.eng.arb.redhat.com \
    --to=aemerson@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=jspray@redhat.com \
    --cc=mbenjamin@redhat.com \
    --cc=mnelson@redhat.com \
    --cc=sweil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.