Re: assert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You're right, it's non-portable.  I think that's a strike against it.

Matt

----- Original Message -----
> From: "Yehuda Sadeh-Weinraub" <ysadehwe@xxxxxxxxxx>
> To: "Sage Weil" <sweil@xxxxxxxxxx>, "Matt Benjamin" <mbenjamin@xxxxxxxxxx>, "John Spray" <jspray@xxxxxxxxxx>, "Ceph
> Development" <ceph-devel@xxxxxxxxxxxxxxx>, "Mark Nelson" <mnelson@xxxxxxxxxx>
> Sent: Wednesday, August 24, 2016 12:38:26 PM
> Subject: Re: assert
> 
> On Wed, Aug 24, 2016 at 9:26 AM, Adam C. Emerson <aemerson@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx
> > 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@xxxxxxxxxxxxxxx
> 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
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux