puniverse / quasar

Fibers, Channels and Actors for the JVM
http://docs.paralleluniverse.co/quasar/
Other
4.56k stars 575 forks source link

FiberTimedScheduler Task time out #264

Closed wudongqiang closed 7 years ago

wudongqiang commented 7 years ago

version: quasar version:0.7.6 senario: run concurrency fibesr for http request use fiber-httpclient. after the application running about 2 days, we start get FiberTimedScheduler Task time out, then restart the server, it`s normal again.

I am in doubt with FiberTimedScheduler.state SHUTDOWN

here is the error stack:


java.util.concurrent.RejectedExecutionException: Task Timeout(co.paralleluniverse.strands.channels.TransferChannel@2bd5b35b) rejected from co.paralleluniverse.fibers.FiberTimedScheduler@b82dfd9
    at co.paralleluniverse.fibers.FiberTimedScheduler.reject(FiberTimedScheduler.java:298)
    at co.paralleluniverse.fibers.FiberTimedScheduler.delayedExecute(FiberTimedScheduler.java:292)
    at co.paralleluniverse.fibers.FiberTimedScheduler.schedule(FiberTimedScheduler.java:111)
    at co.paralleluniverse.fibers.FiberForkJoinScheduler.schedule(FiberForkJoinScheduler.java:143)
    at co.paralleluniverse.fibers.Fiber.park1(Fiber.java:705)
    at co.paralleluniverse.fibers.Fiber.park(Fiber.java:620)
    at co.paralleluniverse.fibers.Fiber.park(Fiber.java:628)
    at co.paralleluniverse.strands.Strand.parkNanos(Strand.java:670)
    at co.paralleluniverse.strands.channels.TransferChannel.awaitMatch(TransferChannel.java:731)
    at co.paralleluniverse.strands.channels.TransferChannel.xfer1(TransferChannel.java:521)
    at co.paralleluniverse.strands.channels.TransferChannel.receiveInternal(TransferChannel.java:200)
    at co.paralleluniverse.strands.channels.TransferChannel.receive(TransferChannel.java:211)
    at com.social.credits.business.middleLayer.LegalAnnouncementDetailServiceImpl.getFromExternal(LegalAnnouncementDetailServiceImpl.java:97)
    at com.social.credits.business.middleLayer.LegalAnnouncementDetailServiceImpl.getFromExternal(LegalAnnouncementDetailServiceImpl.java:37)
    at com.social.credits.business.middleLayer.AbstractService.getFromOut(AbstractService.java:30)
    at com.social.credits.business.middleLayer.AbstractService.getData(AbstractService.java:22)
    at com.social.credits.business.middleLayer.LegalAnnouncementDetailServiceImpl.getLegalAnnouncement(LegalAnnouncementDetailServiceImpl.java:59)
    at com.social.credits.business.middleLayer.LegalAnnouncementDetailServiceImpl$$FastClassBySpringCGLIB$$d473965c.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:52)
    at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:345)
    at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:414)
    at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:327)
    at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
    at com.social.credits.business.middleLayer.LegalAnnouncementDetailServiceImpl$$EnhancerBySpringCGLIB$$792da26f.getLegalAnnouncement(<generated>)
    at com.social.credits.business.middleLayer.LegalDetailServiceImpl.lambda$fiberMethod$ab490d9c$1(LegalDetailServiceImpl.java:155)
    at com.social.credits.business.middleLayer.LegalDetailServiceImpl$$Lambda$165/1644634355.run(Unknown Source)
    at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:44)
    at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:32)
    at co.paralleluniverse.fibers.Fiber.run(Fiber.java:1072)
    at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1067)
    at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:767)
    at co.paralleluniverse.fibers.FiberForkJoinScheduler$FiberForkJoinTask.exec1(FiberForkJoinScheduler.java:266)
    at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.doExec(ParkableForkJoinTask.java:117)
    at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.exec(ParkableForkJoinTask.java:74)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

``
pron commented 7 years ago

Hi. I'm afraid a stack trace isn't enough to analyze this issue. Do you have any profiling data on heap objects, or anything else to say about the number of fibers etc.?

wudongqiang commented 7 years ago

I will monitor the application to solve the problem. thank you