Question : IIS 7.0 Worker process crashes due to ODP.NET?

For about 4 months now i've had a problem with IIS 7 constantly crashing randomly with the dreaded

"IIS Worker Process encountered a problem and needed to close"

I even posted a question here without getting any response.

Anyways i have finally learned to use windbg and now today after several months of debugging i
get this from doing an  !analyze -v in windbg:
-----------------------------------------------------------------------------------------------
FAULTING_IP:
OraOps10w!OpsSqlFreeValCtx+25
1f814c45 83781000        cmp     dword ptr [eax+10h],0

EXCEPTION_RECORD:  ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 1f814c45 (OraOps10w!OpsSqlFreeValCtx+0x00000025)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 29158ff8
Attempt to read from address 29158ff8

FAULTING_THREAD:  00001fc8

DEFAULT_BUCKET_ID:  INVALID_POINTER_READ

PROCESS_NAME:  w3wp.exe

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

READ_ADDRESS:  29158ff8

NTGLOBALFLAG:  2000000

APPLICATION_VERIFIER_FLAGS:  0

MANAGED_STACK:
(TransitionMU)
0CE9F184 1A769992 Oracle_DataAccess!Oracle.DataAccess.Client.OracleDataReader.Dispose(Boolean)+0x282
0CE9F1F0 2088622D Oracle_DataAccess!Oracle.DataAccess.Client.OracleDataReader.Finalize()+0x15
(TransitionUM)

LAST_CONTROL_TRANSFER:  from 1f80ef59 to 1f814c45

STACK_TEXT:  
1a769992 Oracle_DataAccess!Oracle.DataAccess.Client.OracleDataReader.Dispose(Boolean)
2088622d Oracle_DataAccess!Oracle.DataAccess.Client.OracleDataReader.Finalize()


PRIMARY_PROBLEM_CLASS:  INVALID_POINTER_READ

BUGCHECK_STR:  APPLICATION_FAULT_INVALID_POINTER_READ

FOLLOWUP_IP:
+1a769992
1a769992 83c420          add     esp,20h

SYMBOL_STACK_INDEX:  0

SYMBOL_NAME:  Oracle_DataAccess!Oracle.DataAccess.Client.OracleDataReader.Dispose(Boolean)+1a769992

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: Oracle_DataAcces

IMAGE_NAME:  Oracle.DataAccess.dll

DEBUG_FLR_IMAGE_TIMESTAMP:  0

STACK_COMMAND:  dds ce9f184 ; kb

FAILURE_BUCKET_ID:  Oracle.DataAccess.dll!Unloaded_c0000005_INVALID_POINTER_READ

BUCKET_ID:  APPLICATION_FAULT_INVALID_POINTER_READ_Oracle_DataAccess!Oracle.DataAccess.Client.OracleDataReader.Dispose(Boolean)+1a769992

Followup: MachineOwner
-----------------------------------------------------------------------------------------------

This seems to me like its the oracle (ODP.NET) that is the cause of the page_heap error that constantly crashes my w3wp.exe, but only when i call .Dispose() on the objects, could this really be possible?
i mean isn't it good to dispose the objects when you're done with them?

I have commented out all my .Dispose() on Oracle objects (even though the analyze indicates that its only the datareader.dispose() that causes this) and now i dont get that error anymore which i find is very strange.

The question then is: should i just forget about disposing the oracle objects and continue with my web app, or does this prove that something is wrong with the ODP.NET providers and i should contact oracle?

any advice would be appreciated, since im not even sure i understand the analysis correctly =)


Answer : IIS 7.0 Worker process crashes due to ODP.NET?

Yes, this is possible.

Most likely the issue is in the ODP.Net code - wouldn't be the first time ODP.Net has been flakey.....

If the DataReader is a managed object you should be fine in not disposing it - that will happen if necessary when it gets garbage collected.  If it is unmanaged code you could hot some memory issues if you don't dispose properly.

Personally, I would contact Oracle about this and see if there is a newer/fixed version of ODP.Net you can use.

Dave Dietz
Random Solutions  
 
programming4us programming4us