On 28.08.2020 15:55, Alan Bateman wrote:
On 28/08/2020 12:25, Alexander Scherbatiy wrote:
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)
NativeThread current/signal will be exercised by the tests in
java/nio/channels.
I run the java/nio/channels tests with the fix. There are five failed
tests that fail with and without the fix:
java/nio/channels/DatagramChannel/AdaptorMulticasting.java
java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java
java/nio/channels/DatagramChannel/PromiscuousIPv6.java
java/nio/channels/DatagramChannel/Loopback.java
java/nio/channels/FileChannel/FileExtensionAndMap.java
The FileExtensionAndMap.java has clear fail message: "Error. Test
ignored: This test has huge disk space requirements".
Thanks,
Alexander.
The code in linux_close.c is only used with the old (and not used by
default) SocketImpl and DatagramSocketImpl implementation. Some of the
tests jdk_net test group will re-run the tests with the old
implementation so you should be okay.
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.
Sometimes there is will firewall or iptables configuration need to
allow multicast datagrams to be received.
-Alan