RFR 8252248: __SIGRTMAX is not declared in musl libc

Alan Bateman Alan.Bateman at oracle.com
Fri Aug 28 12:55:59 UTC 2020


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.

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


More information about the nio-dev mailing list