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

Access violation exception in Java HotSpot / JDBC sql request CREATE TABLE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Future Project
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0_01"
      Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
      Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)

      java version "1.5.0_04"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0
      Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)


      FULL OS VERSION :
      Microsoft Windows XP [Version 5.1.2600]


      A DESCRIPTION OF THE PROBLEM :
      Access violation exception occured using JDBC by SQL request:

      CREATE TABLE IF NOT EXISTS MainGraphTable (metaGraphId BIGINT AUTO_INCREMENT, GraphVersion BIGINT DEFAULT 0, NextObjectNumber BIGINT NOT NULL DEFAULT 1, UUID CHAR(36) NOT NULL, PRIMARY KEY (metaGraphId), UNIQUE (metaGraphId) )

      to MySQL 5.0.41-community-nt
      The SQL request is correct executed from java 1.4.2 and from phpmyadmin utility

      The emerging table has been established preceding request


      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: No

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Execute request for create table
      2. Execute request some time in the application from java 1.6 or java 1.5


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      expected: none, table was create and the request is not doing
      actual: accept violation error

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      #
      # An unexpected error has been detected by Java Runtime Environment:
      #
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c918fea, pid=3748, tid=3508
      #
      # Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode)
      # Problematic frame:
      # C [ntdll.dll+0x18fea]
      #
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp
      #

      --------------- T H R E A D ---------------

      Current thread (0x0aab4000): JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=3508]

      siginfo: ExceptionCode=0xc0000005, writing address 0x00000010

      Registers:
      EAX=0x00000000, EBX=0x00000000, ECX=0x00002e08, EDX=0x0acf62fc
      ESP=0x0af5fbf0, EBP=0x0af5fc64, ESI=0x0acf62ec, EDI=0x00000000
      EIP=0x7c918fea, EFLAGS=0x00010246

        Top of Stack: (sp=0x0af5fbf0)
      0x0af5fbf0: 0acd37e8 00000000 00000000 ffb3b4c0
      0x0af5fc00: ffffffff 0009d668 00000000 00000000
      0x0af5fc10: 0af5fc88 71a557c9 00002d18 00002d8c
      0x0af5fc20: 00000002 71a544b0 0af5fd14 0af5fd20
      0x0af5fc30: 00000001 0af5fcfc 00000001 00000000
      0x0af5fc40: 00000020 0af5fd84 0af5fd0c 00000000
      0x0af5fc50: 00000000 00002d18 00000000 00000000
      0x0af5fc60: 00002e08 0af5fcfc 7c90104b 00cf62ec

      Instructions: (pc=0x7c918fea)
      0x7c918fda: 8b 46 10 3b c3 89 45 fc 0f 84 9e 00 00 00 8b 06
      0x7c918fea: ff 40 10 8b 45 fc 83 e0 01 89 45 e8 8b 06 ff 40


      Stack: [0x0af10000,0x0af60000), sp=0x0af5fbf0, free space=318k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C [ntdll.dll+0x18fea]
      C [ntdll.dll+0x104b]


      --------------- P R O C E S S ---------------

      Java Threads: ( => current thread )
        0x0b0db000 JavaThread "Image Fetcher 3" daemon [_thread_blocked, id=1996]
        0x0b0da400 JavaThread "Image Fetcher 2" daemon [_thread_blocked, id=3632]
        0x0b0d1400 JavaThread "Image Fetcher 1" daemon [_thread_blocked, id=1584]
        0x0b0c0c00 JavaThread "Image Fetcher 0" daemon [_thread_blocked, id=2576]
        0x00386400 JavaThread "DestroyJavaVM" [_thread_blocked, id=2608]
        0x0b07c400 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=2368]
        0x0b079800 JavaThread "AWT-Shutdown" [_thread_blocked, id=3512]
        0x0b078800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=3328]
        0x0aac1800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4068]
        0x0aac0c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3824]
      =>0x0aab4000 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=3508]
        0x0aab2c00 JavaThread "JDWP Event Helper Thread" daemon [_thread_in_native, id=572]
        0x0aab0800 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=228]
        0x0aaa5800 JavaThread "Attach Listener" daemon [_thread_blocked, id=1312]
        0x0aa96c00 JavaThread "Finalizer" daemon [_thread_blocked, id=428]
        0x0aa92800 JavaThread "Reference Handler" daemon [_thread_blocked, id=2804]

      Other Threads:
        0x0aa8f800 VMThread [id=2984]

      VM state:not at safepoint (normal execution)

      VM Mutex/Monitor currently owned by a thread: None

      Heap
       def new generation total 960K, used 545K [0x02980000, 0x02a80000, 0x02e60000)
        eden space 896K, 53% used [0x02980000, 0x029f8728, 0x02a60000)
        from space 64K, 100% used [0x02a60000, 0x02a70000, 0x02a70000)
        to space 64K, 0% used [0x02a70000, 0x02a70000, 0x02a80000)
       tenured generation total 4096K, used 667K [0x02e60000, 0x03260000, 0x06980000)
         the space 4096K, 16% used [0x02e60000, 0x02f06d28, 0x02f06e00, 0x03260000)
       compacting perm gen total 12288K, used 8397K [0x06980000, 0x07580000, 0x0a980000)
         the space 12288K, 68% used [0x06980000, 0x071b3490, 0x071b3600, 0x07580000)
      No shared spaces configured.

      Dynamic libraries:
      0x00400000 - 0x00423000 C:\Program Files\Java\jre1.6.0_01\bin\javaw.exe
      0x7c900000 - 0x7c9b0000 C:\WINDOWS\system32\ntdll.dll
      0x7c800000 - 0x7c8f5000 C:\WINDOWS\system32\kernel32.dll
      0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
      0x77e70000 - 0x77f01000 C:\WINDOWS\system32\RPCRT4.dll
      0x7e410000 - 0x7e4a0000 C:\WINDOWS\system32\USER32.dll
      0x77f10000 - 0x77f57000 C:\WINDOWS\system32\GDI32.dll
      0x7c340000 - 0x7c396000 C:\Program Files\Java\jre1.6.0_01\bin\msvcr71.dll
      0x6d7c0000 - 0x6da07000 C:\Program Files\Java\jre1.6.0_01\bin\client\jvm.dll
      0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
      0x6d310000 - 0x6d318000 C:\Program Files\Java\jre1.6.0_01\bin\hpi.dll
      0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
      0x6d400000 - 0x6d429000 C:\Program Files\Java\jre1.6.0_01\bin\jdwp.dll
      0x6d6c0000 - 0x6d6c6000 C:\Program Files\Java\jre1.6.0_01\bin\npt.dll
      0x6d770000 - 0x6d77c000 C:\Program Files\Java\jre1.6.0_01\bin\verify.dll
      0x6d3b0000 - 0x6d3cf000 C:\Program Files\Java\jre1.6.0_01\bin\java.dll
      0x6d7b0000 - 0x6d7bf000 C:\Program Files\Java\jre1.6.0_01\bin\zip.dll
      0x6d280000 - 0x6d287000 C:\Program Files\Java\jre1.6.0_01\bin\dt_socket.dll
      0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
      0x77c10000 - 0x77c68000 C:\WINDOWS\system32\msvcrt.dll
      0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
      0x71a50000 - 0x71a8f000 C:\WINDOWS\System32\mswsock.dll
      0x76f20000 - 0x76f47000 C:\WINDOWS\system32\DNSAPI.dll
      0x76fb0000 - 0x76fb8000 C:\WINDOWS\System32\winrnr.dll
      0x76f60000 - 0x76f8c000 C:\WINDOWS\system32\WLDAP32.dll
      0x76fc0000 - 0x76fc6000 C:\WINDOWS\system32\rasadhlp.dll
      0x20b00000 - 0x20b4b000 C:\WINDOWS\system32\imon.dll
      0x774e0000 - 0x7761d000 C:\WINDOWS\system32\ole32.dll
      0x71ad0000 - 0x71ad9000 C:\WINDOWS\system32\WSOCK32.dll
      0x662b0000 - 0x66308000 C:\WINDOWS\system32\hnetcfg.dll
      0x71a90000 - 0x71a98000 C:\WINDOWS\System32\wshtcpip.dll
      0x6d000000 - 0x6d1c3000 C:\Program Files\Java\jre1.6.0_01\bin\awt.dll
      0x73000000 - 0x73026000 C:\WINDOWS\system32\WINSPOOL.DRV
      0x76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32.dll
      0x73760000 - 0x737a9000 C:\WINDOWS\system32\ddraw.dll
      0x73bc0000 - 0x73bc6000 C:\WINDOWS\system32\DCIMAN32.dll
      0x74720000 - 0x7476b000 C:\WINDOWS\system32\MSCTF.dll
      0x6d2b0000 - 0x6d303000 C:\Program Files\Java\jre1.6.0_01\bin\fontmanager.dll
      0x7c9c0000 - 0x7d1d5000 C:\WINDOWS\system32\shell32.dll
      0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
      0x773d0000 - 0x774d3000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
      0x5d090000 - 0x5d12a000 C:\WINDOWS\system32\comctl32.dll
      0x6d570000 - 0x6d583000 C:\Program Files\Java\jre1.6.0_01\bin\net.dll
      0x6d590000 - 0x6d599000 C:\Program Files\Java\jre1.6.0_01\bin\nio.dll
      0x605d0000 - 0x605d9000 C:\WINDOWS\system32\mslbui.dll

      VM Arguments:
      jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:2778
      java_command: com.unitesk.vintreeview.MainFrame
      Launcher Type: SUN_STANDARD

      Environment Variables:
      PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\cvsnt;
      USERNAME=vinny
      OS=Windows_NT
      PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 7, GenuineIntel



      --------------- S Y S T E M ---------------

      OS: Windows XP Build 2600 Service Pack 2

      CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2

      Memory: 4k page, physical 1039856k(294168k free), swap 2504956k(1851464k free)

      vm_info: Java HotSpot(TM) Client VM (1.6.0_01-b06) for windows-x86, built on Mar 14 2007 00:24:02 by "java_re" with unknown MS VC++:1310



      REPRODUCIBILITY :
      This bug can be reproduced often.

      ---------- BEGIN SOURCE ----------
      package vinDataGraphTest;

      import java.sql.ResultSet;

      import mainInterface.GraphObjectContainer;

      import jdbcConnection.JDBCConnection;
      import jdbcConnection.JDBCConnectionContainer;

      public class DataGraphTest {
      JDBCConnection connection = new JDBCConnection("jdbc:mysql:///test",
      "root",
      "",
      "com.mysql.jdbc.Driver");

      GraphObjectContainer GOC = new GraphObjectContainer(0, 0, new JDBCConnectionContainer(connection));

      GOC.CreateTables();

      connection.CloseImmediately();
      }
      }


      package jdbcConnection;

      import java.sql.*;

      public class JDBCConnection {

      // jdbc:mysql:///test
      // "com.mysql.jdbc.Driver()";
      public final String URL;
      public final String ClassName;

      public final String UserName;
      protected final String Password;
      protected final Connection connection;

      protected boolean isClose = false;
      public boolean getIsClose()
      {
      return isClose;
      }

      public JDBCConnection(String url, String userName, String userPassword, String className) throws Throwable
      {
      URL = url;
      UserName = userName;
      Password = userPassword;
      ClassName = className;

      try
      {
      Class classObject = Class.forName(ClassName);
      DriverManager.registerDriver((Driver) classObject.newInstance());
      }
      catch(Throwable e)
      {
      System.err.println("/ JDBCConnection constructor / JDBC driver register is failed (for cass name " + ClassName + ") with message:\n" + e.getMessage() + "\nby exception type:\n" + e.getClass().getCanonicalName());
      throw e;
      }

      connection = DriverManager.getConnection(URL, UserName, Password);
      }

      public boolean GetAutoCommit() throws SQLException
      {
      return connection.getAutoCommit();
      }

      public void SetAutoCommit(boolean autoCommit) throws SQLException
      {
      connection.setAutoCommit(autoCommit);
      }

      public void commit() throws SQLException
      {
      connection.commit();
      }

      public void rollback() throws SQLException
      {
      connection.rollback();
      }

      public void CloseImmediately() throws SQLException
      {
      isClose = true;
      try
      {
      connection.close();
      }
      catch (SQLException e)
      {
      System.err.println("/ JDBCConnection CloseImmediately / SQLException with message " + e.getMessage());
      throw e;
      }
      }

      public boolean postRequest(String SQLStatement) throws SQLException
      {
      Statement statement = connection.createStatement();
      return statement.execute(SQLStatement);
      }


      public ResultSet getData(String SQLStatement) throws SQLException
      {
      Statement statement = connection.createStatement();
      return statement.executeQuery(SQLStatement);
      }
      }




      package jdbcConnection;

      public class JDBCConnectionContainer
      {
      public JDBCConnection connection;

      public JDBCConnectionContainer(JDBCConnection aconnection)
      {
      connection = aconnection;
      }
      }




      package mainInterface;

      import java.lang.ref.SoftReference;
      import java.sql.SQLException;

      import jdbcConnection.*;

      public class GraphObjectContainer {

      public final long GraphNumber;
      public final long Number;

      protected SoftReference object;
      protected JDBCConnectionContainer connection;

      public GraphAbstractObject Get()
      {
      GraphAbstractObject result = (GraphAbstractObject) object.get();
      if (result == null)
      {
      result = new GraphAbstractObject(GraphNumber, Number, this);
      }

      return result;
      }

      public void CreateTables() throws SQLException
      {
      try
      {
      connection.connection.postRequest("CREATE TABLE IF NOT EXISTS MainGraphTable (metaGraphId BIGINT AUTO_INCREMENT, GraphVersion BIGINT DEFAULT 0, NextObjectNumber BIGINT NOT NULL DEFAULT 1, UUID CHAR(36) NOT NULL, PRIMARY KEY (metaGraphId), UNIQUE (metaGraphId) )");
      }
      catch(Throwable e)
      {
      e.printStackTrace();
      }
      }

      public GraphObjectContainer(long graphNumber, long number, JDBCConnectionContainer aconnection)
      {
      connection = aconnection;
      GraphNumber = graphNumber;
      Number = number;
      }

      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      java -Xint

      Release Regression From : 1.4.2
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

        Attachments

          Activity

            People

            Assignee:
            lancea Lance Andersen
            Reporter:
            ryeung Roger Yeung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: