Git Product home page Git Product logo

Comments (11)

violetagg avatar violetagg commented on June 7, 2024 2

@AkashKumarAM21 Reactor Netty never changes the class loaders, we don't have any logging about this.

from reactor-netty.

violetagg avatar violetagg commented on June 7, 2024

@AkashKumarAM21 Can you check for two versions of Reactor Netty in your dependencies?

from reactor-netty.

violetagg avatar violetagg commented on June 7, 2024

@AkashKumarAM21 Another thing that you might try to check is the change of the class loaders described here spring-projects/spring-boot#19427

from reactor-netty.

AkashKumarAM21 avatar AkashKumarAM21 commented on June 7, 2024

@AkashKumarAM21 Can you check for two versions of Reactor Netty in your dependencies?

@violetagg We can't have duplicate versions of same dependency and we fail if there are duplicate class paths from different packages, our build tools enforce it! I'll double check it though.

from reactor-netty.

AkashKumarAM21 avatar AkashKumarAM21 commented on June 7, 2024

This is the latest stack trace, after we upgraded the dependencies.

encountered due to root cause: java.lang.ClassCastException: class reactor.netty.http.server.HttpServerOperations cannot be cast to class java.util.concurrent.atomic.AtomicLong (reactor.netty.http.server.HttpServerOperations is in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @39fb3ab6; java.util.concurrent.atomic.AtomicLong is in module java.base of loader 'bootstrap')
	at com.xxxx.xxxxx(xxxx.java:106) ~[classes!/:?]
	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.lang.RuntimeException: Unexpected exception from Netty
	at com.xxxx.xxxx(xxxx.java:89) ~[classes!/:?]
	at java.io.OutputStream.write(OutputStream.java:162) ~[?:?]
	at java.io.InputStream.transferTo(InputStream.java:783) ~[?:?]
	at com.xxxx.xxxx(xxxx.java:252) ~[classes!/:?]
	... 6 more
	Suppressed: java.lang.RuntimeException: Unexpected exception from Netty
		at com.xxxx.xxxx(xxxxxxx.java:89) ~[classes!/:?]
		at com.xxxx.xxxx(xxxxxxx.java:66) ~[classes!/:?]
		at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?]
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
		at java.lang.Thread.run(Thread.java:840) [?:?]
	Caused by: java.lang.ClassCastException: class reactor.netty.http.server.HttpServerOperations cannot be cast to class java.util.concurrent.atomic.AtomicLong (reactor.netty.http.server.HttpServerOperations is in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @39fb3ab6; java.util.concurrent.atomic.AtomicLong is in module java.base of loader 'bootstrap')
		at reactor.netty.http.server.HttpServerOperations.requestsCounter(HttpServerOperations.java:788) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
		at reactor.netty.http.server.HttpTrafficHandler.write(HttpTrafficHandler.java:307) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
		at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
		at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
		at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
		at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
		at reactor.netty.http.server.AbstractHttpServerMetricsHandler.write(AbstractHttpServerMetricsHandler.java:154) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
		at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
		at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
		at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
		at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
		at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[Netty4-2-4.1.jar!/:4.1.100.Final]
		at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[Netty4-2-4.1.jar!/:4.1.100.Final]
		at reactor.netty.http.server.SimpleCompressionHandler.write(SimpleCompressionHandler.java:50) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
		at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
		at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
		at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1247) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
		at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
		at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
		at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
		at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:416) ~[Netty4-24-4.1.jar!/:4.1.100.Final]
		at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
		at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
		at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
		... 1 more
Caused by: java.lang.ClassCastException: class reactor.netty.http.server.HttpServerOperations cannot be cast to class java.util.concurrent.atomic.AtomicLong (reactor.netty.http.server.HttpServerOperations is in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @39fb3ab6; java.util.concurrent.atomic.AtomicLong is in module java.base of loader 'bootstrap')
	at reactor.netty.http.server.HttpServerOperations.requestsCounter(HttpServerOperations.java:788) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
	at reactor.netty.http.server.HttpTrafficHandler.write(HttpTrafficHandler.java:307) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
	at reactor.netty.http.server.AbstractHttpServerMetricsHandler.write(AbstractHttpServerMetricsHandler.java:154) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
	at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[Netty4-2-4.1.jar!/:4.1.100.Final]
	at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[Netty4-2-4.1.jar!/:4.1.100.Final]
	at reactor.netty.http.server.SimpleCompressionHandler.write(SimpleCompressionHandler.java:50) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
	at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1247) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:416) ~[Netty4-24-4.1.jar!/:4.1.100.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
	... 1 more
	```

from reactor-netty.

AkashKumarAM21 avatar AkashKumarAM21 commented on June 7, 2024

@AkashKumarAM21 Another thing that you might try to check is the change of the class loaders described here spring-projects/spring-boot#19427

@violetagg We already provide custom Executor for our runAsync call, so this is not the issue ?

from reactor-netty.

violetagg avatar violetagg commented on June 7, 2024

@AkashKumarAM21 Can you provide a reproducible example so that we can investigate the issue?

from reactor-netty.

AkashKumarAM21 avatar AkashKumarAM21 commented on June 7, 2024

@AkashKumarAM21 Can you provide a reproducible example so that we can investigate the issue?

Thats where we came to a blocker, this exception is infrequently (like 1 request fails for every 200,000 requests) and we are unable to produce it. We tried upgrading our dependencies to check if thats going to fix the issue, not luck yet.

from reactor-netty.

violetagg avatar violetagg commented on June 7, 2024

@AkashKumarAM21 It is hard for us to proceed without a clear scenario/reproducible example.

from reactor-netty.

AkashKumarAM21 avatar AkashKumarAM21 commented on June 7, 2024

@AkashKumarAM21 It is hard for us to proceed without a clear scenario/reproducible example.

Yup, i understand that! we don't have any reproduction steps :(

Is there any feature/property that we can enable to get more information ? It would be helpfully if there is any logging or instrumentation we can turn on to get more details in this scenario.

from reactor-netty.

violetagg avatar violetagg commented on June 7, 2024

@AkashKumarAM21 I'm closing this as I cannot reproduce the issue. We can reopen it, if you are able to provide reproducible example.

from reactor-netty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.