JDK-6367650 : Exception in thread "main" org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge
  • Type: Bug
  • Component: other-libs
  • Sub-Component: corba:idl
  • Affected Version: 1.4.2_11
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-12-28
  • Updated: 2011-02-16
  • Resolved: 2008-12-22
Description
bash-2.05# ./runclient.sh
java version "1.4.2_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_11-b02)
Java HotSpot(TM) Client VM (build 1.4.2_11-b02, mixed mode)


Connected to weblogic server
Exception in thread "main" org.omg.CORBA.MARSHAL: Unable to read value 
from underlying bridge :   vmcid: SUN  minor code: 211 completed: Maybe
        at 
com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:953)
        at 
com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:859)
        at 
com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:851)
        at 
com.sun.corba.se.internal.iiop.CDRInputStream.read_abstract_interface(CDRInputStream.java:309)
        at 
com.sun.corba.se.internal.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:228)
        at 
com.sun.corba.se.internal.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:381)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:318)
        at java.util.ArrayList.readObject(ArrayList.java:554)
        at 
com.sun.corba.se.internal.io.IIOPInputStream.readObject(Native Method)
        at 
com.sun.corba.se.internal.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1298)
        at 
com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:908)
        at 
com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
        at 
com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
        at 
com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
        at 
com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1084)
        at 
com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:293)
        at server._ConfigurationFacade_Stub.selectConfigurations(Unknown 
Source)
        at client.Client.main(Client.java:23)
error e=java.rmi.MarshalException: CORBA MARSHAL 1398079699 Maybe; 
nested exception is:
        org.omg.CORBA.MARSHAL: Unable to read value from underlying 
bridge : Serializable readObject method failed internally  vmcid: SUN  
minor code: 211 completed: Maybe

Comments
SUGGESTED FIX We should look to re-do CacheTable, since the current code pre-dates JDK 1.2 and the collection classes (it originally had to work on IBM's JDK 1.1.6). In the particular case at hand, an indirection could refer to any of the offsets at which the object was returned from readResolve, and a subsequent indirection should be able to refer to any of these offsets. A different data structure is needed here to handle this case.
13-08-2006

EVALUATION The problem is in the reading part of the serialization. And as identified by the customer side engineer the problem roots from the cache management code. When the serialized object (server.Configuration) is read it has references to another serialized object (server.State). This server.State class implements readResolve(Object) method and returns the same instances while constructing the object. Usage of readResolve() is perfectly correct and serves its purpose. The cache used for performance is using instance (key) and offset (value) as the pair to store and retrieve. When the same instance is added twice with different offset. The code assumes that there is some problem when constructing the instance and throws the org.omg.CORBA.INTERNAL exception with minorCode 1398079695 (MinorCodes.DUPLICATE_INDIRECTION_OFFSET). This exception is caught and another exception of type org.omg.CORBA.MARSHAL with minorCode 1398079699 (MinorCodes.VALUEHANDLER_READ_EXCEPTION) is thrown to the outside world. The byte stream during the serialization is: 0 0000 00000000 00000000 00000000 00000008 16 0010 00000000 00000000 7fffff0a 0000003a 32 0020 524d493a 6a617661 2e757469 6c2e4172 48 0030 7261794c 6973743a 46363535 31353446 64 0040 33323831 35333830 3a373838 31443231 80 0050 44393943 37363139 44000000 0000000d 96 0060 01010000 00000002 0000000a 00000000 112 0070 7fffff0a 0000003b 524d493a 73657276 128 0080 65722e43 6f6e6669 67757261 74696f6e 144 0090 3a343944 39303641 43313335 30463242 160 00a0 443a3543 35433631 30333739 31423938 176 00b0 36380000 00000004 00000001 7fffff0a 192 00c0 00000038 524d493a 6a617661 2e6c616e 208 00d0 672e496e 74656765 723a3437 36393346 224 00e0 46423446 45353739 46343a31 32453241 240 00f0 30413446 37383138 37333800 00000004 256 0100 00000001 fffffffd 7fffff0a 00000023 272 0110 49444c3a 6f6d672e 6f72672f 434f5242 288 0120 412f5753 7472696e 6756616c 75653a31 304 0130 2e300000 00000010 0000000c 006d006f 320 0140 00640075 006c0065 fffffffd 7fffff0a 336 0150 ffffffff ffffffb8 0000000c 00000008 352 0160 006e0061 006d0065 fffffffd 7fffff0a -------------------------------------------^^^^^^^^ 368 0170 00000033 524d493a 73657276 65722e53 384 0180 74617465 3a393733 35343539 38454342 400 0190 38433635 353a3343 30374230 39393337 416 01a0 31423844 43390000 00000004 00000001 432 01b0 7fffff0a ffffffff ffffff54 00000008 448 01c0 00000004 0041004c fffffffc 7fffff0a 464 01d0 ffffffff ffffff38 00000008 00000004 480 01e0 00550053 fffffffc fffffffd 7fffff0a 496 01f0 ffffffff ffffff18 0000000e 0000000a 512 0210 00760061 006c0075 00650000 fffffffd 528 0220 fffffffe 00000001 00000000 7fffff0a 544 0230 ffffffff fffffe50 00000004 00000001 560 0240 7fffff0a ffffffff fffffe88 00000004 576 0250 00000002 fffffffd 00000010 ffffffff 592 0260 fffffeb8 ffffffff fffffef4 7fffff0a -------------------------------------------^^^^^^^^ 608 0270 ffffffff ffffff0c 00000014 00000001 624 0280 ffffffff ffffff3c ffffffff ffffff50 640 0290 fffffffd 00000008 ffffffff ffffff60 656 02a0 fffffffe ffffffff The offsets 364 and 604 are holding the references to the server.State instances. Since the readResolve() returns the same instances for both the call the cache key clashes and results in the reported exception.
24-04-2006