ServiceTask is blocking JIT

48 views
Skip to first unread message

Antoine Mischler

unread,
Aug 26, 2013, 11:50:20 AM8/26/13
to 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

unread,
Aug 26, 2013, 12:14:27 PM8/26/13
to 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

unread,
Aug 26, 2013, 12:27:46 PM8/26/13
to 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

unread,
Aug 26, 2013, 12:49:22 PM8/26/13
to 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

unread,
Aug 27, 2013, 3:23:55 AM8/27/13
to 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

unread,
Aug 27, 2013, 4:16:08 AM8/27/13
to jrebirt...@googlegroups.com
Where do you download it ? from OJO ? (oss.jfrog.org) or other ?

Antoine Mischler

unread,
Aug 27, 2013, 5:15:24 AM8/27/13
to jrebirt...@googlegroups.com
We build it from a forked Github repository
(https://github.com/amischler/JRebirth) and deploy it internally.

Sebastien Bordes

unread,
Aug 29, 2013, 11:25:09 AM8/29/13
to jrebirt...@googlegroups.com
Bug fixed into 0.7.5-SNAPSHOT
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages