-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
19
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
OSX 12.5 (Monterey), openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment Homebrew (build 19.0.1)
OpenJDK 64-Bit Server VM Homebrew (build 19.0.1, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
I use Virtual Threads (JDK 19 preview feature) to handle UDP packets: receive and send response.
On Intel processors, Mac OSX or Linux method java.net.DatagramSocket.close() returns immediately and closes UDP socket. On M1 processors method close() hangs for several seconds depending on number of threads and UDP packets number.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I made implementation of SWIM protocol using UDP. SWIM Node - pair host:port + Java code. I run up to 64 SWIM nodes inside 1 JVM on one physical machine. JVM params are "--enable-preview" "-XX:+UseG1GC". Each SWIM node sends and receives UDP packets in Virtual threads, 11-12 packets per second. So, 12*64 = 768 packets/sec. I wait 5-10 minutes and then shutdown 64 SWIM nodes. On Intel processors method close() returns immediately. On M1 hangs for several seconds so, to close() 64 UDP sockets takes 60+ seconds.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Method java.net.DatagramSocket.close() closes socket and returns immediately on M1 processors.
ACTUAL -
Method java.net.DatagramSocket.close() closes socket and returns after several second on M1 processors, depending on .
CUSTOMER SUBMITTED WORKAROUND :
no workaround found.
FREQUENCY : always
OSX 12.5 (Monterey), openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment Homebrew (build 19.0.1)
OpenJDK 64-Bit Server VM Homebrew (build 19.0.1, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
I use Virtual Threads (JDK 19 preview feature) to handle UDP packets: receive and send response.
On Intel processors, Mac OSX or Linux method java.net.DatagramSocket.close() returns immediately and closes UDP socket. On M1 processors method close() hangs for several seconds depending on number of threads and UDP packets number.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I made implementation of SWIM protocol using UDP. SWIM Node - pair host:port + Java code. I run up to 64 SWIM nodes inside 1 JVM on one physical machine. JVM params are "--enable-preview" "-XX:+UseG1GC". Each SWIM node sends and receives UDP packets in Virtual threads, 11-12 packets per second. So, 12*64 = 768 packets/sec. I wait 5-10 minutes and then shutdown 64 SWIM nodes. On Intel processors method close() returns immediately. On M1 hangs for several seconds so, to close() 64 UDP sockets takes 60+ seconds.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Method java.net.DatagramSocket.close() closes socket and returns immediately on M1 processors.
ACTUAL -
Method java.net.DatagramSocket.close() closes socket and returns after several second on M1 processors, depending on .
CUSTOMER SUBMITTED WORKAROUND :
no workaround found.
FREQUENCY : always