JDK-6989190 : SO_SNDBUF/SO_RCVBUF limits should only be checked when setsockopt fails (sol)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-10-04
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b114Fixed
Related Reports
Relates :  
Description
On Solaris, attempts to set the SO_SNDBUF/SO_RCVBUF socket options cause the buffer size to be clamped by the value of the tcp_max_buf/udp_max_buf parameters. This code no longer works on Solaris 11 (see 6984182). As an initial fix for this issue, this bug proposes:

1. First attempt setsockopt with the original buffer size and only clamp the value if it fails because the value exceeds the system limit.

2. Change the fallback limit to 1MB for tcp, and 2MB for udp. Currently it falls back to a limit of 64k if the values of tcp_max_buf/udp_max_buf cannot be obtained. If the fallback limits are changed to 1MB for tcp, and 2MB for udp then it reduces the problem in 6984182 to only the case where these parameters have been changed (which should be rare).

Comments
EVALUATION This seems a reasonably solution until we figure out the right solution for 6984182.
04-10-2010