Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ipcsocket with junixsocket library #1852

Merged
merged 9 commits into from
May 2, 2022
Merged

Conversation

sake92
Copy link
Contributor

@sake92 sake92 commented Apr 28, 2022

https://github.com/kohlschutter/junixsocket seems much more robust, especially for Windows.
sbt-ipcsocket implements windows support via named pipes, which are similar to unix pipes.
junixsocket uses named pipes directly on windows, since they are supported now in Win10 (from 2017).

https://kohlschutter.github.io/junixsocket/unixsockets.html
https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/

Fixes #1310

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice. I like it. Thank you, @sake92 !

There are some failing CI tests.

mill.main.ClientServerTests.hello.envVars is most likely caused by your change.

-------------------------------- Running Tests --------------------------------
 Error: Exception in thread "Thread-0" java.lang.NoClassDefFoundError: Could not initialize class org.newsclub.net.unix.AFUNIXSocketAddress
	at mill.main.Server.$anonfun$run$2(MillServerMain.scala:101)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at mill.main.Server$.lockBlock(MillServerMain.scala:226)
	at mill.main.Server.$anonfun$run$1(MillServerMain.scala:98)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at mill.main.Server$.tryLockBlock(MillServerMain.scala:234)
	at mill.main.Server.run(MillServerMain.scala:95)
	at mill.main.ClientServerTests$.$anonfun$spawnEchoServer$1(ClientServerTests.scala:67)
	at java.base/java.lang.Thread.run(Thread.java:829)
X mill.main.ClientServerTests.hello.envVars 5030ms 
  java.lang.Exception: Failed to connect to server
    mill.main.client.MillClientMain.run(MillClientMain.java:197)
    mill.main.ClientServerTests$.$anonfun$runClientAux$1(ClientServerTests.scala:86)
    mill.main.Server$.lockBlock(MillServerMain.scala:226)
    mill.main.ClientServerTests$.runClientAux(ClientServerTests.scala:77)
    mill.main.ClientServerTests$.runClient$1(ClientServerTests.scala:96)
    mill.main.ClientServerTests$.$anonfun$tests$2(ClientServerTests.scala:107)
  java.lang.NoClassDefFoundError: Could not initialize class org.newsclub.net.unix.AFUNIXSocketAddress
    mill.main.client.MillClientMain.run(MillClientMain.java:189)
    mill.main.ClientServerTests$.$anonfun$runClientAux$1(ClientServerTests.scala:86)
    mill.main.Server$.lockBlock(MillServerMain.scala:226)
    mill.main.ClientServerTests$.runClientAux(ClientServerTests.scala:77)
    mill.main.ClientServerTests$.runClient$1(ClientServerTests.scala:96)
    mill.main.ClientServerTests$.$anonfun$tests$2(ClientServerTests.scala:107)

But I have no idea about these:

-------------------------------- Running Tests --------------------------------
X mill.integration.thirdparty.local.JawnTests.scala21111 19ms 
  java.lang.Exception: Resource amm-dependencies.txt not found
    ammonite.main.Defaults$.alreadyLoadedDependencies(Defaults.scala:43)
    ammonite.MainRunner.initMain(MainRunner.scala:141)
    mill.main.MainRunner.initMain(MainRunner.scala:167)
    mill.main.MainRunner.watchLoop2(MainRunner.scala:67)
    mill.main.MainRunner.runScript(MainRunner.scala:92)
    mill.util.ScriptTestSuite.eval(ScriptTestSuite.scala:61)
    mill.integration.thirdparty.JawnTests.check$1(JawnTests.scala:13)
    mill.integration.thirdparty.JawnTests.$anonfun$tests$11(JawnTests.scala:31)
X mill.integration.thirdparty.local.JawnTests.scala2123 20ms 
  java.lang.Exception: Resource amm-dependencies.txt not found
    ammonite.main.Defaults$.alreadyLoadedDependencies(Defaults.scala:43)
    ammonite.MainRunner.initMain(MainRunner.scala:141)
    mill.main.MainRunner.initMain(MainRunner.scala:167)
    mill.main.MainRunner.watchLoop2(MainRunner.scala:67)
    mill.main.MainRunner.runScript(MainRunner.scala:92)
    mill.util.ScriptTestSuite.eval(ScriptTestSuite.scala:61)
    mill.integration.thirdparty.JawnTests.check$1(JawnTests.scala:13)
    mill.integration.thirdparty.JawnTests.$anonfun$tests$12(JawnTests.scala:32)
-------------------------------- Running Tests --------------------------------
X mill.integration.thirdparty.local.AcyclicTests.scala2118 18ms 
  java.lang.Exception: Resource amm-dependencies.txt not found
    ammonite.main.Defaults$.alreadyLoadedDependencies(Defaults.scala:43)
    ammonite.MainRunner.initMain(MainRunner.scala:141)
    mill.main.MainRunner.initMain(MainRunner.scala:167)
    mill.main.MainRunner.watchLoop2(MainRunner.scala:67)
    mill.main.MainRunner.runScript(MainRunner.scala:92)
    mill.util.ScriptTestSuite.eval(ScriptTestSuite.scala:61)
    mill.integration.thirdparty.AcyclicTests.check$1(AcyclicTests.scala:11)
    mill.integration.thirdparty.AcyclicTests.$anonfun$tests$12(AcyclicTests.scala:27)
    scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
    mill.util.TestUtil$.disableInJava9OrAbove(TestUtil.scala:84)
    mill.integration.thirdparty.AcyclicTests.$anonfun$tests$11(AcyclicTests.scala:27)
X mill.integration.thirdparty.local.AcyclicTests.scala2125 10ms 
  java.lang.Exception: Resource amm-dependencies.txt not found
    ammonite.main.Defaults$.alreadyLoadedDependencies(Defaults.scala:43)
    ammonite.MainRunner.initMain(MainRunner.scala:141)
    mill.main.MainRunner.initMain(MainRunner.scala:167)
    mill.main.MainRunner.watchLoop2(MainRunner.scala:67)
    mill.main.MainRunner.runScript(MainRunner.scala:92)
    mill.util.ScriptTestSuite.eval(ScriptTestSuite.scala:61)
    mill.integration.thirdparty.AcyclicTests.check$1(AcyclicTests.scala:11)
    mill.integration.thirdparty.AcyclicTests.$anonfun$tests$13(AcyclicTests.scala:28)

I saw these before, but sporadicly. Maybe, we can ignore them for now. Might be self-fixed in next CI run.

@sake92
Copy link
Contributor Author

sake92 commented Apr 30, 2022

@lefou thanks!
Unfortunately I cannot reproduce the NoClassDefFoundError error locally.. :/
Do you have any ideas what might be causing it? I didnt touch any module dependencies, everything except that replaced dependency is same as before.

@lefou
Copy link
Member

lefou commented May 1, 2022

@sake92 Can you rebase on latest main branch (or merge)? I made some changes that should fix the tests which fail with the weird missing amm-dependencies.txt message.

@lefou
Copy link
Member

lefou commented May 1, 2022

This is the error message from CI:

-------------------------------- Running Tests --------------------------------
[#0] [#0] Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: Could not load native library junixsocket-native for architecture amd64-WindowsServer2022
[#0] [#0] 	at org.newsclub.net.unix.NativeLibraryLoader.initCantLoadLibraryError(NativeLibraryLoader.java:282)
[#0] [#0] 	at org.newsclub.net.unix.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:264)
[#0] [#0] 	at org.newsclub.net.unix.NativeUnixSocket.<clinit>(NativeUnixSocket.java:61)
[#0] [#0] 	at org.newsclub.net.unix.AFUNIXSocketAddress.<clinit>(AFUNIXSocketAddress.java:50)
[#0] [#0] 	at mill.main.Server.$anonfun$run$2(MillServerMain.scala:101)
[#0] [#0] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[#0] [#0] 	at mill.main.Server$.lockBlock(MillServerMain.scala:226)
[#0] [#0] 	at mill.main.Server.$anonfun$run$1(MillServerMain.scala:98)
[#0] [#0] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[#0] [#0] 	at mill.main.Server$.tryLockBlock(MillServerMain.scala:234)
[#0] [#0] 	at mill.main.Server.run(MillServerMain.scala:95)
[#0] [#0] 	at mill.main.ClientServerTests$.$anonfun$spawnEchoServer$1(ClientServerTests.scala:67)
[#0] [#0] 	at java.base/java.lang.Thread.run(Thread.java:829)
[#0] [#0] 	Suppressed: java.lang.Exception: No library specified with -Dorg.newsclub.net.unix.library.override=
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader.loadLibraryOverride(NativeLibraryLoader.java:217)
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:240)
[#0] [#0] 		... 11 more
[#0] [#0] 	Suppressed: java.lang.ClassNotFoundException: org.newsclub.lib.junixsocket.custom.NarMetadata
[#0] [#0] 		at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
[#0] [#0] 		at mill.api.ClassLoader$$anon$1.findClass(ClassLoader.scala:47)
[#0] [#0] 		at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
[#0] [#0] 		at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[#0] [#0] 		at java.base/java.lang.Class.forName0(Native Method)
[#0] [#0] 		at java.base/java.lang.Class.forName(Class.java:315)
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader.tryProviderClass(NativeLibraryLoader.java:57)
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader.initLibraryCandidates(NativeLibraryLoader.java:298)
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:246)
[#0] [#0] 		... 11 more
[#0] [#0] 	Suppressed: java.lang.UnsatisfiedLinkError: no junixsocket-native-2.4.0 in java.library.path: [C:\hostedtoolcache\windows\jdk\11.0.15\x64\bin, C:\Windows\Sun\Java\bin, C:\Windows\system32, C:\Windows, C:\Program Files\PowerShell\7, C:\hostedtoolcache\windows\jdk\11.0.15\x64\bin, C:\Program Files\MongoDB\Server\5.0\bin, C:\aliyun-cli, C:\vcpkg, C:\Program Files (x86)\NSIS\, C:\tools\zstd, C:\Program Files\Mercurial\, C:\hostedtoolcache\windows\stack\2.7.5\x64, C:\cabal\bin, C:\\ghcup\bin, C:\tools\ghc-9.2.2\bin, C:\Program Files\dotnet, C:\mysql\bin, C:\Program Files\R\R-4.2.0\bin\x64, C:\SeleniumWebDrivers\GeckoDriver, C:\Program Files (x86)\sbt\bin, C:\Program Files (x86)\GitHub CLI, C:\Program Files\Git\bin, C:\Program Files (x86)\pipx_bin, C:\hostedtoolcache\windows\go\1.17.9\x64\bin, C:\hostedtoolcache\windows\Python\3.9.12\x64\Scripts, C:\hostedtoolcache\windows\Python\3.9.12\x64, C:\hostedtoolcache\windows\Ruby\3.0.4\x64\bin, C:\tools\kotlinc\bin, C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.322-6\x64\bin, C:\npm\prefix, C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin, C:\ProgramData\kind, C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin, C:\Windows\system32, C:\Windows, C:\Windows\System32\Wbem, C:\Windows\System32\WindowsPowerShell\v1.0\, C:\Windows\System32\OpenSSH\, C:\Program Files\dotnet\, C:\ProgramData\Chocolatey\bin, C:\Program Files\Docker, C:\Program Files\PowerShell\7\, C:\Program Files\Microsoft\Web Platform Installer\, C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\, C:\Program Files\Microsoft SQL Server\150\Tools\Binn\, C:\Program Files\nodejs\, C:\Program Files\OpenSSL\bin, C:\Strawberry\c\bin, C:\Strawberry\perl\site\bin, C:\Strawberry\perl\bin, C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin, C:\Program Files\TortoiseSVN\bin, C:\Program Files\CMake\bin, C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.5\bin, C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code, C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager, C:\Program Files\Git\cmd, C:\Program Files\Git\mingw64\bin, C:\Program Files\Git\usr\bin, C:\Program Files\GitHub CLI\, c:\tools\php, C:\Program Files (x86)\sbt\bin, C:\SeleniumWebDrivers\ChromeDriver\, C:\SeleniumWebDrivers\EdgeDriver\, C:\Program Files\Amazon\AWSCLIV2\, C:\Program Files\Amazon\SessionManagerPlugin\bin\, C:\Program Files\Amazon\AWSSAMCLI\bin\, C:\Program Files\Microsoft SQL Server\130\Tools\Binn\, C:\Program Files\LLVM\bin, C:\Users\runneradmin\.dotnet\tools, C:\Users\runneradmin\.cargo\bin, C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps, .]
[#0] [#0] 		at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2673)
[#0] [#0] 		at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
[#0] [#0] 		at java.base/java.lang.System.loadLibrary(System.java:1873)
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader$StandardLibraryCandidate.load(NativeLibraryLoader.java:117)
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:251)
[#0] [#0] 		... 11 more
X mill.main.ClientServerTests.hello.envVars 5025ms 
  java.lang.Exception: Failed to connect to server
    mill.main.client.MillClientMain.run(MillClientMain.java:198)
    mill.main.ClientServerTests$.$anonfun$runClientAux$1(ClientServerTests.scala:86)
    mill.main.Server$.lockBlock(MillServerMain.scala:226)
    mill.main.ClientServerTests$.runClientAux(ClientServerTests.scala:77)
    mill.main.ClientServerTests$.runClient$1(ClientServerTests.scala:96)
    mill.main.ClientServerTests$.$anonfun$tests$2(ClientServerTests.scala:107)
  java.lang.NoClassDefFoundError: Could not initialize class org.newsclub.net.unix.AFUNIXSocketAddress
    mill.main.client.MillClientMain.run(MillClientMain.java:189)
    mill.main.ClientServerTests$.$anonfun$runClientAux$1(ClientServerTests.scala:86)
    mill.main.Server$.lockBlock(MillServerMain.scala:226)
    mill.main.ClientServerTests$.runClientAux(ClientServerTests.scala:77)
    mill.main.ClientServerTests$.runClient$1(ClientServerTests.scala:96)
    mill.main.ClientServerTests$.$anonfun$tests$2(ClientServerTests.scala:107)

if (scala.util.Properties.isWin) {
// workaround for CI issue
// https://github.com/com-lihaoyi/mill/pull/1852#issuecomment-1114332274
System.setProperty("os.name", "Windows10")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit, although I'd like to find a solution, which does not tamper with JVM default properties. Maybe, setting the org.newsclub.net.unix.library.override instead also works around the wrong detection on Windows?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might not work that easily, as this property is meant to point to an unpacked library.

I will merge as is. If you by any change find a better solution, please open a new PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, thought about it but it requires a full path. I will make an issue or fix upstream.

@lefou lefou merged commit d3d866a into com-lihaoyi:main May 2, 2022
@lefou lefou added this to the after 0.10.3 milestone May 2, 2022
@lefou
Copy link
Member

lefou commented May 2, 2022

Thank you, @sake92 !

@lefou
Copy link
Member

lefou commented May 9, 2022

This is the error message from CI:

-------------------------------- Running Tests --------------------------------
[#0] [#0] Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: Could not load native library junixsocket-native for architecture amd64-WindowsServer2022
[#0] [#0] 	at org.newsclub.net.unix.NativeLibraryLoader.initCantLoadLibraryError(NativeLibraryLoader.java:282)
[#0] [#0] 	at org.newsclub.net.unix.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:264)
[#0] [#0] 	at org.newsclub.net.unix.NativeUnixSocket.<clinit>(NativeUnixSocket.java:61)
[#0] [#0] 	at org.newsclub.net.unix.AFUNIXSocketAddress.<clinit>(AFUNIXSocketAddress.java:50)
[#0] [#0] 	at mill.main.Server.$anonfun$run$2(MillServerMain.scala:101)
[#0] [#0] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[#0] [#0] 	at mill.main.Server$.lockBlock(MillServerMain.scala:226)
[#0] [#0] 	at mill.main.Server.$anonfun$run$1(MillServerMain.scala:98)
[#0] [#0] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[#0] [#0] 	at mill.main.Server$.tryLockBlock(MillServerMain.scala:234)
[#0] [#0] 	at mill.main.Server.run(MillServerMain.scala:95)
[#0] [#0] 	at mill.main.ClientServerTests$.$anonfun$spawnEchoServer$1(ClientServerTests.scala:67)
[#0] [#0] 	at java.base/java.lang.Thread.run(Thread.java:829)
[#0] [#0] 	Suppressed: java.lang.Exception: No library specified with -Dorg.newsclub.net.unix.library.override=
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader.loadLibraryOverride(NativeLibraryLoader.java:217)
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:240)
[#0] [#0] 		... 11 more
[#0] [#0] 	Suppressed: java.lang.ClassNotFoundException: org.newsclub.lib.junixsocket.custom.NarMetadata
[#0] [#0] 		at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
[#0] [#0] 		at mill.api.ClassLoader$$anon$1.findClass(ClassLoader.scala:47)
[#0] [#0] 		at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
[#0] [#0] 		at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[#0] [#0] 		at java.base/java.lang.Class.forName0(Native Method)
[#0] [#0] 		at java.base/java.lang.Class.forName(Class.java:315)
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader.tryProviderClass(NativeLibraryLoader.java:57)
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader.initLibraryCandidates(NativeLibraryLoader.java:298)
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:246)
[#0] [#0] 		... 11 more
[#0] [#0] 	Suppressed: java.lang.UnsatisfiedLinkError: no junixsocket-native-2.4.0 in java.library.path: [C:\hostedtoolcache\windows\jdk\11.0.15\x64\bin, C:\Windows\Sun\Java\bin, C:\Windows\system32, C:\Windows, C:\Program Files\PowerShell\7, C:\hostedtoolcache\windows\jdk\11.0.15\x64\bin, C:\Program Files\MongoDB\Server\5.0\bin, C:\aliyun-cli, C:\vcpkg, C:\Program Files (x86)\NSIS\, C:\tools\zstd, C:\Program Files\Mercurial\, C:\hostedtoolcache\windows\stack\2.7.5\x64, C:\cabal\bin, C:\\ghcup\bin, C:\tools\ghc-9.2.2\bin, C:\Program Files\dotnet, C:\mysql\bin, C:\Program Files\R\R-4.2.0\bin\x64, C:\SeleniumWebDrivers\GeckoDriver, C:\Program Files (x86)\sbt\bin, C:\Program Files (x86)\GitHub CLI, C:\Program Files\Git\bin, C:\Program Files (x86)\pipx_bin, C:\hostedtoolcache\windows\go\1.17.9\x64\bin, C:\hostedtoolcache\windows\Python\3.9.12\x64\Scripts, C:\hostedtoolcache\windows\Python\3.9.12\x64, C:\hostedtoolcache\windows\Ruby\3.0.4\x64\bin, C:\tools\kotlinc\bin, C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.322-6\x64\bin, C:\npm\prefix, C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin, C:\ProgramData\kind, C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin, C:\Windows\system32, C:\Windows, C:\Windows\System32\Wbem, C:\Windows\System32\WindowsPowerShell\v1.0\, C:\Windows\System32\OpenSSH\, C:\Program Files\dotnet\, C:\ProgramData\Chocolatey\bin, C:\Program Files\Docker, C:\Program Files\PowerShell\7\, C:\Program Files\Microsoft\Web Platform Installer\, C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\, C:\Program Files\Microsoft SQL Server\150\Tools\Binn\, C:\Program Files\nodejs\, C:\Program Files\OpenSSL\bin, C:\Strawberry\c\bin, C:\Strawberry\perl\site\bin, C:\Strawberry\perl\bin, C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin, C:\Program Files\TortoiseSVN\bin, C:\Program Files\CMake\bin, C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.5\bin, C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code, C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager, C:\Program Files\Git\cmd, C:\Program Files\Git\mingw64\bin, C:\Program Files\Git\usr\bin, C:\Program Files\GitHub CLI\, c:\tools\php, C:\Program Files (x86)\sbt\bin, C:\SeleniumWebDrivers\ChromeDriver\, C:\SeleniumWebDrivers\EdgeDriver\, C:\Program Files\Amazon\AWSCLIV2\, C:\Program Files\Amazon\SessionManagerPlugin\bin\, C:\Program Files\Amazon\AWSSAMCLI\bin\, C:\Program Files\Microsoft SQL Server\130\Tools\Binn\, C:\Program Files\LLVM\bin, C:\Users\runneradmin\.dotnet\tools, C:\Users\runneradmin\.cargo\bin, C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps, .]
[#0] [#0] 		at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2673)
[#0] [#0] 		at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
[#0] [#0] 		at java.base/java.lang.System.loadLibrary(System.java:1873)
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader$StandardLibraryCandidate.load(NativeLibraryLoader.java:117)
[#0] [#0] 		at org.newsclub.net.unix.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:251)
[#0] [#0] 		... 11 more
X mill.main.ClientServerTests.hello.envVars 5025ms 
  java.lang.Exception: Failed to connect to server
    mill.main.client.MillClientMain.run(MillClientMain.java:198)
    mill.main.ClientServerTests$.$anonfun$runClientAux$1(ClientServerTests.scala:86)
    mill.main.Server$.lockBlock(MillServerMain.scala:226)
    mill.main.ClientServerTests$.runClientAux(ClientServerTests.scala:77)
    mill.main.ClientServerTests$.runClient$1(ClientServerTests.scala:96)
    mill.main.ClientServerTests$.$anonfun$tests$2(ClientServerTests.scala:107)
  java.lang.NoClassDefFoundError: Could not initialize class org.newsclub.net.unix.AFUNIXSocketAddress
    mill.main.client.MillClientMain.run(MillClientMain.java:189)
    mill.main.ClientServerTests$.$anonfun$runClientAux$1(ClientServerTests.scala:86)
    mill.main.Server$.lockBlock(MillServerMain.scala:226)
    mill.main.ClientServerTests$.runClientAux(ClientServerTests.scala:77)
    mill.main.ClientServerTests$.runClient$1(ClientServerTests.scala:96)
    mill.main.ClientServerTests$.$anonfun$tests$2(ClientServerTests.scala:107)

Unfortunately, this error also occurs for all GitHub workflows / actions that test with "windows" or "windows-latest", even in --no-server mode. I think, we should come up with a better out-of-the-box solution, than tampering with system properties.

@sake92
Copy link
Contributor Author

sake92 commented May 9, 2022

I made a PR upstream, hope it gets merged soon kohlschutter/junixsocket#105

@lefou
Copy link
Member

lefou commented May 9, 2022

Great, although I wonder why this issue even happens when we run in --no-server mode.

@sake92
Copy link
Contributor Author

sake92 commented May 12, 2022

@lefou Could it be that #1871 caused/resolved it?

@lefou
Copy link
Member

lefou commented May 12, 2022

@lefou Could it be that #1871 caused/resolved it?

Yeah, that would perfectly explain it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java.io.IOException: GetOverlappedResult() failed for read operation: 233
2 participants