RFR [6968459] JNDI timeout fails before timeout is reached
Alan Bateman
Alan.Bateman at oracle.com
Fri Nov 29 17:03:05 UTC 2013
On 19/11/2013 17:58, Ivan Gerasimov wrote:
> Hello all!
>
> Would you please help review a fix for the bug?
> https://bugs.openjdk.java.net/browse/JDK-6968459
>
> It was reported that creating new InitialLdapContext() can fail with
> "javax.naming.NamingException: LDAP response read timed out, timeout
> used:30000ms", even though the specified timeout hadn't been elapsed.
>
> The fix was provided by the filer of the bug some time ago.
> Here's the webrev with this fix:
> http://cr.openjdk.java.net/~igerasim/6968459/0/webrev/
I haven't seen any replies to this but I've cc'ed Vinnie and Xuelei as
they are more familiar with this area.
If I understand correctly then the issue is that the timeout handling
doesn't take account of wakeups when aren't any BerDecoders to dequeue.
The changes mean it will retry the wait with a decreasing timeout until
a reply is received or the timeout elapses. That seems reasonable,
assuming the time doesn't change :-) You might find the code is a bit
clearer if you have a "remaining" time as that would allow you get rid
of timedOut, timeOut and endTime.
I see the patch doesn't come with a test. Is there any test
infrastructure for testing LDAP without require a complete server?
-Alan.
More information about the core-libs-dev
mailing list