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

Rails 6 ActionPack tests cause StackOverflowError #1682

Closed
deepj opened this issue Apr 30, 2019 · 3 comments
Closed

Rails 6 ActionPack tests cause StackOverflowError #1682

deepj opened this issue Apr 30, 2019 · 3 comments
Assignees

Comments

@deepj
Copy link

deepj commented Apr 30, 2019

When I run the whole Rails 6 ActionPack tests I got

truffleruby 1.0.0-rc17-dev-22c6a1c1, like ruby 2.6.2, GraalVM CE Native [x86_64-darwin]

Error:

Error during failsafe response: stack level too deep
	from StackOverflowCheckImpl.java:371:in `com.oracle.svm.core.graal.snippets.StackOverflowCheckSnippets.newStackOverflowError0'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:141:in `block in each_with_block'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:141:in `causes_for'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:145:in `each_with_block'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:145:in `each'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:145:in `collect'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:145:in `wrapped_causes_for'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:44:in `initialize'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:145:in `new'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:145:in `block in wrapped_causes_for'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:141:in `block in collect'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:141:in `block in each'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:141:in `block in each_with_block'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:141:in `causes_for'
  ~/dev/bugs/truffleruby/rails/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:145:in `each_with_block'

The whole output is in this zip (it has ~215 MB after unpacking)
output.txt.zip

@deepj
Copy link
Author

deepj commented Apr 30, 2019

@eregon @chrisseaton can you take a look at the output because the big part comes from TruffleRuby.

@aardvark179 aardvark179 self-assigned this Apr 30, 2019
@aardvark179
Copy link
Contributor

This is being caused by the exception raising code incorrectly setting the exception's cause to itself if an exception is rethrown. The combination of debug and exception wrappers in the tests means exceptions are being rethrown, and their causes recursively traversed, and ends up with the stack overflow.

@aardvark179
Copy link
Contributor

The fix for exception re-raising has now been merged into master

@aardvark179 aardvark179 added this to the 20.0-beta1 milestone May 13, 2019
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

2 participants