Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use PooledByteBufAllocator with SCTP #1920

Closed
perrinz opened this issue Oct 14, 2013 · 0 comments
Closed

Can't use PooledByteBufAllocator with SCTP #1920

perrinz opened this issue Oct 14, 2013 · 0 comments
Assignees
Milestone

Comments

@perrinz
Copy link

perrinz commented Oct 14, 2013

Since 4.0.7.Final I've not been able to use PooledByteBufAllocator with the SCTP transport. The problem appears to have been introduced by 48a7a21 for issue #1697.

I checked to see if the same problem happens with the SCTP example, and it does -- if .option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT) is added to the Bootstrap in NioSctpEchoClient, then simply running the server and client results in the following:

INFO: [id: 0x19eb15bb, /192.168.0.120:39359 => /192.168.0.120:2556] FLUSH
Oct 14, 2013 4:52:19 PM io.netty.handler.logging.LoggingHandler exceptionCaught
INFO: [id: 0x19eb15bb, /192.168.0.120:39359 => /192.168.0.120:2556] EXCEPTION: java.lang.IndexOutOfBoundsException: writerIndex: 14526720 (expected: readerIndex(0) <= writerIndex <= capacity(1024))
java.lang.IndexOutOfBoundsException: writerIndex: 14526720 (expected: readerIndex(0) <= writerIndex <= capacity(1024))
    at io.netty.buffer.AbstractByteBuf.writerIndex(AbstractByteBuf.java:87)
    at io.netty.channel.sctp.nio.NioSctpChannel.doReadMessages(NioSctpChannel.java:281)
    at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:71)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:478)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:447)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:341)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:801)
    at java.lang.Thread.run(Thread.java:724)

The same thing happens if .childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT) is added the server bootstrap in NioSctpEchoServer.

@ghost ghost assigned normanmaurer Oct 15, 2013
normanmaurer pushed a commit that referenced this issue Oct 16, 2013
normanmaurer pushed a commit that referenced this issue Oct 16, 2013
@normanmaurer normanmaurer mentioned this issue Oct 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants