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

stack level too deep (SystemStackError) #65

Closed
philwhln opened this issue May 2, 2012 · 4 comments
Closed

stack level too deep (SystemStackError) #65

philwhln opened this issue May 2, 2012 · 4 comments

Comments

@philwhln
Copy link

philwhln commented May 2, 2012

"stack level too deep (SystemStackError)"

ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]

I get this issue in addressable/idna.rb

The require of addressable/idna/pure.rb is failing.

require "addressable/idna/pure"

Running this example....
https://github.com/cjbottaro/em-xmlrpc-client

require "eventmachine"
require "em-xmlrpc-client"

EM.run do
  Fiber.new do
    client = XMLRPC::Client.new2("http://blah.com/api")
    result = client.call("someMethod", "arg1", 123) # Uses em-http-request.
  end.resume
end

The issue is being caused because the data assigned to UNICODE_DATA is too large. If I break it up with {}.merge({}).merge({}) statements I do not see this issue.

I cannot reproduce this outside of the above example.

@sporkmonger
Copy link
Owner

Can you duplicate outside Event Machine? I'm really going to need a minimal test case here.

@philwhln
Copy link
Author

philwhln commented May 3, 2012

Hi Bob,

Thanks for the reply.

I managed to replicate it outside of Event Machine, but not outside of Fibers...

require "fiber"

f = Fiber.new do
  require "addressable/idna/pure"
end
f.resume
stack level too deep (SystemStackError)
$ uname -a
Linux stackato-nrb6 2.6.38-13-server #57~lucid1-Ubuntu SMP Tue Mar 6 20:23:13 UTC 2012 x86_64 GNU/Linux
$ ruby -v
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]

My short-term solution is to require "require 'addressable/idna'" at the top of my script before anything else runs, although this is not ideal, because 'addressable/idna' is a dependency of a dependency of a dependency.

@sporkmonger
Copy link
Owner

OK, thanks, I think that should be sufficient for a test case.

@sporkmonger
Copy link
Owner

Yup, confirmed, was able to get a working test that reproduces 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

2 participants