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

Netty + IKVM.NET = crash #12847

Closed
jessiepathfinder opened this issue Sep 29, 2022 · 5 comments
Closed

Netty + IKVM.NET = crash #12847

jessiepathfinder opened this issue Sep 29, 2022 · 5 comments

Comments

@jessiepathfinder
Copy link

C:\Users\jessi\Desktop\ikvmtest>ikvm -jar 1.12.2.jar nogui
[15:02:12] [Server thread/INFO]: Starting minecraft server version 1.12.2
[15:02:12] [Server thread/INFO]: Loading properties
[15:02:12] [Server thread/INFO]: Default game type: CREATIVE
[15:02:12] [Server thread/INFO]: Generating keypair
[15:02:12] [Server thread/INFO]: Starting Minecraft server on *:25565
[15:02:13] [Server thread/INFO]: Using default channel type
[15:02:16] [Server thread/WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
[15:02:16] [Server thread/WARN]: The server will make no attempt to authenticate usernames. Beware.
[15:02:16] [Server thread/WARN]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.
[15:02:16] [Server thread/WARN]: To change this, set "online-mode" to "true" in the server.properties file.
[15:02:17] [Server thread/INFO]: Preparing level "world"
[15:02:21] [Server thread/INFO]: Loaded 488 advancements
[15:02:21] [Server thread/INFO]: Preparing start region for level 0
[15:02:22] [Server thread/INFO]: Preparing spawn area: 17%
[15:02:24] [Server thread/INFO]: Preparing spawn area: 24%
[15:02:25] [Server thread/INFO]: Preparing spawn area: 45%
[15:02:26] [Server thread/INFO]: Done (8.975s)! For help, type "help" or "?"
[15:02:50] [Server thread/INFO]: jessielesbian[/127.0.0.1:32618] logged in with entity id 160 at (-26.5, 69.0, -60.5)
[15:02:51] [Server thread/INFO]: jessielesbian joined the game
[15:02:51] [Netty Server IO #1/WARN]: Failed to release a message: PooledUnsafeDirectByteBuf(freed)
java.lang.ArrayIndexOutOfBoundsException: null
at io.netty.util.internal.shaded.org.jctools.util.UnsafeRefArrayAccess.soRefElement(UnsafeRefArrayAccess.java:64) ~[1.12.2.jar:?]
at io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueue.offer(BaseMpscLinkedArrayQueue.java:311) ~[1.12.2.jar:?]
at io.netty.util.internal.shaded.org.jctools.queues.MpscChunkedArrayQueue.offer(MpscChunkedArrayQueue.java:43) ~[1.12.2.jar:?]
at io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueue.relaxedOffer(BaseMpscLinkedArrayQueue.java:494) ~[1.12.2.jar:?]
at io.netty.util.internal.shaded.org.jctools.queues.MpscChunkedArrayQueue.relaxedOffer(MpscChunkedArrayQueue.java:43) ~[1.12.2.jar:?]
at io.netty.util.Recycler$LocalPool.release(Recycler.java:291) ~[1.12.2.jar:?]
at io.netty.util.Recycler$DefaultHandle.recycle(Recycler.java:232) ~[1.12.2.jar:?]
at io.netty.buffer.PooledByteBuf.recycle(PooledByteBuf.java:185) ~[1.12.2.jar:?]
at io.netty.buffer.PooledByteBuf.deallocate(PooledByteBuf.java:181) ~[1.12.2.jar:?]
at io.netty.buffer.AbstractReferenceCountedByteBuf.handleRelease(AbstractReferenceCountedByteBuf.java:113) ~[1.12.2.jar:?]
at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:101) ~[1.12.2.jar:?]
at io.netty.util.ReferenceCountUtil.release(ReferenceCountUtil.java:90) ~[1.12.2.jar:?]
at io.netty.util.ReferenceCountUtil.safeRelease(ReferenceCountUtil.java:116) [1.12.2.jar:?]
at io.netty.channel.ChannelOutboundBuffer.remove(ChannelOutboundBuffer.java:272) [1.12.2.jar:?]
at io.netty.channel.ChannelOutboundBuffer.removeBytes(ChannelOutboundBuffer.java:352) [1.12.2.jar:?]
at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:422) [1.12.2.jar:?]
at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:931) [1.12.2.jar:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.flush0(AbstractNioChannel.java:356) [1.12.2.jar:?]
at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:896) [1.12.2.jar:?]
at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1373) [1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:750) [1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:742) [1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:728) [1.12.2.jar:?]
at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:126) [1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:750) [1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:765) [1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) [1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:759) [1.12.2.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:808) [1.12.2.jar:?]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025) [1.12.2.jar:?]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) [1.12.2.jar:?]
at gw$4.run(SourceFile:201) [1.12.2.jar:?]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:175) [1.12.2.jar:?]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) [1.12.2.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) [1.12.2.jar:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503) [1.12.2.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:996) [1.12.2.jar:?]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [1.12.2.jar:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0]
[15:02:51] [Server thread/INFO]: jessielesbian lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.ArrayIndexOutOfBoundsException
[15:02:51] [Server thread/INFO]: jessielesbian left the game
stop
[15:03:23] [Server thread/INFO]: Stopping the server
[15:03:24] [Server thread/INFO]: Stopping server
[15:03:24] [Server thread/INFO]: Saving players
[15:03:24] [Server thread/INFO]: Saving worlds
[15:03:24] [Server thread/INFO]: Saving chunks for level 'world'/overworld
[15:03:24] [Server thread/INFO]: Saving chunks for level 'world'/the_nether
[15:03:24] [Server thread/INFO]: Saving chunks for level 'world'/the_end
[15:03:24] [Server Shutdown Thread/INFO]: Stopping server
[15:03:24] [Server Shutdown Thread/INFO]: Saving players
[15:03:24] [Server Shutdown Thread/INFO]: Saving worlds
[15:03:24] [Server Shutdown Thread/INFO]: Saving chunks for level 'world'/overworld
[15:03:24] [Server Shutdown Thread/INFO]: Saving chunks for level 'world'/the_nether
[15:03:24] [Server Shutdown Thread/INFO]: Saving chunks for level 'world'/the_end

@hyperxpro
Copy link
Contributor

More details are needed.

@slandelle
Copy link
Contributor

I would argue that IKVM (a Java implementation in .Net) is not a supported platform.
You have to use a real JVM.

@chrisvest
Copy link
Contributor

The exception is coming out of JCTools code. Either JCTools has a bug, or IKVM.NET has a bug (perhaps in their JMM implementation), but in either case I don't think it's a Netty issue per se. It can also be that both are buggy. We've seen similar exceptions from running on Arm, but too rare to diagnose as far as I understood.

Pinging @nitsanw in case he has insights.

@normanmaurer
Copy link
Member

Closing this as there is not much we can do here.

@nitsanw
Copy link
Contributor

nitsanw commented Oct 13, 2022

I think this is similar to this one: #8916
Essentially, IKVM has a weird Unsafe impl. which messes up JCTools. This was fixed in Netty at some point, but maybe OP is using an old Netty?

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

6 participants