Unsolved
This post is more than 5 years old
5 Posts
0
3630
April 21st, 2010 03:00
System.AccessViolationException with most recent .Net Wrapper
Hello,
back in December 2009 we reported some errors (see former discussion: https://community.emc.com/message/439158#439158). We were adviced to use the most recent .Net Wrapper and that is why we updated our systems. (This is the version we are using right now: http://sourceforge.net/projects/cosi-dot-net/)
Since then we get even more errors, especially under high load. This is the error message we see:
System.AccessViolationException: Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.
bei EMC.Centera.FPApi.SDK.FPClip_Open(FPPoolRef inPool, String inClipID, FPInt inOpenMode)
bei EMC.Centera.SDK.FPClip..ctor(FPPool inPool, String inClipID, Int32 inOpenMode)
bei EBV.Backend.BizTalk.CenteraAdapter.CenteraHelper.Retrieve(CenteraRequest request)
bei EBV.Backend.BizTalk.CenteraAdapter.CenteraAdapterOutboundHandler.Execute(Message message, TimeSpan timeout)
Translation for the German error Message: Tried to read/write in protected memory. Most often this is a hint that memory is corrupted.
We contacted EMC again and were told (by Graham Stuart) to resume the conversion in here. So hopefully Graham will pick this up...
If you need any more information please let me know.
Thank you in advance.
Ciao
Ronald


gstuartemc
2 Intern
•
417 Posts
0
April 21st, 2010 05:00
Hi Ronald
I actually meant Andreas to point you at the SourceForge forums for the .Net wrapper but we can try and help you here.
The .Net wrapper is an Open Source community tool and as such is not an official EMC product or covered by any support.
What versions of Windows, Visual Studio and the .Net framework are you using?
Regards, Graham L. Stuart
Centera SDK Architect
RonaldHempel
5 Posts
0
April 21st, 2010 05:00
Hi Graham,
Windows Server 2003 R2 SP2, Fully patched
Visual Studio 2008 SP1
Target Framework Version is 3.5
Ciao
Ronald
gstuartemc
2 Intern
•
417 Posts
0
April 21st, 2010 06:00
Well that all sounds ok. So you build and deploy in the same environment?
If this problem only occurs under heavy load then I don't see how I can reproduce it and I am not aware of anyone else having this issue.
As you have the source, and can reproduce it in your environment, then you are in a far better position to try and find the problem. I can assist you with any queries you may have relating to the internals / design of the code.
Regards, Graham L. Stuart
Centera SDK Architect
hitch2
16 Posts
0
April 28th, 2010 22:00
I was experiencing similar symptoms, including the following errors:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (-1)
COM surrogate has encountered a problem and needs to close. We are sorry for the inconvenience.
The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) (-1)
The stub received bad data. (Exception from HRESULT: 0x800706F7) (-1)
The instruction at reference memory at . The memory could not be "read">
Note that I believe the first error was actually the cause of all subsequent.
I tracked the cause of the error to where I was interfacing with the .Net Wrapper - specifically when retrieving an item from Centera, and calling Marshal.AllocHGlobal. For some reason I was calling this method as follows:
Dim source As IntPtr = Marshal.AllocHGlobal(Size - 1)
Dim streamref = New FPStream(source, blobSize, FPStream.StreamDirection.OutputFromCentera)
itemTag.BlobRead(streamref)
The blobread would then cause more memory than was allocated to be read/written, and hence a memory corruption was the result.