2018-03-16 10:34 GMT+01:00 Sijie Guo <guosi...@gmail.com>:

> On Fri, Mar 16, 2018 at 2:26 AM, Enrico Olivelli <eolive...@gmail.com>
> wrote:
>
> > Thank you Sijie,
> > I have already applied a similar patch to my local code based on 4.6.1
> but
> > the problem remains.
> >
>
> What do you mean "the problem" here?
>

missing buf.release(), that you fixed on 4.7 and will cherry pick to 4.6
branch


>
> Do you mean the corruption problem or the leaking problem? The change I
> pointed out only address the leaking problem. I don't think it is the
> problem of corruption.
>

Actually we are talking about a wire protocol level corruption.
The only good "fix" that I have at the moment is to use use
UnpooledByteBufAllocator.DEFAULT here for client side

https://github.com/apache/bookkeeper/blob/b53c0c3370c42d753afb852824ea12d2dbce4f2e/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtoEncoding.java#L325


and for bookie side

https://github.com/apache/bookkeeper/blob/b53c0c3370c42d753afb852824ea12d2dbce4f2e/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtoEncoding.java#L349













I have pointed the leak in order to answer to Ivan because it was the only
error report from Netty using Ivan's suggestion to enable "paranoid" debug
level for ByteBufs leaks


Enrico




> >
> > I am looking into Netty allocateUnitializedArray, which is used for
> Pooled
> > Heap Buffers.
> > You all are more aware of BK code than me, is there any point in which we
> > assume that the buffer is full of zeroes ?
> >
> >
> > Enrico
> >
> >
> >
> >
> > 2018-03-16 10:22 GMT+01:00 Ivan Kelly <iv...@apache.org>:
> >
> > > > With "paranoid" log in Netty I found this that is very interesting,
> but
> > > it
> > > > happens even on Java 8.
> > > I don't think leaks are the problem here though. This seems to be more
> > > like a doublefree issue.
> > >
> > > -Ivan
> > >
> >
>

Reply via email to