In the past, I've observed application testing infrastructure (on VMs) hang
due to depletion of available entropy for RNG.  VMs seem especially
susceptible to this.  Our stopgap solution was to use haveged to make
sufficient entropy available to meet the needs of the test suite.

In this case, a refactor of the test would probably be a better
alternative.  Your observation on behavior in your environment with haveged
will help inform that decision.


On Mon, Jul 29, 2024 at 10:14 AM Dan S <[email protected]> wrote:

> Yes I have a VM on an EC2 instance in AWS.
>
> On Mon, Jul 29, 2024 at 10:10 AM Paul Grey <[email protected]> wrote:
>
> > Is this by chance a virtual machine you are on?
> >
> >
> >
> https://www.exoscale.com/syslog/random-numbers-generation-in-virtual-machines/
> >
> > TL;DR: try installing haveged
> >
> >
> > On Mon, Jul 29, 2024 at 9:29 AM Dan S <[email protected]> wrote:
> >
> > > So I see the problem line is
> > > at
> > >
> > >
> >
> org.apache.nifi.processors.elasticsearch.PutElasticsearchJsonTest.testLargeInputStringHandling(PutElasticsearchJsonTest.java:471)
> > > and that line has
> > >  final String val = String.format("{\"large\": \"%s\"}",
> > > RandomStringUtils.randomAlphanumeric(10000));
> > >
> > > I am not sure though what is making the process hang.
> > >
> > > On Mon, Jul 29, 2024 at 9:11 AM Dan S <[email protected]> wrote:
> > >
> > > > Thanks Joe for the tip. Here is what I have
> > > > for org.apache.maven.surefire.booter.ForkedBooter though I am not
> sure
> > > what
> > > > to make of it.
> > > >
> > > > "main" #1 [23885] prio=5 os_prio=0 cpu=1694.03ms elapsed=158.14s
> > > > tid=0x00007f1070028ec0 nid=23885 runnable  [0x00007f1077b78000]
> > > >    java.lang.Thread.State: RUNNABLE
> > > >         at java.io.FileInputStream.readBytes([email protected]/Native
> > > > Method)
> > > >         at java.io.FileInputStream.read([email protected]
> > > > /FileInputStream.java:287)
> > > >         at java.io.FilterInputStream.read([email protected]
> > > > /FilterInputStream.java:119)
> > > >         at
> > > > sun.security.provider.NativePRNG$RandomIO.readFully([email protected]
> > > > /NativePRNG.java:426)
> > > >         at
> > > >
> > >
> >
> sun.security.provider.NativePRNG$RandomIO.ensureBufferValid([email protected]
> > > > /NativePRNG.java:529)
> > > >         at
> > > >
> > sun.security.provider.NativePRNG$RandomIO.implNextBytes([email protected]
> > > > /NativePRNG.java:548)
> > > >         - locked <0x00000007107e1a88> (a java.lang.Object)
> > > >         at
> > > >
> > >
> >
> sun.security.provider.NativePRNG$Blocking.engineNextBytes([email protected]
> > > > /NativePRNG.java:270)
> > > >         at java.security.SecureRandom.nextBytes([email protected]
> > > > /SecureRandom.java:768)
> > > >         at
> > > >
> > >
> >
> org.apache.commons.lang3.CachedRandomBits.<init>(CachedRandomBits.java:67)
> > > >         at
> > > >
> > >
> >
> org.apache.commons.lang3.RandomStringUtils.random(RandomStringUtils.java:290)
> > > >         at
> > > >
> > >
> >
> org.apache.commons.lang3.RandomStringUtils.random(RandomStringUtils.java:249)
> > > >         at
> > > >
> > >
> >
> org.apache.commons.lang3.RandomStringUtils.random(RandomStringUtils.java:147)
> > > >         at
> > > >
> > >
> >
> org.apache.commons.lang3.RandomStringUtils.random(RandomStringUtils.java:107)
> > > >         at
> > > >
> > >
> >
> org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric(RandomStringUtils.java:402)
> > > >         at
> > > >
> > >
> >
> org.apache.nifi.processors.elasticsearch.PutElasticsearchJsonTest.testLargeInputStringHandling(PutElasticsearchJsonTest.java:471)
> > > >         at
> > > >
> > >
> >
> java.lang.invoke.LambdaForm$DMH/0x00007f0ffc131000.invokeVirtual([email protected]
> > > > /LambdaForm$DMH)
> > > >         at
> > > >
> > java.lang.invoke.LambdaForm$MH/0x00007f0ffc131800.invoke([email protected]
> > > > /LambdaForm$MH)
> > > >         at
> > > java.lang.invoke.Invokers$Holder.invokeExact_MT([email protected]
> > > > /Invokers$Holder)
> > > >         at
> > > >
> > >
> >
> jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl([email protected]
> > > > /DirectMethodHandleAccessor.java:153)
> > > >         at
> > > >
> jdk.internal.reflect.DirectMethodHandleAccessor.invoke([email protected]
> > > > /DirectMethodHandleAccessor.java:103)
> > > >         at java.lang.reflect.Method.invoke([email protected]
> > > > /Method.java:580)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:728)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor$$Lambda/0x00007f0ffc0ab128.apply(Unknown
> > > > Source)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall$$Lambda/0x00007f0ffc0ab538.apply(Unknown
> > > > Source)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$$Lambda/0x00007f0ffc0de488.apply(Unknown
> > > > Source)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:218)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor$$Lambda/0x00007f0ffc19e2e0.execute(Unknown
> > > > Source)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:214)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:139)
> > > >         at
> > > >
> > >
> >
> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda/0x00007f0ffc0cbd90.execute(Unknown
> > > > Source)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda/0x00007f0ffc0cbb70.invoke(Unknown
> > > > Source)
> > > >         at
> > > >
> > org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda/0x00007f0ffc0cb758.execute(Unknown
> > > > Source)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService$$Lambda/0x00007f0ffc0cc880.accept(Unknown
> > > > Source)
> > > >         at java.util.ArrayList.forEach([email protected]
> > > > /ArrayList.java:1596)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda/0x00007f0ffc0cbd90.execute(Unknown
> > > > Source)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda/0x00007f0ffc0cbb70.invoke(Unknown
> > > > Source)
> > > >         at
> > > >
> > org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda/0x00007f0ffc0cb758.execute(Unknown
> > > > Source)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService$$Lambda/0x00007f0ffc0cc880.accept(Unknown
> > > > Source)
> > > >         at java.util.ArrayList.forEach([email protected]
> > > > /ArrayList.java:1596)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda/0x00007f0ffc0cbd90.execute(Unknown
> > > > Source)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda/0x00007f0ffc0cbb70.invoke(Unknown
> > > > Source)
> > > >         at
> > > >
> > org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask$$Lambda/0x00007f0ffc0cb758.execute(Unknown
> > > > Source)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:198)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.launcher.core.EngineExecutionOrchestrator$$Lambda/0x00007f0ffc0b5958.accept(Unknown
> > > > Source)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85)
> > > >         at
> > > >
> > >
> >
> org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
> > > >         at
> > > >
> > >
> >
> org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
> > > >         at
> > > >
> > >
> >
> org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184)
> > > >         at
> > > >
> > >
> >
> org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148)
> > > >         at
> > > >
> > >
> >
> org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
> > > >         at
> > > >
> > >
> >
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
> > > >         at
> > > >
> > >
> >
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
> > > >         at
> > > >
> > org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
> > > >         at
> > > >
> > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
> > > >
> > > > On Sun, Jul 28, 2024 at 5:34 PM Joe Witt <[email protected]> wrote:
> > > >
> > > >> Dan
> > > >>
> > > >> You can get a couple thread dumps during the build being in a hung
> > state
> > > >> and that may be quite informative.
> > > >>
> > > >> Thanks
> > > >>
> > > >> On Sun, Jul 28, 2024 at 2:27 PM Dan S <[email protected]> wrote:
> > > >>
> > > >> > Maven home: /opt/apache-maven-3.9.6 Java version: 21.0.3, vendor:
> > Red
> > > >> Hat,
> > > >> > Inc., runtime:
> /usr/lib/jvm/java-21-openjdk-21.0.3.0.9-1.el8.x86_64
> > > >> Default
> > > >> > locale: en_US, platform encoding: UTF-8 OS name: "linux", version:
> > > >> > "4.18.0-513.24.1.el8_9.x86_64", arch: "amd64", family: "unix"
> > > >> >
> > > >> > The command I am running is from top level directory
> > > >> > ./mvnw -Pcontrib-check
> > > >> >
> > > >> >
> > > >> > On Sat, Jul 27, 2024 at 12:37 PM Chris Sampson
> > > >> > <[email protected]> wrote:
> > > >> >
> > > >> > > Can you provide more information, such as:
> > > >> > > what command(s) are you running to build?
> > > >> > > what versions of Java & Maven in what OS?
> > > >> > > what error(s) are you seeing resulting in the failure?
> > > >> > >
> > > >> > >
> > > >> > > Cheers,
> > > >> > >
> > > >> > > ---
> > > >> > > Chris Sampson
> > > >> > > IT Consultant
> > > >> > > [email protected]
> > > >> > >
> > > >> > >
> > > >> > > > On 26 Jul 2024, at 21:49, Dan S <[email protected]> wrote:
> > > >> > > >
> > > >> > > > I am currently working on a feature branch for NIFI-12709
> > > >> > > > <https://issues.apache.org/jira/browse/NIFI-12709>.
> > > >> > > > I currently rebased from main where the latest commit was
> > > >> > > > 2f73ced5a6dad469fb1942cfe9a6ac61031436a4
> > > >> > > >
> > > >> > > > I consistently cannot build anymore as the build keeps on
> > hanging
> > > >> when
> > > >> > > > running
> > > >> > >
> org.apache.nifi.processors.elasticsearch.PutElasticsearchJsonTest
> > > >> > > > I have wiped out my local maven repo but I still am having the
> > > >> problem.
> > > >> > > > Is anyone else having this issue? Any suggestions on what I
> can
> > > do?
> > > >> > >
> > > >> > >
> > > >> >
> > > >>
> > > >
> > >
> >
>

Reply via email to