Uploaded image for project: 'mod-erm-usage'
  1. mod-erm-usage
  2. MODEUS-53

Harvester logs thread has been blocked message

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: TBD
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Template:
    • Sprint:
      Leipzig Sprint 86, Leipzig Sprint 87, Leipzig Sprint 88, Leipzig Sprint 89, Leipzig Sprint 90, Leipzig Sprint 91, Leipzig Sprint 122
    • Development Team:
      Leipzig

      Description

      When running the harvester for multiple UDPs (harvesting >1000 reports), the harvester logs a thread has been blocked message, for instance:

      Apr 07, 2020 10:24:32 AM io.vertx.core.impl.BlockedThreadChecker
      WARNING: Thread Thread[vert.x-worker-thread-19,5,main]=Thread[vert.x-worker-thread-19,5,main] has been blocked for 171538 ms, time limit is 60000 ms
      io.vertx.core.VertxException: Thread blocked
      	at java.util.Arrays.copyOfRange(Arrays.java:3664)
      	at java.lang.String.<init>(String.java:207)
      	at java.lang.StringBuilder.toString(StringBuilder.java:407)
      	at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$1.parse(RuntimeBuiltinLeafInfoImpl.java:199)
      	at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$1.parse(RuntimeBuiltinLeafInfoImpl.java:209)
      	at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:241)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:61)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:462)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.processText(StAXStreamConnector.java:367)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:245)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:214)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:358)
      	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:337)
      	at org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:854)
      	at org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:102)
      	at org.apache.cxf.jaxb.JAXBEncoderDecoder$2.run(JAXBEncoderDecoder.java:893)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:891)
      	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:711)
      	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:172)
      	at org.apache.cxf.wsdl.interceptors.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:194)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
      	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:833)
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1695)
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1572)
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1373)
      	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
      	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:673)
      	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
      	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:537)
      	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:446)
      	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:361)
      	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
      	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
      	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
      	at com.sun.proxy.$Proxy96.getReport(Unknown Source)
      	at org.olf.erm.usage.harvester.endpoints.CS41Impl.lambda$fetchSingleReport$1(CS41Impl.java:146)
      	at org.olf.erm.usage.harvester.endpoints.CS41Impl$$Lambda$252/543964919.handle(Unknown Source)
      	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:316)
      	at io.vertx.core.impl.ContextImpl$$Lambda$253/1785146415.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
      	at java.lang.Thread.run(Thread.java:748)
      

      The documentation states the following:

      [...] When the blocking operation lasts more than the 10 seconds, a message will be printed on the console by the blocked thread checker.

      Long blocking operations should use a dedicated thread managed by the application, which can interact with verticles using the event-bus or Context.runOnContext(Handler)

      Maybe we need to run the blocking code in a worker verticle?

        TestRail: Results

          Attachments

            Activity

              People

              Assignee:
              Tino Ryll Tino Ryll
              Reporter:
              richard.redweik Richard Redweik
              Tester Assignee:
              Annika Schröer Annika Schröer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  TestRail: Runs

                    TestRail: Cases