c# - Native image for System.Data.Entity crashing IIS -


i have mvc 3 website using entity framework , has started crashing on specific action. wish had more information, can pull windows event viewer this:

faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8 faulting module name: system.data.entity.ni.dll, version: 4.0.30319.1, time stamp: 0x4ba1e2fd exception code: 0xc00000fd fault offset: 0x003aac6a faulting process id: 0x2f0 faulting application start time: 0x01ce540a70477360 faulting application path: c:\windows\syswow64\inetsrv\w3wp.exe faulting module path: c:\windows\assembly\nativeimages_v4.0.30319_32\system.data.entity\dc0c74bc42bbaeffcb7158c7ed0f1653\system.data.entity.ni.dll report id: 3659a820-bffe-11e2-8207-404094d3cf82 

if stop iis, delete native image, , restart iis fine. however, after day or 2 problem come right back.

does have ideas on this? seems if happening in image created automatically ngen.exe, have no idea start debugging. thanks!

update

i able catch complete memory dump of fault. it's stack overflow problem @ core. here stack trace, repeating bits...

system.data.query.internaltrees.basicopvisitoroft`1[[system.__canon, mscorlib]].visitnode(system.data.query.internaltrees.node)     086a9990     0609755c     0f16e1a0     59c4a149     system.data.query.internaltrees.nodeinfovisitor.recomputenodeinfo(system.data.query.internaltrees.node)     01f8f258     0609755c     06412d6c     0f16e1ec     system.data.query.internaltrees.node.initializenodeinfo(system.data.query.internaltrees.command)     086a97f0     59c64fb9     0f16e1b8     5a1d255e     system.data.query.internaltrees.node.getextendednodeinfo(system.data.query.internaltrees.command)     06412da4     0f16e204     59c64ef1     06412da4     system.data.query.internaltrees.basicopvisitoroft`1[[system.__canon, mscorlib]].visit(system.data.query.internaltrees.outerapplyop, system.data.query.internaltrees.node)     06412da4     0f16e220     59c12799     5996fb84     system.data.query.internaltrees.outerapplyop.accept[[system.__canon, mscorlib]](system.data.query.internaltrees.basicopvisitoroft`1<system.__canon>, system.data.query.internaltrees.node)     5996fb84     06412da4     01f8f098     06412da4     system.data.query.internaltrees.basicopvisitoroft`1[[system.__canon, mscorlib]].visitnode(system.data.query.internaltrees.node)     086a97f0     06412da4     0f16e244     59c4a149     system.data.query.internaltrees.nodeinfovisitor.recomputenodeinfo(system.data.query.internaltrees.node)     01f8f258     06412da4     086a9650     0f16e2b4     system.data.query.internaltrees.node.initializenodeinfo(system.data.query.internaltrees.command)     06097914     59c4a751     0f16e26c     00000000     system.data.query.internaltrees.node.getextendednodeinfo(system.data.query.internaltrees.command)     0609794c     0f16e2dc     59c12799     599713cc     system.data.query.internaltrees.projectop.accept[[system.__canon, mscorlib]](system.data.query.internaltrees.basicopvisitoroft`1<system.__canon>, system.data.query.internaltrees.node)     599713cc     0609794c     01f8f098     0609794c     system.data.query.internaltrees.basicopvisitoroft`1[[system.__canon, mscorlib]].visitnode(system.data.query.internaltrees.node)     086a9650     0609794c     0f16e300     59c4a149     system.data.query.internaltrees.nodeinfovisitor.recomputenodeinfo(system.data.query.internaltrees.node)     086a94b0     0609794c     0f16e334     0f16e354     system.data.query.internaltrees.node.initializenodeinfo(system.data.query.internaltrees.command)     086a94b0     03be2b5c     01f8f258     06097c50     system.data.query.internaltrees.nodeinfovisitor.visit(system.data.query.internaltrees.physicalprojectop, system.data.query.internaltrees.node)     06097c88     0f16e37c     59c12799     59971884     system.data.query.internaltrees.physicalprojectop.accept[[system.__canon, mscorlib]](system.data.query.internaltrees.basicopvisitoroft`1<system.__canon>, system.data.query.internaltrees.node)     59971884     06097c88     01f8f098     06097c88     system.data.query.internaltrees.basicopvisitoroft`1[[system.__canon, mscorlib]].visitnode(system.data.query.internaltrees.node)     086a94b0     06097c88     0f16e3a0     59c4a149     system.data.query.internaltrees.nodeinfovisitor.recomputenodeinfo(system.data.query.internaltrees.node)     06097c88     06097c88     086a9460     0f16e3d4     system.data.query.internaltrees.node.initializenodeinfo(system.data.query.internaltrees.command)     086a9494     59c49e5c     0f16e3c8     59c0ffb8     system.data.query.plancompiler.transformationrulescontext.gethashcode(system.data.query.internaltrees.node)     00000000     00000000     06097c88     01deb0f0     system.data.query.plancompiler.transformationrules.process(system.data.query.plancompiler.plancompiler, system.collections.objectmodel.readonlycollection`1<system.collections.objectmodel.readonlycollection`1<system.data.query.internaltrees.rule>>, boolean byref)     0f16e40c     00000000     00000000     06b605bc     system.data.query.plancompiler.transformationrules.process(system.data.query.plancompiler.plancompiler, system.data.query.plancompiler.transformationrulesgroup)     05d6bd90     06a8ac64     06b605bc     0f16e4f4     system.data.query.plancompiler.plancompiler.compile(system.collections.generic.list`1<system.data.query.plancompiler.providercommandinfo> byref, system.data.query.internaltrees.columnmap byref, int32 byref, system.data.common.utils.set`1<system.data.metadata.edm.entityset> byref)     01f8f04c     0f16e4ec     0f16e4f0     00000000     system.data.entityclient.entitycommanddefinition..ctor(system.data.common.dbproviderfactory, system.data.common.commandtrees.dbcommandtree)     01f8efe0     01de3f40     01c645c4     0213e214     system.data.entityclient.entityproviderservices.createcommanddefinition(system.data.common.dbproviderfactory, system.data.common.commandtrees.dbcommandtree)     0213e214     01de3f40     01c645c4     0213e214     system.data.entityclient.entityproviderservices.createdbcommanddefinition(system.data.common.dbprovidermanifest, system.data.common.commandtrees.dbcommandtree)     0213e214     0208a8f0     01f47934     0213e214     system.data.common.dbproviderservices.createcommanddefinition(system.data.common.commandtrees.dbcommandtree)     00000000     00000000     00000000     00000000     system.data.objects.internal.objectqueryexecutionplan.prepare(system.data.objects.objectcontext, system.data.common.commandtrees.dbquerycommandtree, system.type, system.data.objects.mergeoption, system.data.objects.span, system.collections.objectmodel.readonlycollection`1<system.collections.generic.keyvaluepair`2<system.data.objects.objectparameter,system.data.objects.elinq.queryparameterexpression>>)     00000000     00000000     00000003     01f5b740     system.data.objects.elinq.elinqquerystate.getexecutionplan(system.nullable`1<system.data.objects.mergeoption>)     00000000     00000000     01f5c228     00000000     system.data.objects.objectquery`1[[system.__canon, mscorlib]].getresults(system.nullable`1<system.data.objects.mergeoption>)     00000000     00000000     0f16e670     0208a8cc     system.data.objects.objectquery`1[[system.__canon, mscorlib]].system.collections.generic.ienumerable<t>.getenumerator()     00000000     00000000     0f16e704     00000000     system.linq.buffer`1[[system.__canon, mscorlib]]..ctor(system.collections.generic.ienumerable`1<system.__canon>)     0f4cb654     00000000     00000000     00000000     system.linq.enumerable.toarray[[system.__canon, mscorlib]](system.collections.generic.ienumerable`1<system.__canon>)     02089768     020883d4     020881fc     02088104     optimizercore.models.agfield.getfieldpreloadmidpointinformation(system.collections.generic.ienumerable`1<int32>)     05e2e50c     05e2e50c     5d664381     05db9a64     system.web.mvc.actionmethoddispatcher.execute(system.web.mvc.controllerbase, system.object[])     05db9a64     05e22d60     05daee58     01d68350     system.web.mvc.reflectedactiondescriptor.execute(system.web.mvc.controllercontext, system.collections.generic.idictionary`2<system.string,system.object>)     05daf334     05e23b4c     05e23b0c     05db9a3c     system.web.mvc.controlleractioninvoker.invokeactionmethod(system.web.mvc.controllercontext, system.web.mvc.actiondescriptor, system.collections.generic.idictionary`2<system.string,system.object>)     05daf334     05e22ca0     05e23bcc     00000000     system.web.mvc.controlleractioninvoker+<>c__displayclass15.<invokeactionmethodwithfilters>b__12()     0f16e90c     05daf394     05daf1b0     00000000     system.web.mvc.controlleractioninvoker.invokeactionmethodfilter(system.web.mvc.iactionfilter, system.web.mvc.actionexecutingcontext, system.func`1<system.web.mvc.actionexecutedcontext>)     05daf3b8     05e23c00     5d66622e     61954b4e     system.web.mvc.controlleractioninvoker+<>c__displayclass15+<>c__displayclass17.<invokeactionmethodwithfilters>b__14()     05daf3ec     05e23b0c     5d666580     05e22ca0     system.web.mvc.controlleractioninvoker+<>c__displayclass15+<>c__displayclass17.<invokeactionmethodwithfilters>b__14()     05daf334     05daee58     05daf0b4     05daef68     system.web.mvc.controlleractioninvoker.invokeaction(system.web.mvc.controllercontext, system.string)     05bf96e4     05bf961c     05c0974c     00000000     system.web.mvc.controller.executecore()     01d6842c     00000000     00000000     00000000     system.web.mvc.controllerbase.execute(system.web.routing.requestcontext)     0f16eb08     5d672ca6     05bfdc94     0f16eb2c     system.web.mvc.controllerbase.system.web.mvc.icontroller.execute(system.web.routing.requestcontext)     05bfdc94     0f16eb2c     5d66ad06     00000000     system.web.mvc.mvchandler+<>c__displayclass6+<>c__displayclassb.<beginprocessrequest>b__5()     00000000     01dcf71c     5d68febd     5d68fcdf     system.web.mvc.async.asyncresultwrapper+<>c__displayclass1.<makevoiddelegate>b__0()     5d5b8c28     01dcf7ac     0f16eb4c     5d65aaf8     system.web.mvc.mvchandler+<>c__displayclasse.<endprocessrequest>b__d()     5d65ab27     01dcf7a0     0f16eb5c     5d67244d     system.web.mvc.securityutil.<getcallinapptrustthunk>b__0(system.action)     01dcf71c     05bfbb70     0f16eb64     5d67233a     system.web.mvc.mvchandler.endprocessrequest(system.iasyncresult)     0f16eb90     5e0ef242     05be7470     00000000     system.web.mvc.mvchandler.system.web.ihttpasynchandler.endprocessrequest(system.iasyncresult)     05be7470     00000000     00000000     00000000     system.web.httpapplication+callhandlerexecutionstep.system.web.httpapplication.iexecutionstep.execute()     0f16ec5c     61d1965e     61d19673     00000000     system.web.httpapplication.executestep(iexecutionstep, boolean byref)     0f16ec24     05d11148     00000000     05bebd0c     system.web.httpapplication+pipelinestepmanager.resumesteps(system.exception)     00000000     00000000     0f16eca0     0f16ecb0     system.web.httpapplication.beginprocessrequestnotification(system.web.httpcontext, system.asynccallback)     05bc3134     05be7294     05bc2e34     00000080     system.web.httpruntime.processrequestnotificationprivate(system.web.hosting.iis7workerrequest, system.web.httpcontext)     05be7470     9572145a     61cf5d80     0f16f218     system.web.hosting.pipelineruntime.processrequestnotificationhelper(intptr, intptr, intptr, int32)     00000000     0000000c     00000000     00000000     system.web.hosting.pipelineruntime.processrequestnotification(intptr, intptr, intptr, int32)     00c11198     01872c94     0000000c     00000000     webengine4!w3_mgd_handler::processnotification+5b     01871ba8     00000100     00000000     0f16ee1c     webengine4!w3_mgd_handler::dowork+250     00000080     00000000     00efb22c     01871c00     webengine4!requestdowork+2da     00000080     00000000     00efb22c     01871ba8     webengine4!cmgdenghttpmodule::onexecuterequesthandler+1a     01871ba8     01871c00     01871bac     0f16eec8     iiscore!notification_context::requestdowork+128     00efb22c     01871ba8     00000000     01871c00     iiscore!notification_context::callmodulesinternal+305     00000000     00000000     00000000     01871ba8     iiscore!notification_context::callmodules+28     00000000     00000000     00000000     01871ba8     iiscore!w3_context::dostaterequestexecutehandler+36     00000000     00000000     00000000     00000000     iiscore!w3_context::dowork+d7     00000000     00000000     00000001     01871ba8     iiscore!w3_main_context::continuenotificationloop+1f     00000000     00000000     768c1484     0f16f1e0     iiscore!w3_main_context::processindicatecompletion+1f     00000000     01872c94     0f16f1f4     71b4d641     iiscore!w3_context::indicatecompletion+75     00000000     0f16f2a8     0f16f218     0f16f204     webengine4!w3_mgd_handler::indicatecompletion+3d     00000000     0e8ecc18     0f16f254     5d8d8bbd     webengine4!mgdindicatecompletion+24     01872c94     0f16f2a8     9572145a     61cf5d80     domainneutralilstubclass.il_stub_pinvoke(intptr, system.web.requestnotificationstatus byref)     9572145a     61cf5d80     0f16f3ec     5d7467e4     system.web.hosting.pipelineruntime.processrequestnotificationhelper(intptr, intptr, intptr, int32)     00000004     00000003     00000000     00000000     system.web.hosting.pipelineruntime.processrequestnotification(intptr, intptr, intptr, int32)     0e8ecc18     0f16f3a0     61fbf077     0f16f510     clr!um2mthunk_wrapperhelper+10     0f16f510     00000010     00671fa3     00672038     clr!um2mthunk_wrapper+8c     0f16f4a8     9a0857ca     0e8ecc18     00000002     clr!thread::doadcallback+f0     00000002     61fbefeb     0f16f4a8     00000001     clr!um2mdoadcallback+c0     01924570     ffffffff     0f16f510     00000010     0x00672020     00000000     01872c94     00000003     00000004     webengine4!w3_mgd_handler::processnotification+5b     01872c94     71b508c8     0f16f58c     61e75eaf     webengine4!processnotificationcallback+36     01872c94     9a0856c6     0000ffff     00010002     clr!unmanagedperappdomaintpcount::dispatchworkitem+195     0f16f5ef     0f16f5ee     9a0856b6     00000000     clr!threadpoolmgr::newworkerthreadstart+20b     00000000     9a08552e     00000000     61e76a99     clr!threadpoolmgr::workerthreadstart+3d1     00000000     0000027f     00000000     00000000     clr!thread::intermediatethreadproc+4b     0e8b0b60     0f16f854     778e9f42     0e8b0b60     kernel32!basethreadinitthunk+e     0e8b0b60     78e16e6f     00000000     00000000     ntdll!__rtluserthreadstart+70     61da59c0     0e8b0b60     ffffffff     779775ad     ntdll!_rtluserthreadstart+1b  

this bit in particular seems go recursive , hard fault:

system.data.query.internaltrees.node.getextendednodeinfo(system.data.query.internaltrees.command)     0609794c     0f16e2dc     59c12799     599713cc     system.data.query.internaltrees.projectop.accept[[system.__canon, mscorlib]](system.data.query.internaltrees.basicopvisitoroft`1<system.__canon>, system.data.query.internaltrees.node)     599713cc     0609794c     01f8f098     0609794c     system.data.query.internaltrees.basicopvisitoroft`1[[system.__canon, mscorlib]].visitnode(system.data.query.internaltrees.node)     086a9650     0609794c     0f16e300     59c4a149     system.data.query.internaltrees.nodeinfovisitor.recomputenodeinfo(system.data.query.internaltrees.node)     086a94b0     0609794c     0f16e334     0f16e354     system.data.query.internaltrees.node.initializenodeinfo(system.data.query.internaltrees.command)  

i believe chunk of code causes problem: (where fieldids int array containing 1,600 items):

var query = db.basedb.agzonecoordinates                         .where(x => fieldids.contains(x.agzone.fieldid))                         .select(x => new {                             x.agzone.fieldid,                             x.latitude,                             x.longitude                         })                         .asnotracking()                         .toarray(); 

i've tried reducing query size works in chunks of 200 or so, it's still crashing. there entity framework developers out there have seen happen? what's making ef go recursive?

i consider taking statement , changing have include. i'm pretty sure otherwise agzone being lazy loaded within select:

var query = db.basedb.agzonecoordinates                     .where(x => fieldids.contains(x.agzone.fieldid))                     .include(x=>x.agzone)                     .select(x => new {                         x.agzone.fieldid,                         x.latitude,                         x.longitude                     })                     .asnotracking()                     .toarray(); 

if using ef 4 , not 4.1 or newer, you'll have write without lambda.

var query = db.basedb.agzonecoordinates                     .where(x => fieldids.contains(x.agzone.fieldid))                     .include("basedb.agzone") //may require tweaking how model defined                     .select(x => new {                         x.agzone.fieldid,                         x.latitude,                         x.longitude                     })                     .asnotracking()                     .toarray(); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -