テストマシンのEntity Frameworkコードでアクセス違反が発生しました。私はこれが潜在的にスレッドのバグに起因する可能性があるのか、それともハードウェアの問題の可能性が高いのだろうかと思います。ここでSQL ServerにアクセスするEntity Frameworkコードのアクセス違反
は、部分的なコールスタックです:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Data.Common.Internal.Materialization.CoordinatorFactory`1..ctor(Int32 depth, Int32 stateSlot, Expression hasData, Expression setKeys, Expression checkKeys, CoordinatorFactory[] nestedCoordinators, Expression element, Expression elementWithErrorHandling, Expression initializeCollection, RecordStateFactory[] recordStateFactories)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at System.Data.Common.Internal.Materialization.CoordinatorScratchpad.Compile()
これは、SQL Server 2008 R2にアクセスするためにEntity Frameworkの4を使用して、IIS 7上の私たちのASP.NETアプリケーション(サーバー2008 R2 SP1)で起こりました。私はaccess violations with EF and SQL Server CEについて読んだが、完全なSQL Serverを使用している。私たちは、P/InvokeやCOM相互運用機能を持たない私たちのアプリからのネイティブコードと直接対話しているわけではありません。
これは1回しか起こりません。個人的には、それはアプリケーションではなくマシンでの問題だと思う。マシンは数回BSODされている。しかし、私はそれを可能性のあるバグと見なすように求められました。
私はDebugDiagを設定して、この問題が再び発生した場合にこれをキャッチします。誰にも他の提案はありますか?
おかげで、
リチャード
おかげ - 良いアイデア。テストマシンでは、他のテストアプリでデフォルトのアプリケーションプールで実行されていましたが、すべて厳密に管理されたコードにする必要があります。とにかく、それを自分のアプリケーションプールに分けることをお勧めします。ハードウェアの診断も行っています。 –