JDK-6399695 : (se) Selector loses connections under stress with Linux kernel 2.4.x
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 9.0pe
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: linux_redhat_8.0
  • CPU: x86
  • Submitted: 2006-03-16
  • Updated: 2011-05-25
  • Resolved: 2006-12-05
Description
When GlassFish Application server is installed on a 2.4 kernel and stressed using a stress tool (ab), the Selector seems to lose registration. Opening 300 connections that does a total of 100 requests on a single Selector demonstrate the problem. Mainly, doing:

% ab -n1000 -c300 -k http://localhost:8080/images.jar

The benchmark will output:

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Send request timed out!
Completed 900 requests
Send request timed out!

Running the same test on 2.6x kernel (on the same hardware) isn't producing the problem. Attached is a test case that can be used to demonstrate the problem.

Comments
EVALUATION -- Checked with submitter and he has agreed to close this bug. More details in 6381793.
05-12-2006

EVALUATION The connection loss and scalability issues that the submitter observes are on th RedHat 8.0 (Psyche) installation. The kernel is 2.4.20-18.8 (LinuxThreads). The problem is not observed on RHEL 4 (Nahant Update 2), 2.6.9-5.ELsmp kernel (NPTL)
20-03-2006

WORK AROUND Oups typo. The workaround is to move to a 2.6 kernel.
16-03-2006

WORK AROUND Add -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider
16-03-2006