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

Timeouts can cause sporadic failures with IronPython #1931

Closed
pekkaklarck opened this issue Feb 25, 2015 · 1 comment
Closed

Timeouts can cause sporadic failures with IronPython #1931

pekkaklarck opened this issue Feb 25, 2015 · 1 comment

Comments

@pekkaklarck
Copy link
Member

Some of Robot's own acceptance and unit test sporadically fail with exception like this:

TypeError: Unable to cast object of type 'Microsoft.Scripting.Runtime.Uninitialized'
to type 'System.Exception'.

The exact place has varied, but after some investigation it turned out that the problem is related to timeouts. Timeouts didn't even need to exceed, it was enough that they were used. Interestingly actually acceptance tests for timeouts passed and these weird failures were seen elsewhere.

Apparently the root cause is that with IronPython we use a pretty hackish stoppable thread implementation to make it possible to stop keywords if a timeout occurs. I have already prototyped that it is possible to use .NET threads instead and that seems to avoid these strange failures. More testing still needed, though.

@pekkaklarck pekkaklarck self-assigned this Feb 25, 2015
@pekkaklarck pekkaklarck added this to the 2.9 milestone Feb 25, 2015
pekkaklarck added a commit that referenced this issue Feb 25, 2015
Now that IronPython has its own timeout implementation, Jython was the
only one using timeoutthread module and nobody used stoppablethread it
used when not run on Jython. Moved Jython related stuff to new module
and removed not used modules.

Jython and IronPython thread usage is very similar, and it would be
pretty easy to create facades to avoid duplication. Decided to keep
them separate because that would require more code, including a new
module, and added abstraction level would make things a little more
complicated.
pekkaklarck added a commit that referenced this issue Feb 25, 2015
Related to #1931. Assuming tests on CI pass, that issue is now done.
@pekkaklarck
Copy link
Member Author

All unit and acceptance tests pass with IronPython and also with other interpreters. This issue can be considered done.

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

No branches or pull requests

1 participant