United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4914585 : RepositoryId Lists not handled correctly

Details
Type:
Bug
Submit Date:
2003-08-28
Status:
Resolved
Updated Date:
2009-06-25
Project Name:
JDK
Resolved Date:
2003-10-22
Component:
other-libs
OS:
solaris_8,generic
Sub-Component:
corba:orb
CPU:
sparc,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.2,5.0
Fixed Versions:
1.4.1 (07)

Related Reports
Backport:
Backport:
Duplicate:

Sub Tasks

Description
The JDK ORB has a bug when dealing with repository id lists in valuetypes. When reading these we sometimes see  this exception:

Exception in thread "main" java.rmi.RemoteException: CORBA INTERNAL 
1398079695 N
o; nested exception is:
         org.omg.CORBA.INTERNAL:   vmcid: SUN  minor code: 207  completed: No
         at 
com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemExceptio
n(ShutdownUtilDelegate.java:134)
         at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
         at test._Simple_Stub.testEJBException(Unknown Source)
         at test.Client.example(Client.java:91)
         at test.Client.main(Client.java:50)
Caused by: org.omg.CORBA.INTERNAL:   vmcid: SUN  minor code: 207  completed: No
         at 
com.sun.corba.se.internal.orbutil.CacheTable.put(CacheTable.java:73)
         at 
com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_repositoryIds(
CDRInputStream_1_0.java:1762)
         at 
com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInput
Stream_1_0.java:1027)
         at 
com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStre
am.java:293)
         

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
1.4.1_07
1.4.2_04
generic
tiger-beta2

FIXED IN:
1.4.1_07
1.4.2_04
tiger-beta2

INTEGRATED IN:
1.4.1_07
1.4.2_04
tiger-beta2


                                     
2004-06-14
SUGGESTED FIX

http://jpsesvr.sfbay.sun.com:8080/ctetools/html/ViewDetail.jsp?index=823
                                     
2004-06-11
EVALUATION

There is a problem in CDRInputStream_1_0.java:

              // read first array element and store it as an indirection to the whole array
            int indirection = get_offset() - 4;
            String repID = read_repositoryId();
            if (repositoryIdCache == null)
                repositoryIdCache = new CacheTable(false);
            repositoryIdCache.put(repID, indirection);

indirection is bbwi.index - 4, but after read_repositId(), if the read result is not null  --- stringIndirection will not be equal to indirection above: in readStringOrIndirection:

        int len = read_long();   <---- bbwi.index += 4

        //
        // Check for indirection
        //
        if (allowIndirection) {
            if (len == 0xffffffff)
                return null;
            else
                stringIndirection = get_offset() - 4; <---- is the original position, not original position - 4! 
        }

So, this will cause the put function is CacheTable triger that exception ---- same key for different vals. The fix might be like:
int indirection = get_offset();

###@###.### 2003-09-26

A new bug (4939854) filed against tiger-beta for requesting the fix addressed in tiger.

###@###.### 2003-10-17
                                     
2003-09-26



Hardware and Software, Engineered to Work Together