tcServer JVM crash - EXCEPTION_ACCESS_VIOLATION (0xc0000005) tcServer JVM crash - EXCEPTION_ACCESS_VIOLATION (0xc0000005) jenkins jenkins

tcServer JVM crash - EXCEPTION_ACCESS_VIOLATION (0xc0000005)


I believe your crash is caused by some issue with the SQL Server driver when trying to use Integrated Authentication (also referred as Integrated Security)

from MS website (emphasis mine)

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:\sqljdbc_\\auth\

NoteIf you are running a 32-bit Java Virtual Machine (JVM), use the sqljdbc_auth.dll file in the x86 folder, even if the operating system is the x64 version. If you are running a 64-bit JVM on a x64 processor, use the sqljdbc_auth.dll file in the x64 folder. If you are running a 64-bit JVM on a IA-64 processor, use the sqljdbc_auth.dll file in the IA64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll.

For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_\enu\auth\x86

{end of quote from MS website}

PS: To turn off integrated authentication / security change the integratedSecurity flag on the JDBC Connection String to false (ie: integratedSecurity=false)

More info at:

http://msdn.microsoft.com/en-us/library/ms378428(v=sql.90).aspx


Check the sql driver (sqljdbc4.jar) is up to date and (in sync) i.e from the same release as your sqljdbc_auth.dll.

For example: if your using the auth dll sourced from a download such as this:

C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_4.0\enu\auth\x64\sqljdbc_auth.dll

Then you should be using the matching driver from the same release:

C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_4.0\enu\sqljdbc4.jar

I suspect your fix worked because you started with a jdbc 3 auth dll mixed with a jdbc 4 driver. Reverting the driver to 3.0 fixed the issue. Try promoting both to 4.


The assembly code does the following:

6da0307b:   48 8b 17                mov    rdx,QWORD PTR [rdi]6da0307e:   74 16                   je     0x6da030966da03080:   8b 52 08                mov    edx,DWORD PTR [rdx+8]6da03083:   0f b6 0d b6 61 5e 00    movzx  ecx,BYTE PTR ds:0x5e61b66da0308a:   48 d3 e2                shl    rdx,cl6da0308d:   48 03 15 a4 61 5e 00    add    rdx,QWORD PTR ds:0x5e61a46da03094:   eb 04                   jmp    0x6da0309a6da03096:   48 8b 52 08             mov    rdx,QWORD PTR [rdx+8]6da0309a:   48 8b 52 70             mov    rdx,QWORD PTR [rdx+112]6da0309e:   48 8b ce                mov    rcx,rsi6da030a1:   e8 4a 98 0c 00          call   0x6dacc8f06da030a6:   48 83 7c 24 28 00       cmp    QWORD PTR [rsp+40],0x06da030ac:   48 8b f0                mov    rsi,rax6da030af:   74 0a                   je     0x6da030bb6da030b1:   48 8d 4c 24 20          lea    rcx,[rsp+32]6da030b6:   e8 55 72 12 ??          call   0x????

at 0x6da0309a it fails cause it can't read memory. The address in rdx (0x000000036d7c8e70) is referencing incorrect memory address according to the memory map.From the dissassembly, the code does not seem to do the right thing. I suggest you do the following:

  1. Run a memory test (memtest86 or similar)
  2. Try to increase stack size (192k is too low for a 64bit platform), try -Xss512k
  3. Try not to use compressed oops (-XX:-UseCompressedOops)
  4. Try verifying that the code above actually matches jvm.dll+0x12309a
  5. Try running it on Intel instead of AMD