Hello,
I hope this is the correct place to report an issue. I am trying to convert our product from using CORBA in se to Glassfish/ee. I don’t know the details of this code and my proposed solution might not be correct but I hope the problem is
clear.
Thank You
https://github.com/eclipse-ee4j/orb/blob/master/orbmain/src/main/java/com/sun/corba/ee/impl/oa/poa/POAImpl.java
Line 999
} finally {
if (readLocked) { readUnlock() ; } // Issue 14917: was unlock()
}
Should read
} finally {
if (readLocked) { readUnlock() ; readLocked = false ; } // Issue 14917: was unlock()
}
By not setting readLocked to false the cleanUpLocks call will throw the exception
cleanUpLocks( child, readLocked, writeLocked, childReadLocked ) ;
Example exception:
java.lang.IllegalMonitorStateException: attempt to unlock read lock, not locked by current thread
at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.unmatchedUnlockException(ReentrantReadWriteLock.java:444)
at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:428)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1341)
at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:881)
at com.sun.corba.ee.impl.oa.poa.POAImpl.readUnlock(POAImpl.java:388)
at com.sun.corba.ee.impl.oa.poa.POAImpl.cleanUpLocks(POAImpl.java:1089)
at com.sun.corba.ee.impl.oa.poa.POAImpl.find_POA(POAImpl.java:1010)