ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nandika Jayawardana (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ODE-989) Intermittent IllegalArgumentException: No such channel when running an asynchronous process
Date Sat, 19 Jan 2013 08:18:14 GMT

    [ https://issues.apache.org/jira/browse/ODE-989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13557949#comment-13557949
] 

Nandika Jayawardana commented on ODE-989:
-----------------------------------------

After running ode with custom logs, we figured that it was due to following reason. 

When the initial message arrives for a process ode schedules a job. A thread will start to
execute this job and try to acquire the instance lock with acquireInstanceLock(we.getInstanceId());
at BpelEngineImpl. Since at this point,  there is no instance, this thread is going to execute
without the instance lock and will create an instance of the process and try to execute as
much as it can before saving the state to the db . 

If the correlated message also arrives and start to execute and get correlated to the process
instance created by the first thread, it will acquire the instance lock since now there is
an instance id. Sometimes, the second thread, will execute before the first thread saves the
state ( ProcessInstanceDAOImpl._executionState ) resulting in the above exception. 

By acquiring the instance lock ,when the an instance of a process is created at PartnerLinkMyRoleImpl.invokeNewInstance
will fix this issue.

Attached is a patch for this.

Nandika
                
> Intermittent IllegalArgumentException: No such channel when running an asynchronous process

> --------------------------------------------------------------------------------------------
>
>                 Key: ODE-989
>                 URL: https://issues.apache.org/jira/browse/ODE-989
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.5
>         Environment: Any
>            Reporter: Nandika Jayawardana
>         Attachments: PartnerLinkMyRoleImpl.java.patch
>
>
> When running a asynchronous  bpel process with correlations following exception happens
from time to time. 
>  ERROR {org.apache.ode.bpel.engine.BpelEngineImpl} - Scheduled job failed; jobDetail=JobDetails(
instanceId: null mexId: hqejbhcnphr7sjbbkkwpln processId: {http://wso2.org/bps/asyncTest}AsyncTest-1
type: INVOKE_INTERNAL channel: null correlatorId: null correlationKeySet: null retryCount:
null inMem: false detailsExt: {enqueue=false}) {org.apache.ode.bpel.engine.BpelEngineImpl}

> java.lang.IllegalArgumentException: No such channel; id=30 
> at org.apache.ode.jacob.vpu.ExecutionQueueImpl.findChannelFrame(ExecutionQueueImpl.java:205)

> at org.apache.ode.jacob.vpu.ExecutionQueueImpl.consumeExport(ExecutionQueueImpl.java:232)

> at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.importChannel(JacobVPU.java:369)

> at org.apache.ode.jacob.JacobObject.importChannel(JacobObject.java:47) 
> at org.apache.ode.bpel.engine.BpelRuntimeContextImpl$4.run(BpelRuntimeContextImpl.java:941)

> at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source) 
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

> at java.lang.reflect.Method.invoke(Method.java:597) 
> at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451) 
> at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139) 
> at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:877)

> at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeInstance(PartnerLinkMyRoleImpl.java:248)

> at org.apache.ode.bpel.engine.BpelProcess$1.invoke(BpelProcess.java:288) 
> at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:224) 
> at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:279) 
> at org.apache.ode.bpel.engine.BpelProcess.handleJobDetails(BpelProcess.java:434) 
> at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:553)

> at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:449)

> at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:524)

> at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:518)

> at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:271)

> at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:226)

> at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:518)

> at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:502)

> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 
> at java.util.concurrent.FutureTask.run(FutureTask.java:138) 
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
> at java.lang.Thread.run(Thread.java:662) 
> ERROR {org.apache.ode.bpel.engine.BpelEngineImpl} - Scheduled job failed; jobDetail=JobDetails(
instanceId: null mexId: hqejbhcnphr7sjbbkkwp8g processId: {http://wso2.org/bps/asyncTest}AsyncTest-1
type: MEX_MATCHER channel: null correlatorId: null correlationKeySet: null retryCount: null
inMem: false detailsExt: {enqueue=false}) {org.apache.ode.bpel.engine.BpelEngineImpl} 
> java.lang.IllegalArgumentException: No such channel; id=30 
> at org.apache.ode.jacob.vpu.ExecutionQueueImpl.findChannelFrame(ExecutionQueueImpl.java:205)

> at org.apache.ode.jacob.vpu.ExecutionQueueImpl.consumeExport(ExecutionQueueImpl.java:232)

> at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.importChannel(JacobVPU.java:369)

> at org.apache.ode.jacob.JacobObject.importChannel(JacobObject.java:47) 
> at org.apache.ode.bpel.engine.BpelRuntimeContextImpl$4.run(BpelRuntimeContextImpl.java:941)

> at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source) 
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

> at java.lang.reflect.Method.invoke(Method.java:597) 
> at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451) 
> at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139) 
> at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:877)

> at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeInstance(PartnerLinkMyRoleImpl.java:248)

> at org.apache.ode.bpel.engine.BpelProcess$1.invoke(BpelProcess.java:288) 
> at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:224) 
> at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:279) 
> at org.apache.ode.bpel.engine.BpelProcess.handleJobDetails(BpelProcess.java:434) 
> at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:553)

> at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:449)

> at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:524)

> at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:518)

> at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:271)

> at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:226)

> at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:518)

> at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:502)

> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 
> at java.util.concurrent.FutureTask.run(FutureTask.java:138) 
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message