WrenSecurity/wrenidm

Unable to build arm64 image with qemu-system-arm64

Closed this issue · 2 comments

Our build works just fine on MacBook with Apple silicon (M1), however it breaks when running with qemu-system-arm64 emulation (this emulation is used by GitHub CI pipeline).

Build fails when running tests for openidm-provisioner-openicf module:

#15 1567.1 org.identityconnectors.framework.common.exceptions.ConnectorException: java.io.IOException: No such file or directory
#15 1567.1      at org.identityconnectors.framework.common.exceptions.ConnectorException.wrap(ConnectorException.java:99)
#15 1567.1      at org.identityconnectors.framework.server.impl.ConnectionListener.shutdown(ConnectionListener.java:155)
#15 1567.1      at org.identityconnectors.framework.server.impl.ConnectorServerImpl.stop(ConnectorServerImpl.java:137)
#15 1567.1      at org.forgerock.openidm.provisioner.openicf.impl.OpenICFProvisionerServiceTest.tearDown(OpenICFProvisionerServiceTest.java:365)
#15 1567.1      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
#15 1567.1      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
#15 1567.1      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
#15 1567.1      at java.base/java.lang.reflect.Method.invoke(Method.java:568)
#15 1567.1      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
#15 1567.1      at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:61)
#15 1567.1      at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:366)
#15 1567.1      at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:320)
#15 1567.1      at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:217)
#15 1567.1      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:130)
#15 1567.1      at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
#15 1567.1      at org.testng.TestRunner.privateRun(TestRunner.java:764)
#15 1567.1      at org.testng.TestRunner.run(TestRunner.java:585)
#15 1567.1      at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
#15 1567.1      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
#15 1567.1      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
#15 1567.1      at org.testng.SuiteRunner.run(SuiteRunner.java:286)
#15 1567.1      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
#15 1567.1      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
#15 1567.1      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
#15 1567.1      at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
#15 1567.1      at org.testng.TestNG.runSuites(TestNG.java:1069)
#15 1567.1      at org.testng.TestNG.run(TestNG.java:1037)
#15 1567.1      at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:136)
#15 1567.1      at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:193)
#15 1567.1      at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:94)
#15 1567.2      at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:145)
#15 1567.2      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428)
#15 1567.2      at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
#15 1567.2      at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562)
#15 1567.2      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)
#15 1567.2 Caused by: java.io.IOException: No such file or directory
#15 1567.2      at java.base/sun.nio.ch.NativeThread.signal(Native Method)
#15 1567.2      at java.base/sun.nio.ch.NioSocketImpl.close(NioSocketImpl.java:910)
#15 1567.2      at java.base/java.net.ServerSocket.close(ServerSocket.java:718)
#15 1567.2      at org.identityconnectors.framework.server.impl.ConnectionListener.shutdown(ConnectionListener.java:148)
#15 1567.2      ... 33 more

Attaching full build log from local build (with --build-arg='BUILD_ARGS=-B -DtrimStackTrace=false' option).

Adding few references:

If I understand that correctly, the exception message is nonsense. Possible race condition. We might get more information with something like strace to get system calls... that would produce enormous trace file for the whole maven build.

We have introduced docker build using the native platform in PR #160. So the qemu-system-arm64 emulation is no longer used and we can close this issue.