-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.4 pre 99 : Exception in Multithreading #256
Comments
I also experience this using similar code to above in the latest version and pre-release. It seems to stem from "System.ArgumentException: 'Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.'"
The underlying call in Itinero was
|
example repo using Reminiscence 1.4.0-pre002 The exception we cite above is gone in most cases but there appears to be other problems in Itinero otherwise then.... see for example
75% of the time Always causes an exception: (which comes from Resolve)
Other times I see
|
I have a stack trace string from the latest build: " at Reminiscence.Indexes.Index`1.Get(Int64 id) in src\Reminiscence\Indexes\Index.cs:line 207"
a is equal to 1 at the time of the exception and there are 2 _tags underlying accessorBytesOffset = 0, and id = 3840, _accessorBytesLost = [ 0 ] Also occurs from Resolve... so it makes me think that when segments are in use that DB is removing them and not allowing Read access or something. Hard to tell as I just started really looking and this and I don't have time until Monday 👍 Anyway, If I do find more time this weekend I will let you know! Btw, The call under that was Contains with "translated_profile" as key and "yes" as value; AND This does NOT seem to occur if the graph is contracted with, |
This actually also occurs when multiple contractions are present. When I have only a single contraction I don't see these errors but they come back when I add more then one. |
The issue seems to stem from
However the enumerator throws the same exception I will let you know what else I find. |
This also occurs from
|
What's odd is that if I call the |
Okay... it seems the lock in CalculateFor is causing the issue... at least in some cases. Changing CaulcateFor to lock the DB instead of the ProfileFactorAndSpeedCache seems to remove the exception with or without contractions
Still not sure of how or why since there are a lot of moving pieces. But it seems the _stringIndex gets corrupted somehow by multiple readers when there is not a lock on the db.... |
So it's still appearing in 1.6.0-pre029:
Any way to fix it? Or just not to use it in multi-thread? Also does it mean that we should not use Router in multi-thread at all? |
Hello, bumping this issue, is there any progress on resolving this problem? It's really hard to use Itinero with heavy load, due to exception above. |
Hello,
I got System.Exception' dans Itinero.dll ("Cannot read elements with an id outside of the accessor range.") in a Parallel.For
Here my code:
Regards.
Emmanuel
The text was updated successfully, but these errors were encountered: