Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8145538

JNDI LDAP read timeout settings have no effect

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.7.0_67"
      Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

      Same with: jdk1.7.0_45 / jdk1.7.0_51 / jdk1.7.0_55 / jdk1.7.0_60

      ADDITIONAL OS VERSION INFORMATION :
      Linux srv 2.6.37.6-24-desktop #1 SMP PREEMPT 2012-10-18 22:36:08 +0200 x86_64 x86_64 x86_64 GNU/Linux

      Linux 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      http://docs.oracle.com/javase/tutorial/jndi/newstuff/readtimeout.html

      Read timeout settings have no effect.

      ADDITIONAL REGRESSION INFORMATION:
      Known version to work:
      java version "1.7.0_25"
      Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
      kuhr@kap-meyt:/devel/kuhr/hel> /app/java/lib64/jdk1.7.0_67/bin/java -version

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Test case:

      http://www.java2s.com/Code/Java/JNDI-LDAP/ReadTimeoutTest.htm



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Server: Connection accepted
      javax.naming.NamingException: LDAP response read timed out, timeout used:1000ms.
              at com.sun.jndi.ldap.Connection.readReply(Connection.java:481)
              at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:358)
              at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:188)
              at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2740)
              at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:316)
              at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:193)
              at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:211)
              at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154)
              at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:84)
              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
              at javax.naming.InitialContext.init(InitialContext.java:242)
              at javax.naming.InitialContext.<init>(InitialContext.java:216)
              at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101)
              at de.redero.ldap.ReadTimeoutTest.main(ReadTimeoutTest.java:36)

      ACTUAL -
      Test hangs, no read timeout occurs.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      http://www.java2s.com/Code/Java/JNDI-LDAP/ReadTimeoutTest.htm
      ---------- END SOURCE ----------

            vtewari Vyom Tewari
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: