Hey all,
I have been stuck for a while, trying to solve this on my own, but I cannot locate the actual cause for the error, and I hope that maybe the details of it might give someone a clue as to what might be going on, so that I can get some new angle and approach the problem again.
I like to consider myself a super problem solver guy in managed land. The problems can always be found and fixed eventually. But when it comes to unmanaged code, well that’s simply not something I’ve been doing, and it’s completely veiled to me for this reason. So, it’s hard for me to tell what this is about.
Now, since this is not an error I’ve seen anyone mention, I assume it is some implementation error on my side. However, I can’t find anything substantial to support it.
I am running out of ideas and the single substantial clue I have is pointing towards safe_app.dll
.
The problem occurs both on alpha-2 and on local network, no difference discerned (other than latency ofc).
- What application or program are you running?
SAFEExamples.Notebook, referencing dlls from SAFE.EventStore and SAFE.DotNet (which is a C# wrapper around safe_app.dll
based on SafeMessages example app).
I compiled safe_app
and system_uri
from alpha_2 branch.
SAFE.DotNet.Auth also based on SafeMessages example app, is included in the Notebook example app.
- What’s the version number?
N/A
- What are the version numbers of the supporting dependencies that you are using locally? For example, Node.js, NPM, and Rust.
VS2017 Community, dot net core 2.0
- Which operating system are you using and which version number?
Windows 10 Education in a Hyper-V VM (Microsoft Windows NT 6.2.9200.0)
- What steps did you follow when the error occurred and how can we reproduce it?
So, when debugging, and performing a repeatable set of operations, I get a crash. Sometimes there’s an indication from debugger that the error comes from unmanaged code.
Since I have turned on catching of all possible exceptions, it seems likely (I nearly never see this when not dealing with unmanaged code, exceptions are almost always caught).
In EventViewer I have information like this:
Fault bucket 1292424819593853224, type 4
Event Name: APPCRASH
Response: Not available
Cab Id: 0
Problem signature:
P1: dotnet.exe
P2: 2.0.25816.2
P3: 59e535ea
P4: StackHash_afc1
P5: 0.0.0.0
P6: 00000000
P7: c0000005
P8: PCH_D3_FROM_**safe_app**+0x000000000008C363
P9:
P10:
The crash is very predictable, but more with the writes than the reads. When I run around 8 (x2) write operations in a row it crashes. It takes more read operations.
The writes operations look like this:
First creating an MD with a couple of entries, and an IMD, then inserting to the MD + 1 new IMD per iteration.
The reads just fetches this data.
All of this, just to clarify, is same on local network as well as alpha-2 network.
I did a series of tests to try find a pattern:
(For the time being you can ignore InvalidHashName
error, since it has something to do with the local network, and is not relevant for this problem. Although it is also a problem I would like solved, but I’m trying to dilute my addition to support-requests here as much as possible, so another time )
Results of iterations of GETs
- 34 gets then dotnet crash
- InvalidNameHash (5 s later)
- 34 gets then UnhandledException (NullReferenceException) with no stack trace (Your app has entered a break state, but no code is currently executing that is supported by the selected debug engine (e.g. only native runtime code is executing).)
Thread being at [Managed to Native Transition] (5 s later) - InvalidNameHash (~ 2 min later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- 145 gets then dotnet crash (5 s later)
- 32 gets then dotnet crash (45 s later)
- InvalidNameHash (10 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- 102 gets then then UnhandledException (NullReferenceException) with no stack trace (5 s later)
- 65 gets then dotnet crash (45 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- 30 gets then dotnet crash (10 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- 29 gets then then UnhandledException (NullReferenceException) with no stack trace (5 s later)
- InvalidNameHash (15 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (45 s later)
- 60 gets then (Your app has entered a break state, but no code is currently executing that is supported by the selected debug engine.) One thread at IDataSelfEncryptorReaderFreeNative (10 s later)
- 59 gets then dotnet crash (45 s later)
- InvalidNameHash (15 s later)
- InvalidNameHash (5 s later)
- 25 gets then dotnet crash (5 min later)
- InvalidNameHash (5 s later)
- 27 gets then dotnet crash (5 s later)
- InvalidNameHash (15 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- 26 gets then dotnet crash (5 s later)
- InvalidNameHash (15 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- InvalidNameHash (5 s later)
- 55 gets then dotnet crash (15 s later)
The info from the debugger, and the fact that I cannot actually catch the exceptions, all suggest that it stems from the unmanaged code, and this is all supported by the error event in EventViewer.
Doesn’t matter if I iterate with no delay or put in ~1 minut delay between iterations.
However, doing a few, then waiting 5-10 minutes or so, will allow a bit more than expected, but then it inevitably crashes anyway.
Ok so, just throwing this out there, hoping that maybe someone has a Eureka moment.