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

Using jdbc-odbc hangs the client when SATMP being not set to /tmp

    XMLWordPrintable

Details

    Description

      JDBC connecting to SQLAnywhere database using jdbc-odbc bridge hangs the client when SQLAnywhere variable SATMP being not set to /tmp, using the JDK 1.1.2 and
      above JDK versions due to the removal of dynamic dependency of libjava.so to libresolv.so.

      This is indicated by doing an ldd on both libraries libjava.so from JDK 1.1.1
      and JDK 1.1.2, the 1.1.1 uses libresolv.so.1 => /usr/lib/libresolv.so.1
      whereas the 1.1.2 and above versions such as JDK 1.1.3 or 1.1.4 do not.

      /usr/local/java/jdk1.1.1/solaris/lib/sparc/green_threads( 16 )% ldd libjava.so
              libm.so.1 => /usr/lib/libm.so.1
              libdl.so.1 => /usr/lib/libdl.so.1
              libsocket.so.1 => /usr/lib/libsocket.so.1
              libnsl.so.1 => /usr/lib/libnsl.so.1
              libresolv.so.1 => /usr/lib/libresolv.so.1
              libc.so.1 => /usr/lib/libc.so.1
              libintl.so.1 => /usr/lib/libintl.so.1
              libmp.so.1 => /usr/lib/libmp.so.1
              libw.so.1 => /usr/lib/libw.so.1

      /usr/local/java/jdk1.1.2/solaris/lib/sparc/green_threads( 17 )% ldd libjava.so
              libm.so.1 => /usr/lib/libm.so.1
              libdl.so.1 => /usr/lib/libdl.so.1
              libsocket.so.1 => /usr/lib/libsocket.so.1
              libnsl.so.1 => /usr/lib/libnsl.so.1
              libc.so.1 => /usr/lib/libc.so.1
              libintl.so.1 => /usr/lib/libintl.so.1
              libmp.so.1 => /usr/lib/libmp.so.1
              libw.so.1 => /usr/lib/libw.so.1



      The LD_LIBRARY_PATH variable needs to be set on the client side to /disk1/jdk1.1.1/lib/sparc/green_threads, to the specific version of JDK you are trying to use with.

      It worked with JDK1.1.1 regardless of what SATMP being set as /tmp or /var/adm/CSCOpx/.SQLAnywhere or unset completely.

      Try setting the SQLAnywhere variable SATMP to the working directory
      such as /var/adm/CSCOpx/.SQLAnywhere with JDK 1.1.2 and bove versions of JDKs,
      you will be able to hang the client.

      One more note, the problem scenario does not occur if SATMP is not set (unset) across the JDK versions.

      So, we have witnessed the fact that if SATMP variable needs to be set (According to Sybase Release notes), then set it to /tmp, that is basically a temp directory to hold socket, shared memory, lock information they need. This can be treated as the workaround and works for CISCO who is the customer that had reported the hang, and then we came up with the workaround which seems to be just working fine.

      Attachments

        Activity

          People

            swhitesunw Seth White (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: