ServiceTask is blocking JIT

조회수 48회
읽지 않은 첫 메시지로 건너뛰기

Antoine Mischler

읽지 않음,
2013. 8. 26. 오전 11:50:2013. 8. 26.
받는사람 jrebirt...@googlegroups.com
Hi all,

I'm calling a Service by using the returnData method in a model. This service performs a long background task.
While this task is running, it seems that no other wave is processed. Once the ServiceTask is done, the pending waves are processed.

Here are the relevant stacktraces:

The ServiceTask running in the JTP:
JTP Slot 2@1716 daemon, prio=5, in group 'main', status: 'RUNNING'
      at com.dooapp.dsdk.component.loading.Service1.doIt(Service1.java:38)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.jrebirth.core.service.ServiceTask.call(ServiceTask.java:126)
      at javafx.concurrent.Task$TaskCallable.call(Task.java:1259)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)

The JIT waiting for the ServiceTask to be done (by a blocking call to FutureTask.get()
JIT@812 daemon, prio=5, in group 'main', status: 'WAIT'
      at sun.misc.Unsafe.park(Unsafe.java:-1)
      at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:994)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303)
      at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:248)
      at java.util.concurrent.FutureTask.get(FutureTask.java:111)
      at org.jrebirth.core.concurrent.JRebirthThread.runIntoJTP(JRebirthThread.java:117)
      at org.jrebirth.core.concurrent.JRebirth.runIntoJTP(JRebirth.java:117)
      at org.jrebirth.core.service.AbstractService.runTask(AbstractService.java:134)
      at org.jrebirth.core.service.AbstractService.returnData(AbstractService.java:95)
      at org.jrebirth.core.link.NotifierBase.returnData(NotifierBase.java:139)
      at org.jrebirth.core.link.NotifierBase.sendWave(NotifierBase.java:86)
      at org.jrebirth.core.link.AbstractWaveReady$3.runInto(AbstractWaveReady.java:207)
      at org.jrebirth.core.concurrent.AbstractJrbRunnable.run(AbstractJrbRunnable.java:56)
      at org.jrebirth.core.concurrent.JRebirthThread.run(JRebirthThread.java:202)

This is not the behavior that I would expect. I thought that the JIT would be running and processing waves while a Service is running, is this right?
I'm I doing something wrong to when calling the Service?

Regards,
--
Antoine Mischler

Sebastien Bordes

읽지 않음,
2013. 8. 26. 오후 12:14:2713. 8. 26.
받는사람 jrebirt...@googlegroups.com
You are right if it's occurs it's a bug, I will investigate on it, which version do you use ?

Sebastien Bordes

읽지 않음,
2013. 8. 26. 오후 12:27:4613. 8. 26.
받는사람 jrebirt...@googlegroups.com
I've just fixed it ( the side effect is that for instance service task exception won't be logged, I will fix it asap).

Jenkins is building the new fixed snapshot

Seb

Sebastien Bordes

읽지 않음,
2013. 8. 26. 오후 12:49:2213. 8. 26.
받는사람 jrebirt...@googlegroups.com
I fix it, and I fix error logging into JTP.

I have added some code to catch error that occured into JTP into JRebirthThreadPoolExecutor.afterExecute but I forget to remove the workaround used to catch them (temporary) into JRebirthThread.runIntoJTP

As a conclusion, now task performed into JTP don't lock the JIT, and if they generate an error, it will be correctly logged by the threadpool executor.

Snaphot will be updated within few minutes : http://ci.jrebirth.org/job/JRebirth-master/545/


Seb

Antoine Mischler

읽지 않음,
2013. 8. 27. 오전 3:23:5513. 8. 27.
받는사람 jrebirt...@googlegroups.com
I'm using the latest 0.7.5-SNAPSHOT version. Thank you for fixing this!
> --
> Vous recevez ce message car vous êtes abonné à un sujet dans le groupe
> Google Groupes "JRebirth Users".
> Pour vous désabonner de ce sujet, visitez le site
> https://groups.google.com/d/topic/jrebirth-users/pFp4HcGzvpI/unsubscribe.
> Pour vous désabonner de ce groupe et de tous ses sujets, envoyez un e-mail à
> l'adresse jrebirth-user...@googlegroups.com.
> Pour plus d'options, visitez le site
> https://groups.google.com/groups/opt_out .



--
Antoine Mischler

Sebastien Bordes

읽지 않음,
2013. 8. 27. 오전 4:16:0813. 8. 27.
받는사람 jrebirt...@googlegroups.com
Where do you download it ? from OJO ? (oss.jfrog.org) or other ?

Antoine Mischler

읽지 않음,
2013. 8. 27. 오전 5:15:2413. 8. 27.
받는사람 jrebirt...@googlegroups.com
We build it from a forked Github repository
(https://github.com/amischler/JRebirth) and deploy it internally.

Sebastien Bordes

읽지 않음,
2013. 8. 29. 오전 11:25:0913. 8. 29.
받는사람 jrebirt...@googlegroups.com
Bug fixed into 0.7.5-SNAPSHOT
전체답장
작성자에게 답글
전달
이 대화는 잠겨 있습니다
잠긴 대화에서는 답장하거나 작업을 할 수 없습니다.
새 메시지 0개