JDK-6896157 : unsynchronized hashmap in com.sun.corba.se.impl.transport.SelectorImpl.createReaderThread
  • Type: Bug
  • Component: other-libs
  • Sub-Component: corba:orb
  • Affected Version: 5.0-pool
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2009-10-28
  • Updated: 2011-02-16
  • Resolved: 2010-01-12
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.
Other Other Other JDK 6 JDK 7
5.0u23-revFixed 5.0u24-revFixed 5.0u25Fixed 6u17-rev b10Fixed 7Fixed
Description
hreads consuming high cpu tracked down to unsynchronized hashmap
usage in com.sun.corba.se.impl.transport.SelectorImpl.createReaderThread.

ustomer make this change to their jdk 5.0 based jar file.
It is reported that with customized changes as shown below (lines with
keyword CSB), the issue is resolved.

/*
* @(#)SelectorImpl.java 1.22 09/04/01
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/

...
import java.util.Map; // Added this line CSB
...
private Map readerThreads; // Used to be HashMap CSB
...
readerThreads = (Map) java.util.Collections.synchronizedMap(new HashMap()); // Use synchronizedMap CSB

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/build/corba/rev/2d3622317730
25-12-2010

EVALUATION http://hg.openjdk.java.net/jdk7/tl/corba/rev/cd7abebaa49b
08-11-2010

EVALUATION Hi Haroon, Irrespective of the stacktrace, which would only show java call stack, the control should be at the application level or the application server like weblogic/ Glassfish etc. The customer may be using one of this. There should be some place where the call gets into the java layer and that is where the synchronization is advised. However, since there is no testcase, we have nothing much to analyze. So I have just created an FVB with the changes requested by the customer. /net/jdk/export/jpse01/sunita/FVB/160/6896157/idr-231192575/... There are bundles for all supported platforms. You can choose any one of them. I will need a confirmation from the customer. Without which I cannot proceed with integration. I understand that this would take some time as the frequency of the occurrence of the issue is not predictable. Hence I am moving the CR to afa (awaiting field action). Thanks Sunita
23-11-2009