The org.glassfish.grizzly.nio.DefaultSelectorHandler.force-selector-spin-detection JVM parameter defaults to false unless the OS is Linux and the JDK is 1.6 or lower. I propose that this be set to true on Linux regardless of the JDK version as the bug is still observed on 1.7 and higher if the kernel is an older version.
public static final boolean IS_WORKAROUND_SELECTOR_SPIN =
Boolean.getBoolean(DefaultSelectorHandler.class.getName() + ".force-selector-spin-detection") ||
System.getProperty("os.name").equalsIgnoreCase("linux");
// && JdkVersion.getJdkVersion().compareTo("1.7.0") < 0; <-- remove this check
Discussion about issue here - https://javaee.groups.io/g/grizzly/topic/5807706
The org.glassfish.grizzly.nio.DefaultSelectorHandler.force-selector-spin-detection JVM parameter defaults to false unless the OS is Linux and the JDK is 1.6 or lower. I propose that this be set to true on Linux regardless of the JDK version as the bug is still observed on 1.7 and higher if the kernel is an older version.