Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-10839

RetryingInvoker fails with millisecond timeouts (IllegalArgumentException: nanosecond timeout value out of range)

    Details

      Description

      This is because Duration stores the value as seconds + nanosecond precision, while Thread.sleep requests nanoseconds as remainder to milliseconds, i.e. less than or equal to 999_999.

      15:18:43,654 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 82) MSC000001: Failed to start service org.wildfly.clustering.cache.registry.ejb.client-mappings: org.jboss.msc.service.StartException in service org.wildfly.clustering.cache.registry.ejb.client-mappings: java.lang.IllegalArgumentException: nanosecond timeout value out of range
      	at org.wildfly.clustering.service.FunctionalService.start(FunctionalService.java:70) [wildfly-clustering-service-14.0.0.Beta2-SNAPSHOT.jar:14.0.0.Beta2-SNAPSHOT]
      	at org.wildfly.clustering.service.AsyncServiceConfigurator$AsyncService.lambda$start$0(AsyncServiceConfigurator.java:117) [wildfly-clustering-service-14.0.0.Beta2-SNAPSHOT.jar:14.0.0.Beta2-SNAPSHOT]
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) [jboss-threads-2.3.2.Final.jar:2.3.2.Final]
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985) [jboss-threads-2.3.2.Final.jar:2.3.2.Final]
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487) [jboss-threads-2.3.2.Final.jar:2.3.2.Final]
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378) [jboss-threads-2.3.2.Final.jar:2.3.2.Final]
      	at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_181]
      	at org.jboss.threads.JBossThread.run(JBossThread.java:485) [jboss-threads-2.3.2.Final.jar:2.3.2.Final]
      Caused by: java.lang.IllegalArgumentException: nanosecond timeout value out of range
      	at java.lang.Thread.sleep(Thread.java:332) [rt.jar:1.8.0_181]
      	at org.wildfly.clustering.ee.retry.RetryingInvoker.invoke(RetryingInvoker.java:60)
      	at org.wildfly.clustering.ee.retry.RetryingInvoker.invoke(RetryingInvoker.java:78)
      	at org.wildfly.clustering.server.registry.CacheRegistry.<init>(CacheRegistry.java:105)
      	at org.wildfly.clustering.server.registry.CacheRegistryFactoryServiceConfigurator.apply(CacheRegistryFactoryServiceConfigurator.java:64)
      	at org.wildfly.clustering.server.registry.CacheRegistryFactoryServiceConfigurator.apply(CacheRegistryFactoryServiceConfigurator.java:48)
      	at org.wildfly.clustering.server.registry.FunctionalRegistryFactory.createRegistry(FunctionalRegistryFactory.java:55)
      	at org.wildfly.clustering.server.registry.RegistryServiceConfigurator.get(RegistryServiceConfigurator.java:69)
      	at org.wildfly.clustering.server.registry.RegistryServiceConfigurator.get(RegistryServiceConfigurator.java:53)
      	at org.wildfly.clustering.service.FunctionalService.start(FunctionalService.java:67) [wildfly-clustering-service-14.0.0.Beta2-SNAPSHOT.jar:14.0.0.Beta2-SNAPSHOT]
      	... 7 more
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rhusar Radoslav Husar
                  Reporter:
                  rhusar Radoslav Husar
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: