Hello,

Could you review the updated fix:
  http://cr.openjdk.java.net/~alexsch/8252248/webrev.01/

 - moving shared code to net_util_md.h is avoided
 - INTERRUPT_SIGNAL is defined as SIGRTMAX - 2 instead of __SIGRTMAX - 2 for Linux in NativeThread.c
 - "#include <pthread.h>" is moved out from "#ifdef" in NativeThread.c
 - sigWakeup is changed to "#define WAKEUP_SIGNAL (SIGRTMAX - 2)" in linux_close.c

At least test/jdk/java/net/Socket/asyncClose/AsyncClose.java touches all four methods where the signal changes are used:
NativeThread.c
- Java_sun_nio_ch_NativeThread_init(JNIEnv *env, jclass cl)
- Java_sun_nio_ch_NativeThread_signal(JNIEnv *env, jclass cl, jlong thread)
linux_close.c
-  __attribute((constructor)) init()
- closefd(int fd1, int fd2)

I run test/jdk/java/net tests on Ubuntu 18.04.4 and Alpine Linux 3.11.6 with musl libc 1.1.24. There are 10 failed tests but they fail without the fix as well. I believe that it is because of some network settings of  my machine.

  java/net/MulticastSocket/IPMulticastIF.java
  java/net/MulticastSocket/NoSetNetworkInterface.java
  java/net/MulticastSocket/Promiscuous.java
  java/net/MulticastSocket/PromiscuousIPv6.java
  java/net/MulticastSocket/SetGetNetworkInterfaceTest.java
  java/net/MulticastSocket/SetLoopbackMode.java
  java/net/MulticastSocket/SetOutgoingIf.java
  java/net/MulticastSocket/Test.java
  java/net/NetworkInterface/NetworkInterfaceRetrievalTests.java
  java/net/ipv6tests/UdpTest.java

Thanks,
Alexander.

On 26.08.2020 13:42, Alan Bateman wrote:
On 25/08/2020 18:00, Alexander Scherbatiy wrote:

Hello,

Could your review the fix for the issue:
  Bug: https://bugs.openjdk.java.net/browse/JDK-8252248
  Fix: http://cr.openjdk.java.net/~alexsch/8252248/webrev.00/

:

The fix has been discussed on the portola-dev alias [2] where it was pointed out that the fix can be reviewed in the mainline and it was suggested to rename the INTERRUPT_SIGNAL and move its definition to net_util_md.h.

The xxx_close.c sources are for the old SocketImpl and DatagramSocketImpl implementations; they are aren't used by default and will eventually go away. Maybe an option for the musl port is to just not compile in the old socket implementations? It might be best to start a discussion on nio-dev and net-dev about this as we shouldn't be changing NativeThread.c (which is used for signalling in the FileChannel implementation) to include net_util.h.

-Alan

Reply via email to