EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Fatal Exception

Posted: 03/03/2015 16:23:56
by Nick Bethmann (Standard support level)
Joined: 01/07/2015
Posts: 9

In my .Net app I'm getting a fatal access violation so I tried to reproduce with sample mapper app and was able to do so. The error occurs when trying to open .docx files in Word 2013. Sometimes I get a "file corrupted" error from Word and other times the cbfs app just dies. I have driver version loaded.

Faulting application name: Mapper.vshost.exe, version: 12.0.30723.0, time stamp: 0x53cf4fe5
Faulting module name: ntdll.dll, version: 6.3.9600.17630, time stamp: 0x54b0d74f
Exception code: 0xc0000374
Fault offset: 0x000e5994
Faulting process id: 0x4804
Faulting application start time: 0x01d055feb9c54807
Faulting application path: C:\temp\dotNET\C#\Mapper\bin\Debug\Mapper.vshost.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: d7ba6e09-c1f2-11e4-827d-90b11c96b835
Faulting package full name:
Faulting package-relative application ID:

I ran a minidump on my app and here is the fault:


Exception Information
NTDLL!RTLPLOWFRAGHEAPALLOCFROMCONTEXT+66In vdisk_windows__PID__6280__Date__03_03_2015__Time_04_51_13PM__119__Second_Chance_Exception_C0000005.dmp the assembly instruction at ntdll!RtlpLowFragHeapAllocFromContext+66 in C:\Windows\System32\ntdll.dll from Microsoft Corporation has caused an access violation exception (0xC0000005) when trying to read from memory location 0x00000000 on thread 26

C++ Developer Nick
Posted: 03/04/2015 11:14:47
by Volodymyr Zinin (Team)

Moved to HelpDesk for further investigation.
Posted: 06/01/2015 12:37:15
by Todd Gleason (Standard support level)
Joined: 09/11/2014
Posts: 21

I can't confirm the crash, but we have seen file corruption as well--only with Word though, not with our internal processes. Could you share the outcome of this investigation? We're seeing this with version 5.1.156.
Posted: 06/01/2015 12:49:23
by Volodymyr Zinin (Team)

The bug described in this topic has already been fixed in the last build (which is 5.1.159). It would be nice if you tried the problem with it.
Posted: 06/11/2015 10:05:22
by Todd Gleason (Standard support level)
Joined: 09/11/2014
Posts: 21

It looks most likely (thought not yet certain) that our corruption issue was not the result of the CBFS version, but instead stemmed from us not being aware that we needed to implement a background update mechanism involving NotifyDirectoryChange(). Once we hit upon this API, we found lots of articles about it on here, but prior to that, we'd never noticed the API nor seen mention of it in the Mapper sample we used as a basis.

I would really like to have seen a more advanced sample that would demonstrate the various techniques needed to proxy into a shared network folder--or at least made mention of "if you need to do this, do this, this, and this" in the comments. It seems like a number of your customers have to do this, so I'm sure doing something would benefit a lot of people.

The network proxy case for us has involved numerous techniques, for instance:

  • a context management scheme to deal with file handles (since we have potentially multiple consumers, and we need to share properly with other systems rather than demanding exclusive access to everything; I believe this surfaces especially in reads and writes where you don't have the same context information you do when opening files)
  • disabling CBFS optimizations (since we need all calls to come through for purposes of audit, for instance)
  • installing FileSystemWatchers with backup polling on files and directories that were recently used and believed to be in the OS cache, along with NotifyDirectoryChange() for changes
    • and intelligent cleanup (via ReleaseUnusedFiles()) when this system bogs down
    • at open time, additional detection of changes, so that if the FileSystemWatcher system fails to notice something, we fail to open the file rather than risk corruption

It may be that EldoS (as filesystem gurus) would have better practices for many of these situations, and seeing those in a more thorough sample could have saved us a great deal of time and effort. Also in more expansive API documentation that explains the "why" and gives scenarios where you should do certain things.
Posted: 06/13/2015 01:17:07
by Eugene Mayevski (Team)

The problem with advanced samples is that nobody uses them, asking for one-line samples. And what you describe is a good piece of custom work that is rarely needed outside of your project.

If you want, we can help you with such tasks via a custom service (for a fee), and then we'd need more detailed specification for the task.

Sincerely yours
Eugene Mayevski



Topic viewed 3873 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!