[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Reg: EXCEPTION_ACCESS_VIOLATION on JDBC in Java!!!!



HI,
Software Environment

An Intranet based application has been developed by our organization using JAVA, JSP and Java Script initially in JDK 1.2.2 and later upgraded to JDK 1.3.1

This application is being run on Windows NT 4.0 platform. The Web Server being used is Apache 1.3.20 for Windows NT. The servlet runner being used is Tomcat 3.2.2.

The database being used is MS - SQL Server 7.0.

The application is also using the PoolMan 1.4b5 a freeware for creating a connection pool using which connection to the database is managed.

The application is using JDBC- ODBC Type 1 driver to connect to MS - SQL Server.

Hardware Setup at the Clients place.

At the user site were the application is currently running, the server configuration is as follows

Pentium II Process (500 MHz, Single Process)
393 MB RAM
Hard Disk has been divided into three logical drives of C, E and F (Totaling to 10 GB).
The application is stored in E drive and the Database in F drive.
The virtual memory that has been defined is 395 MB
 
Current size of the database at the user site is 27 MB.
Number of concurrent users of the application is 30.

IE 5.0 and I.E 5.5 is used to work with the application.

The application has been running live for all 22 days and has been accessed round the clock on all 7 days.

Problem being faced

It has been found that at the time of starting the application, the performance of the application is very good. But as the application is continuously used, the performance is reducing considerably and at times Java crashes.

It was noted by the client that MS- SQL Server was occupying memory at a fast phase and was reaching around 185 MB in few hours time. Not only that it was not releasing memory.

At the same time Java itself was occupying memory ranging between 20 to 30 MB. But Java was consuming more amount of CPU time. Above 95% for a long period of time continuously.

Initially Java was also found to occupy an increasing amount of memory space, without any release as the application is continuously accessed.

Not only that the user noticed that when the memory occupied by SQL Server reaches the range of around 180 MB and % of CPU time used by Java continues to be above 90% for a long time, the performance is very low. So they had to stop the tomcat and apache server and start them again.

It was also found that Java was crashing frequently. Sometimes after a long time when the memory occupation of SQL Server had reached around 180 MB and sometimes even within few hours of re-starting Tomcat and Apache.



Measures taken to rectify this problem

Initially this application was developed in JDK 1.2.2. 

User reported crashing of Java on a frequent basis.

We rectified this and the system was working fine.

But soon the problem of Java occupying increasing amount of memory was first reported.

After cross verifying our code to make sure there is no problem out there we posted questions in various forums in the net.  Based on the replies we got, it was decided that we replace JDK 1.2.2 with JDK 1.3.1. 

So the application was upgraded to JDK 1.3.1. After having upgraded the system, every single option was thoroughly checked for compatibility. It was found to work fine.

This stabilized the memory usage by Java. 

User then reported the increasing occupation of memory by SQL Server and the reduction of performance of the application as the time passes. The user also reported sporadic crash of Java.

After going through the SQL Server Online help about SQL Server memory management, we recommended the following changes to the NT Setup.

1. Give equal priority to both the background process as well as foreground process.
2. Assign a virtual memory space equal to 1 - 2 times the available RAM size.

The user has done these changes in their server.

User continued to have low performance from the application and crash of Java.

We did a code walkthrough and did fine tuning of the code in many of the options and the same was installed at the user site.

Summary

Despite all these changes user is finding that as the application is being accessed, the performance is reducing as the time passes. While there has been no report of crashing after the installation of tuned coding. But it has been only two days since the new changes have been effected.

Java used to crash at least once a day. Sometimes after 3 hours of starting the application and some other time after nearly 15 hours of starting the application.

It would be of immense help to us if after going through this document, anybody could suggest were the possible error could be and a solution to it. 

The hardware configuration of the server where the application is currently running has been given. Please tell us know whether there could be any problem in that aspect? What could be the right configuration for this application?

Some of the sample of errors that was seen in the jvm.stdout file when the last three crashes were reported by the user.


First Crash after the application was upgraded to Java 1.3.1

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x1f701369
Function name = SQLGetInfoW
Library=C:\WINNT\System32\ODBC32.dll

Current Java thread:
	at sun.jdbc.odbc.JdbcOdbc.disconnect(Native Method)
	at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(JdbcOdbc.java:2413)
	at sun.jdbc.odbc.JdbcOdbcDriver.disconnect(JdbcOdbcDriver.java:859)
	at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.java:735)
	at sun.jdbc.odbc.JdbcOdbcConnection.finalize(JdbcOdbcConnection.java:85)
	at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
	at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:86)
	at java.lang.ref.Finalizer.access$100(Finalizer.java:17)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:163)

Dynamic libraries:
0x00400000 - 0x00405000 	e:\jdk1.3.1\bin\java.exe
0x77F60000 - 0x77FBE000 	C:\WINNT\System32\ntdll.dll
0x77DC0000 - 0x77DFF000 	C:\WINNT\system32\ADVAPI32.dll
0x77F00000 - 0x77F5E000 	C:\WINNT\system32\KERNEL32.dll
0x77E70000 - 0x77EC5000 	C:\WINNT\system32\USER32.dll
0x77ED0000 - 0x77EFC000 	C:\WINNT\system32\GDI32.dll
0x77E10000 - 0x77E67000 	C:\WINNT\system32\RPCRT4.dll
0x78000000 - 0x78044000 	C:\WINNT\system32\MSVCRT.dll
0x6D420000 - 0x6D4EE000 	e:\jdk1.3.1\jre\bin\hotspot\jvm.dll
0x77FD0000 - 0x77FFA000 	C:\WINNT\System32\WINMM.dll
0x6D220000 - 0x6D227000 	e:\jdk1.3.1\jre\bin\hpi.dll
0x6D3B0000 - 0x6D3BD000 	e:\jdk1.3.1\jre\bin\verify.dll
0x6D250000 - 0x6D266000 	e:\jdk1.3.1\jre\bin\java.dll
0x6D3C0000 - 0x6D3CD000 	e:\jdk1.3.1\jre\bin\zip.dll
0x77BF0000 - 0x77BF7000 	C:\WINNT\System32\rpcltc1.dll
0x6D340000 - 0x6D348000 	E:\jdk1.3.1\jre\bin\net.dll
0x776D0000 - 0x776D8000 	C:\WINNT\system32\WSOCK32.dll
0x776B0000 - 0x776C4000 	C:\WINNT\system32\WS2_32.dll
0x776A0000 - 0x776A7000 	C:\WINNT\system32\WS2HELP.dll
0x77660000 - 0x7766F000 	C:\WINNT\system32\msafd.dll
0x77690000 - 0x77699000 	C:\WINNT\System32\wshtcpip.dll
0x74FF0000 - 0x74FFE000 	C:\WINNT\System32\rnr20.dll
0x6D290000 - 0x6D29A000 	E:\jdk1.3.1\jre\bin\JdbcOdbc.dll
0x1F700000 - 0x1F735000 	C:\WINNT\System32\ODBC32.dll
0x71590000 - 0x71617000 	C:\WINNT\system32\COMCTL32.dll
0x77C40000 - 0x77D7C000 	C:\WINNT\system32\SHELL32.dll
0x77D80000 - 0x77DB2000 	C:\WINNT\system32\comdlg32.dll
0x77A90000 - 0x77A9B000 	C:\WINNT\system32\VERSION.dll
0x779C0000 - 0x779C8000 	C:\WINNT\system32\LZ32.dll
0x1F7F0000 - 0x1F804000 	C:\WINNT\System32\odbcint.dll
0x41230000 - 0x412AE000 	C:\WINNT\System32\sqlsrv32.dll
0x41100000 - 0x4110C000 	C:\WINNT\System32\SQLWOA.dll
0x77800000 - 0x7783A000 	C:\WINNT\system32\NETAPI32.dll
0x77840000 - 0x77849000 	C:\WINNT\system32\NETRAP.dll
0x777E0000 - 0x777ED000 	C:\WINNT\system32\SAMLIB.dll
0x65340000 - 0x653D2000 	C:\WINNT\system32\OLEAUT32.dll
0x77B20000 - 0x77BD7000 	C:\WINNT\system32\ole32.dll
0x75A80000 - 0x75A87000 	C:\WINNT\System32\NDDEAPI.DLL
0x77C00000 - 0x77C18000 	C:\WINNT\System32\WINSPOOL.DRV
0x1F750000 - 0x1F769000 	C:\WINNT\System32\odbccp32.dll
0x73310000 - 0x73318000 	C:\WINNT\System32\DBNMPNTW.DLL
0x76AC0000 - 0x76ADD000 	C:\WINNT\System32\imagehlp.dll
0x73A10000 - 0x73A22000 	C:\WINNT\System32\PSAPI.DLL

Local Time = Wed Sep 19 17:23:47 2001
Elapsed Time = 8434
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.3.1_01 mixed mode)
#
# An error report file has been saved as hs_err_pid391.log.
# Please refer to the file for further information.
#

Second Crash after upgrading to Java 1.3.1

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_INVALID_HANDLE occurred at PC=0x77f89181
Function name=RtlRaiseStatus
Library=C:\WINNT\System32\ntdll.dll

Current Java thread:
	at sun.jdbc.odbc.JdbcOdbc.disconnect(Native Method)
	at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(JdbcOdbc.java:2413)
	at sun.jdbc.odbc.JdbcOdbcDriver.disconnect(JdbcOdbcDriver.java:859)
	at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.java:735)
	at sun.jdbc.odbc.JdbcOdbcConnection.finalize(JdbcOdbcConnection.java:85)
	at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
	at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:86)
	at java.lang.ref.Finalizer.access$100(Finalizer.java:17)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:163)

Dynamic libraries:
0x00400000 - 0x00405000 	e:\jdk1.3.1\bin\java.exe
0x77F60000 - 0x77FBE000 	C:\WINNT\System32\ntdll.dll
0x77DC0000 - 0x77DFF000 	C:\WINNT\system32\ADVAPI32.dll
0x77F00000 - 0x77F5E000 	C:\WINNT\system32\KERNEL32.dll
0x77E70000 - 0x77EC5000 	C:\WINNT\system32\USER32.dll
0x77ED0000 - 0x77EFC000 	C:\WINNT\system32\GDI32.dll
0x77E10000 - 0x77E67000 	C:\WINNT\system32\RPCRT4.dll
0x78000000 - 0x78044000 	C:\WINNT\system32\MSVCRT.dll
0x6D420000 - 0x6D4EE000 	e:\jdk1.3.1\jre\bin\hotspot\jvm.dll
0x77FD0000 - 0x77FFA000 	C:\WINNT\System32\WINMM.dll
0x6D220000 - 0x6D227000 	e:\jdk1.3.1\jre\bin\hpi.dll
0x6D3B0000 - 0x6D3BD000 	e:\jdk1.3.1\jre\bin\verify.dll
0x6D250000 - 0x6D266000 	e:\jdk1.3.1\jre\bin\java.dll
0x6D3C0000 - 0x6D3CD000 	e:\jdk1.3.1\jre\bin\zip.dll
0x77BF0000 - 0x77BF7000 	C:\WINNT\System32\rpcltc1.dll
0x6D340000 - 0x6D348000 	E:\jdk1.3.1\jre\bin\net.dll
0x776D0000 - 0x776D8000 	C:\WINNT\system32\WSOCK32.dll
0x776B0000 - 0x776C4000 	C:\WINNT\system32\WS2_32.dll
0x776A0000 - 0x776A7000 	C:\WINNT\system32\WS2HELP.dll
0x77660000 - 0x7766F000 	C:\WINNT\system32\msafd.dll
0x77690000 - 0x77699000 	C:\WINNT\System32\wshtcpip.dll
0x74FF0000 - 0x74FFE000 	C:\WINNT\System32\rnr20.dll
0x6D290000 - 0x6D29A000 	E:\jdk1.3.1\jre\bin\JdbcOdbc.dll
0x1F700000 - 0x1F735000 	C:\WINNT\System32\ODBC32.dll
0x71590000 - 0x71617000 	C:\WINNT\system32\COMCTL32.dll
0x77C40000 - 0x77D7C000 	C:\WINNT\system32\SHELL32.dll
0x77D80000 - 0x77DB2000 	C:\WINNT\system32\comdlg32.dll
0x77A90000 - 0x77A9B000 	C:\WINNT\system32\VERSION.dll
0x779C0000 - 0x779C8000 	C:\WINNT\system32\LZ32.dll
0x1F7F0000 - 0x1F804000 	C:\WINNT\System32\odbcint.dll
0x77B20000 - 0x77BD7000 	C:\WINNT\system32\ole32.dll
0x1F750000 - 0x1F769000 	C:\WINNT\System32\odbccp32.dll
0x41230000 - 0x412AE000 	C:\WINNT\System32\sqlsrv32.dll
0x41100000 - 0x4110C000 	C:\WINNT\System32\SQLWOA.dll
0x77800000 - 0x7783A000 	C:\WINNT\system32\NETAPI32.dll
0x77840000 - 0x77849000 	C:\WINNT\system32\NETRAP.dll
0x777E0000 - 0x777ED000 	C:\WINNT\system32\SAMLIB.dll
0x65340000 - 0x653D2000 	C:\WINNT\system32\OLEAUT32.dll
0x75A80000 - 0x75A87000 	C:\WINNT\System32\NDDEAPI.DLL
0x77C00000 - 0x77C18000 	C:\WINNT\System32\WINSPOOL.DRV
0x73310000 - 0x73318000 	C:\WINNT\System32\DBNMPNTW.DLL
0x76AC0000 - 0x76ADD000 	C:\WINNT\System32\imagehlp.dll
0x73A10000 - 0x73A22000 	C:\WINNT\System32\PSAPI.DLL

Local Time = Sat Sep 22 00:16:17 2001
Elapsed Time = 29006
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.3.1_01 mixed mode)
#
# An error report file has been saved as hs_err_pid214.log.
# Please refer to the file for further information.
#


Third Crash after upgrading to Java 1.3.1 

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x1f7028cd
Function name=SQLMoreResults
Library=C:\WINNT\System32\ODBC32.dll

Current Java thread:
	at sun.jdbc.odbc.JdbcOdbc.disconnect(Native Method)
	at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(JdbcOdbc.java:2413)
	at sun.jdbc.odbc.JdbcOdbcDriver.disconnect(JdbcOdbcDriver.java:859)
	at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.java:735)
	at sun.jdbc.odbc.JdbcOdbcConnection.finalize(JdbcOdbcConnection.java:85)
	at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
	at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:86)
	at java.lang.ref.Finalizer.access$100(Finalizer.java:17)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:163)

Dynamic libraries:
0x00400000 - 0x00405000 	e:\jdk1.3.1\bin\java.exe
0x77F60000 - 0x77FBE000 	C:\WINNT\System32\ntdll.dll
0x77DC0000 - 0x77DFF000 	C:\WINNT\system32\ADVAPI32.dll
0x77F00000 - 0x77F5E000 	C:\WINNT\system32\KERNEL32.dll
0x77E70000 - 0x77EC5000 	C:\WINNT\system32\USER32.dll
0x77ED0000 - 0x77EFC000 	C:\WINNT\system32\GDI32.dll
0x77E10000 - 0x77E67000 	C:\WINNT\system32\RPCRT4.dll
0x78000000 - 0x78044000 	C:\WINNT\system32\MSVCRT.dll
0x6D420000 - 0x6D4EE000 	e:\jdk1.3.1\jre\bin\hotspot\jvm.dll
0x77FD0000 - 0x77FFA000 	C:\WINNT\System32\WINMM.dll
0x6D220000 - 0x6D227000 	e:\jdk1.3.1\jre\bin\hpi.dll
0x6D3B0000 - 0x6D3BD000 	e:\jdk1.3.1\jre\bin\verify.dll
0x6D250000 - 0x6D266000 	e:\jdk1.3.1\jre\bin\java.dll
0x6D3C0000 - 0x6D3CD000 	e:\jdk1.3.1\jre\bin\zip.dll
0x77BF0000 - 0x77BF7000 	C:\WINNT\System32\rpcltc1.dll
0x6D340000 - 0x6D348000 	E:\jdk1.3.1\jre\bin\net.dll
0x776D0000 - 0x776D8000 	C:\WINNT\system32\WSOCK32.dll
0x776B0000 - 0x776C4000 	C:\WINNT\system32\WS2_32.dll
0x776A0000 - 0x776A7000 	C:\WINNT\system32\WS2HELP.dll
0x77660000 - 0x7766F000 	C:\WINNT\system32\msafd.dll
0x77690000 - 0x77699000 	C:\WINNT\System32\wshtcpip.dll
0x74FF0000 - 0x74FFE000 	C:\WINNT\System32\rnr20.dll
0x6D290000 - 0x6D29A000 	E:\jdk1.3.1\jre\bin\JdbcOdbc.dll
0x1F700000 - 0x1F735000 	C:\WINNT\System32\ODBC32.dll
0x71590000 - 0x71617000 	C:\WINNT\system32\COMCTL32.dll
0x77C40000 - 0x77D7C000 	C:\WINNT\system32\SHELL32.dll
0x77D80000 - 0x77DB2000 	C:\WINNT\system32\comdlg32.dll
0x77A90000 - 0x77A9B000 	C:\WINNT\system32\VERSION.dll
0x779C0000 - 0x779C8000 	C:\WINNT\system32\LZ32.dll
0x1F7F0000 - 0x1F804000 	C:\WINNT\System32\odbcint.dll
0x77B20000 - 0x77BD7000 	C:\WINNT\system32\ole32.dll
0x1F750000 - 0x1F769000 	C:\WINNT\System32\odbccp32.dll
0x41230000 - 0x412AE000 	C:\WINNT\System32\sqlsrv32.dll
0x41100000 - 0x4110C000 	C:\WINNT\System32\SQLWOA.dll
0x77800000 - 0x7783A000 	C:\WINNT\system32\NETAPI32.dll
0x77840000 - 0x77849000 	C:\WINNT\system32\NETRAP.dll
0x777E0000 - 0x777ED000 	C:\WINNT\system32\SAMLIB.dll
0x65340000 - 0x653D2000 	C:\WINNT\system32\OLEAUT32.dll
0x75A80000 - 0x75A87000 	C:\WINNT\System32\NDDEAPI.DLL
0x77C00000 - 0x77C18000 	C:\WINNT\System32\WINSPOOL.DRV
0x73310000 - 0x73318000 	C:\WINNT\System32\DBNMPNTW.DLL
0x76AC0000 - 0x76ADD000 	C:\WINNT\System32\imagehlp.dll
0x73A10000 - 0x73A22000 	C:\WINNT\System32\PSAPI.DLL

Local Time = Sun Sep 23 17:08:36 2001
Elapsed Time = 108454
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.3.1_01 mixed mode)
#
# An error report file has been saved as hs_err_pid137.log.
# Please refer to the file for further information.
#



Subsequently also we have had crashes which were similar to the one's specified above.


Thanks in advance,

Velmurugan P
SoftSolutions
Chennai.



 




Reply to: