Re: Crashes with new encoding

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

 



On Thu, Oct 20, 2016 at 2:58 PM, Sage Weil <sweil@xxxxxxxxxx> wrote:
> On Thu, 20 Oct 2016, John Spray wrote:
>> Latest master has the MDS crashing on startup:
>> http://tracker.ceph.com/issues/17636
>> https://github.com/ceph/ceph/pull/11577
>>
>> My patch is kind of dumb, clearly the intent of the original code is
>> to avoid any constructor overhead and it would be nice to do so, but
>> the original code seems to make the assumption that no encode/decode
>> implementations deferences the object they're passed.
>>
>> Good motivation to go and immediately familiarise myself with the new
>> code this morning though :-)
>
> Hmm, what compiler version are you using?  The intent of the code is
> two-fold: avoid the ctor, as you mention, but also trigger a SEGV if the
> implementation of bound_encode for any traits::bounded type actually
> makes use of the (bogus) reference we're passing in.

This is gcc 5.3.1 (fedora 22).

> Which type(s) did it fail on?  My guess is that it is either a malformed
> bound_encode (taking a value instead of a reference) or the implementation
> is broken (value-dependent).

Ah, I see that denc_traits<inodeno_t>::bound_encode was indeed taking
a value instead of a reference.

John

> Or, we are unlucky enough that the compiler is both turning const foo&
> into a pass-by-value and not optimizing it away when the implementation
> doesn't make use of it.  :/  Hopefully not!
>
> sage
>
--
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