JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   On Github   Forums 
February 25, 2020, 07:14:02 AM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: java.util.ConcurrentModificationException when calling getAllJobIds() api  (Read 2706 times)

codemonkey

  • JPPF Council Member
  • *****
  • Posts: 138

Hello Laurent, there seems to be a concurrency issue the getAllJobIds api. Looks like the a job is about completed while a call is going to the api:

Code: [Select]
javax.management.RuntimeMBeanException: java.util.ConcurrentModificationException
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:856)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:869)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:670)
at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
at javax.management.remote.generic.ServerIntermediary.handleRequest(ServerIntermediary.java:222)
at javax.management.remote.generic.ServerIntermediary$PrivilegedRequestJob.run(ServerIntermediary.java:951)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.generic.ServerIntermediary$RequestHandler.handleMBSReqMessage(ServerIntermediary.java:727)
at javax.management.remote.generic.ServerIntermediary$RequestHandler.execute(ServerIntermediary.java:629)
at com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl$RemoteJob.run(ServerSynchroMessageConnectionImpl.java:266)
at com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(ThreadService.java:208)
at com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59)
Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at java.util.AbstractCollection.toArray(AbstractCollection.java:171)
at java.util.Collections$UnmodifiableCollection.toArray(Collections.java:1002)
at org.jppf.server.job.management.DriverJobManagement.getAllJobIds(DriverJobManagement.java:172)
at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
at com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:65)
at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:216)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:666)


Currently using version 3.0.1
Many Thanks!!!
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2258
    • JPPF Web site
Re: java.util.ConcurrentModificationException when calling getAllJobIds() api
« Reply #1 on: November 02, 2012, 08:34:31 AM »

Hello,

I have registered a bug report for this issue: JPPF-95 ConcurrentModificationException in DriverJobManagement.getAllJobIds() .
I have implemented a temporary fix, which you can download there: http://www.jppf.org/private/3.0.1/jppf-server.zip
The zip file also includes the modified source jar, if you need to debug. To deploy it, simply replace the jppf-server.jar file in your driver installation with the one provided in the zip.
Can you give it a try and let us know if this resolves the issue? Upon your confirmation I will publish an official patch.

Thanks,
-Laurent
Logged

codemonkey

  • JPPF Council Member
  • *****
  • Posts: 138
Re: java.util.ConcurrentModificationException when calling getAllJobIds() api
« Reply #2 on: November 02, 2012, 03:19:01 PM »

Thank you very much for the quick response. This patch produces the following error:
Code: [Select]
Exception in thread "TaskQueueChecker" java.lang.NoSuchMethodError: org.jppf.utils.TraversalList.asString()Ljava/lang/String;
at org.jppf.server.queue.JPPFPriorityQueue.removeBundle(JPPFPriorityQueue.java:277)
at org.jppf.server.queue.JPPFPriorityQueue.nextBundle(JPPFPriorityQueue.java:186)
at org.jppf.server.nio.nodeserver.TaskQueueChecker.dispatchJobToChannel(TaskQueueChecker.java:262)
at org.jppf.server.nio.nodeserver.TaskQueueChecker.dispatch(TaskQueueChecker.java:195)
at org.jppf.server.nio.nodeserver.TaskQueueChecker.run(TaskQueueChecker.java:162)

TraversalList.asString() method is not available in this version. I checked the source of jppf-common-node in 3.0.1 and TraversalList.java doesn't contain this method







Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2258
    • JPPF Web site
Re: java.util.ConcurrentModificationException when calling getAllJobIds() api
« Reply #3 on: November 03, 2012, 07:49:40 AM »

Hello,

I apologize for this, I forgot other bug fixes had been done on top of 3.0.1
I have added this fix to JPPF 3.0.1 patch 01, I invite you to download and apply it.

Sincerely,
-Laurent
Logged

codemonkey

  • JPPF Council Member
  • *****
  • Posts: 138
Re: java.util.ConcurrentModificationException when calling getAllJobIds() api
« Reply #4 on: November 05, 2012, 05:25:58 PM »

Thanks again Laurent for the quick response. I've installed and everything is looking great. This issue is not easily reproduce and I will continue to test.

Thanks again!
Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads