Skip to content
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

Critical bug in IronRuby makes web hosting impossible! #4

Open
slide opened this issue Jul 14, 2016 · 1 comment
Open

Critical bug in IronRuby makes web hosting impossible! #4

slide opened this issue Jul 14, 2016 · 1 comment

Comments

@slide
Copy link
Contributor

slide commented Jul 14, 2016

From @cglessner on October 14, 2012 7:30

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;

Copied from original issue: IronLanguages/main#87

@slide
Copy link
Contributor Author

slide commented Jul 14, 2016

From @ashes999 on August 28, 2014 20:45

Maybe you can submit a pull request for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant