Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

Critical bug in IronRuby makes web hosting impossible! #87

Closed
ltwlf opened this issue Oct 14, 2012 · 2 comments
Closed

Critical bug in IronRuby makes web hosting impossible! #87

ltwlf opened this issue Oct 14, 2012 · 2 comments

Comments

@ltwlf
Copy link

ltwlf commented Oct 14, 2012

I've a project called "IronSP" where I host the DLR (.net 2.0) and IronRuby in SharePoint/ASP.NET. During a load test I found a critical bug. I always got the following error while load testing (yout have to use arrays to cause the error):
"System.IndexOutOfRangeException: Index was outside the bounds of the array"
Wow, to hunt this bug has almost taken two weeks. The issue is that in the _infiniteTracker field in IronRuby.Runtime.RecursionTracker is missing the static keyword and without this keyword the [ThreadStatic] attribute is useless. Hosting the engine in ASP.NET means many threads will access the infiniteTracker dictionary and when two hits the _infiniteTracker in parallel the dictionary will be corrupted an every access to it throws a IndexOutOfRangeException. The static keyword in combination with [ThreadStatic] avoids this issue, because the dictionary will be created per Request/Thead. Please fix that in original IronRuby source. It affects the current version and IronRuby 1.0. Would be awesome if some one coud fixes in 1.0. I did the fix already, but can't sign the assemblies with the original MS keys.

class IronRuby.Runtime.RecursionTracker

[ThreadStatic]
private static Dictionary<object, bool> _infiniteTracker;

@ashes999
Copy link

Maybe you can submit a pull request for this?

@slide
Copy link
Contributor

slide commented Jul 14, 2016

This issue was moved to IronLanguages/ironruby#4

@slide slide closed this as completed Jul 14, 2016
@slide slide removed the untriaged label Aug 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants