Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-9356

Thread safety issue when unregistering a wiki component

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.1
    • Fix Version/s: 5.2-milestone-1
    • Component/s: Component
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Seems we have some thread safety issue. I've noticed the following in the myxwiki.org logs:

      2013-07-24 10:44:20,196 [http://xwikiday.myxwiki.org/xwiki/bin/view/ColabVeille/LeLive?xpage=print&xpage=print&xpage=print&xpage=print&xpage=print&viewer=history] ERROR .o.i.DefaultObservationManager - Failed to send event [org.xwiki.bridge.event.DocumentUpdatedEvent@a41b037a] to listener [org.xwiki.component.wiki.internal.DefaultWikiComponentManagerEventListener@10ad68f6] 
      java.util.ConcurrentModificationException: null
          at java.util.HashMap$HashIterator.nextEntry(Unknown Source) ~[na:1.7.0_17]
          at java.util.HashMap$KeyIterator.next(Unknown Source) ~[na:1.7.0_17]
          at org.xwiki.component.wiki.internal.DefaultWikiComponentManager.unregisterWikiComponents(DefaultWikiComponentManager.java:132) ~[xwiki-platform-component-wiki-5.0.1.jar:na]
          at org.xwiki.component.wiki.internal.DefaultWikiComponentManagerEventListener.unregisterComponents(DefaultWikiComponentManagerEventListener.java:202) ~[xwiki-platform-component-wiki-5.0.1.jar:na]
          at org.xwiki.component.wiki.internal.DefaultWikiComponentManagerEventListener.registerComponents(DefaultWikiComponentManagerEventListener.java:170) ~[xwiki-platform-component-wiki-5.0.1.jar:na]
          at org.xwiki.component.wiki.internal.DefaultWikiComponentManagerEventListener.onEvent(DefaultWikiComponentManagerEventListener.java:120) ~[xwiki-platform-component-wiki-5.0.1.jar:na]
          at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:299) [xwiki-commons-observation-local-5.0.1.jar:na]
          at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:264) [xwiki-commons-observation-local-5.0.1.jar:na]
          at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1455) [xwiki-platform-legacy-oldcore-5.0.1.jar:na]
          at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1389) [xwiki-platform-legacy-oldcore-5.0.1.jar:na]
          at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1384) [xwiki-platform-legacy-oldcore-5.0.1.jar:na]
          at com.xpn.xwiki.XWiki.initializeMandatoryClasses(XWiki.java:872) [xwiki-platform-legacy-oldcore-5.0.1.jar:na]
          at com.xpn.xwiki.XWiki.updateDatabase(XWiki.java:936) [xwiki-platform-legacy-oldcore-5.0.1.jar:na]
          at com.xpn.xwiki.XWiki.updateDatabase(XWiki.java:913) [xwiki-platform-legacy-oldcore-5.0.1.jar:na]
          at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:522) [xwiki-platform-legacy-oldcore-5.0.1.jar:na]
          at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:156) [xwiki-platform-legacy-oldcore-5.0.1.jar:na]
          at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:123) [xwiki-platform-legacy-oldcore-5.0.1.jar:na]
          at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) [struts-1.2.9.jar:1.2.9]
          at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) [struts-1.2.9.jar:1.2.9]
          at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) [struts-1.2.9.jar:1.2.9]
          at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) [struts-1.2.9.jar:1.2.9]
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) [servlet-api.jar:na]
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [servlet-api.jar:na]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) [catalina.jar:6.0.32]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.32]
          at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:120) [xwiki-platform-legacy-oldcore-5.0.1.jar:na]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.32]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.32]
          at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144) [xwiki-platform-wysiwyg-server-5.0.1.jar:na]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.32]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.32]
          at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66) [xwiki-platform-webdav-server-5.0.1.jar:na]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.32]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.32]
          at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) [xwiki-platform-container-servlet-5.0.1.jar:na]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.32]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.32]
          at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111) [xwiki-platform-container-servlet-5.0.1.jar:na]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.32]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.32]
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) [catalina.jar:6.0.32]
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [catalina.jar:6.0.32]
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [catalina.jar:6.0.32]
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [catalina.jar:6.0.32]
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [catalina.jar:6.0.32]
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) [catalina.jar:6.0.32]
          at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) [tomcat-coyote.jar:6.0.32]
          at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) [tomcat-coyote.jar:6.0.32]
          at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776) [tomcat-coyote.jar:6.0.32]
          at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705) [tomcat-coyote.jar:6.0.32]
          at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898) [tomcat-coyote.jar:6.0.32]
          at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) [tomcat-coyote.jar:6.0.32]
          at java.lang.Thread.run(Unknown Source) [na:1.7.0_17]
      

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              vmassol Vincent Massol
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: