APAR status
Closed as program error.
Error description
Error Message: Customer was experiencing crash ntdll.dll RtlEnterCriticalSection. . Stack Trace: Follwing was the current thread details from jdump o/p :- MEMORY ACCESS ERROR in ntdll.dll (ip)=77F8206B at ntdll.dll RtlEnterCriticalSection + 000B (ip)=4B1327D1 at ODBC32.dll ODBC32.dll + 27D1 (ip)=4B1327EB at ODBC32.dll ODBC32.dll + 27EB (ip)=4B13A697 at ODBC32.dll SQLCancel + 15A8 (ip)=4B13A770 at ODBC32.dll SQLAllocConnect + 0019 (ip)=4B121060 at JdbcOdbc.dll _Java_sun_jdbc_odbc_JdbcOdbc_allocConnect@16 + 0030 (cc)=4AEB6E55 at sun/jdbc/odbc/JdbcOdbc.allocConnect (I<OSB>B)I native (pc)=48254D04 at sun/jdbc/odbc/JdbcOdbc.SQLAllocConnect (I)I (ip)=4393E056 at jitc.dll _InvokeInterpreterFromJIT + 009C (cc)=0233A74C at sun/jdbc/odbc/JdbcOdbcConnection.initialize (pc)=48243EAB at sun/jdbc/odbc/JdbcOdbcDriver.connect (pc)=47E59C46 at java/sql/DriverManager.getConnection (pc)=47E597E9 at java/sql/DriverManager.getConnection (pc)=48241C8F at com/gtech/connector/oag/OagClient.createConnection (pc)=48241AC8 at com/gtech/connector/oag/OagClient.getConnection .
Local fix
Problem summary
As the crash was happening in ODBC32.dll we asked the customer to involve Microsoft in this issue and figured out that one of the argument hEnv is getting corrupted. So narrowed down the area of code and found that the bug lies in JdbcOdbcDriver.connect(). Following was the scenerio because of which we were experiencing the crash :- 1) T1 is getting finished with its work on a connection C1 and calls C1.close() where C1 is an instance of type JdbcOdbcConnection. As part of close connection it calls the JdbcOdbcDriver.closeConnection(). Note that this method is not marked as synchronized. This method checks to see if this is the last connection and since no other connections are currently active, it will call SQLFreeEnv. But before it has called SQLFreeEnv and set a global variable hEnv to NULL, thread T2 has called JdbcOdbcDriver.connect() and done a check for this variable and finds that it is not NULL which will make it think a valid hEnv will exist. Thread T1 continues and calls SQLFreeEnv() which releases the OpenRDA ODBC driver DLL. 2) T2 needs a new connection so it calls java/sql/DriverManager.getConnection which in turn calls the connect() method of the JdbcOdbcDriver class. The connect() method checks to see if hEnv is NULL. If it is not then it will not allocate a new hEnv because it assumes one already exists. But this is not true in this case because T1 has released it. T2 then goes on to call the SQLAllocConnect() call and passes in the hEnv environment variable which has already been freed. This causes the ODBC driver manager to crash.
Problem conclusion
This defect will be fixed in: 1.4.2 SR11 . Synchronized the methods who were causing the problem. . To obtain the fix: Install build 20080615 or later
Temporary fix
Comments
APAR Information
APAR number
PK63006
Reported component name
JAVA(1.3/1.4 CO
Reported component ID
5648C9800
Reported release
42A
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2008-03-20
Closed date
2008-06-17
Last modified date
2008-06-17
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
JAVA(1.3/1.4 CO
Fixed component ID
5648C9800
Applicable component levels
R42A PSN
UP
R42L PSN
UP
R42W PSN
UP
R420 PSN
UP
[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SUPPORT","label":"IBM Worldwide Support"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.4.2","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
09 February 2022