java.util.ConcurrentModificationException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Context: * Hadoop-2.3.0 * Using Oozie 4.0.1 * Pig version 0.11.x The job is submitted by Oozie to launch Pig script. The following exception traces were found on MR task log: In syslog: {noformat} 2014-10-24 20:37:29,317 WARN [Thread-5] org.apache.hadoop.util.ShutdownHookManager: ShutdownHook '' failed, java.util.ConcurrentModificationException java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966) at java.util.LinkedList$ListItr.next(LinkedList.java:888) at org.apache.hadoop.yarn.ContainerLogAppender.close(ContainerLogAppender.java:94) at org.apache.log4j.helpers.AppenderAttachableImpl.removeAllAppenders(AppenderAttachableImpl.java:141) at org.apache.log4j.Category.removeAllAppenders(Category.java:891) at org.apache.log4j.Hierarchy.shutdown(Hierarchy.java:471) at org.apache.log4j.LogManager.shutdown(LogManager.java:267) at org.apache.hadoop.mapred.TaskLog.syncLogsShutdown(TaskLog.java:286) at org.apache.hadoop.mapred.TaskLog$2.run(TaskLog.java:339) at org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:54) 2014-10-24 20:37:29,395 INFO [main] org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Stopping MapTask metrics system... {noformat} in stderr: {noformat} java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966) at java.util.LinkedList$ListItr.next(LinkedList.java:888) at org.apache.hadoop.yarn.ContainerLogAppender.close(ContainerLogAppender.java:94) at org.apache.log4j.helpers.AppenderAttachableImpl.removeAllAppenders(AppenderAttachableImpl.java:141) at org.apache.log4j.Category.removeAllAppenders(Category.java:891) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:759) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:440) at org.apache.pig.Main.configureLog4J(Main.java:740) at org.apache.pig.Main.run(Main.java:384) at org.apache.pig.PigRunner.run(PigRunner.java:49) at org.apache.oozie.action.hadoop.PigMain.runPigJob(PigMain.java:283) at org.apache.oozie.action.hadoop.PigMain.run(PigMain.java:223) at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:37) at org.apache.oozie.action.hadoop.PigMain.main(PigMain.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:226) at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54) at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:342) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:167) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162) {noformat}
    via by Mohammad Kamrul Islam,
  • Context: * Hadoop-2.3.0 * Using Oozie 4.0.1 * Pig version 0.11.x The job is submitted by Oozie to launch Pig script. The following exception traces were found on MR task log: In syslog: {noformat} 2014-10-24 20:37:29,317 WARN [Thread-5] org.apache.hadoop.util.ShutdownHookManager: ShutdownHook '' failed, java.util.ConcurrentModificationException java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966) at java.util.LinkedList$ListItr.next(LinkedList.java:888) at org.apache.hadoop.yarn.ContainerLogAppender.close(ContainerLogAppender.java:94) at org.apache.log4j.helpers.AppenderAttachableImpl.removeAllAppenders(AppenderAttachableImpl.java:141) at org.apache.log4j.Category.removeAllAppenders(Category.java:891) at org.apache.log4j.Hierarchy.shutdown(Hierarchy.java:471) at org.apache.log4j.LogManager.shutdown(LogManager.java:267) at org.apache.hadoop.mapred.TaskLog.syncLogsShutdown(TaskLog.java:286) at org.apache.hadoop.mapred.TaskLog$2.run(TaskLog.java:339) at org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:54) 2014-10-24 20:37:29,395 INFO [main] org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Stopping MapTask metrics system... {noformat} in stderr: {noformat} java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966) at java.util.LinkedList$ListItr.next(LinkedList.java:888) at org.apache.hadoop.yarn.ContainerLogAppender.close(ContainerLogAppender.java:94) at org.apache.log4j.helpers.AppenderAttachableImpl.removeAllAppenders(AppenderAttachableImpl.java:141) at org.apache.log4j.Category.removeAllAppenders(Category.java:891) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:759) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:440) at org.apache.pig.Main.configureLog4J(Main.java:740) at org.apache.pig.Main.run(Main.java:384) at org.apache.pig.PigRunner.run(PigRunner.java:49) at org.apache.oozie.action.hadoop.PigMain.runPigJob(PigMain.java:283) at org.apache.oozie.action.hadoop.PigMain.run(PigMain.java:223) at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:37) at org.apache.oozie.action.hadoop.PigMain.main(PigMain.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:226) at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54) at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:342) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:167) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162) {noformat}
    via by Mohammad Kamrul Islam,
  • Using jersey under the hood of dropwizard, I sometimes get the following error. It does not happen a lot, but it does happen sometimes... {code} org.eclipse.jetty.servlet.ServletHandler: /pixel.gif/ ! java.util.ConcurrentModificationException: null ! at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953) collector.log ! at java.util.LinkedList$ListItr.next(LinkedList.java:886) ! at com.sun.jersey.spi.container.servlet.WebComponent$Writer.writeHeaders(WebComponent.java:339) ! at com.sun.jersey.spi.container.servlet.WebComponent$Writer.writeStatusAndHeaders(WebComponent.java:328) ! at com.sun.jersey.spi.container.servlet.WebComponent$Writer.initiate(WebComponent.java:319) ! at com.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebComponent.java:291) ! at com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.write(ContainerResponse.java:129) ! at com.sun.jersey.core.impl.provider.entity.ByteArrayProvider.writeTo(ByteArrayProvider.java:95) ! at com.sun.jersey.core.impl.provider.entity.ByteArrayProvider.writeTo(ByteArrayProvider.java:59) ! at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:302) ! at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1510) ! at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) ! at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) ! at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) ! at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540) ! at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715) ! at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1515) ! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) ! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:348) ! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:127) ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486) ! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486) ! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:519) ! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1097) ! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:448) ! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1031) ! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136) ! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:173) ! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) ! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:162) ! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) ! at org.eclipse.jetty.server.Server.handle(Server.java:446) ! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:271) ! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:246) ! at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358) ! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601) ! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532) ! at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65] {code}
    via by rantav,
    • java.util.ConcurrentModificationException: null at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761) at java.util.LinkedList$ListItr.next(LinkedList.java:696) at org.apache.hadoop.yarn.ContainerLogAppender.close(ContainerLogAppender.java:81) at org.apache.hadoop.yarn.TestContainerLogAppender.testAppendInClose(TestContainerLogAppender.java:44)

    Users with the same issue

    HronomHronom
    7 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    osvzsosvzs
    1 times, last one,
    tvrmsmithtvrmsmith
    1 times, last one,
    1 more bugmates