Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Application boot fails due to exhausted stack frames. #5759
Provide at least:
Other relevant info you may wish to add:
Ported JRuby application boots, interprets all Ruby code and the apisonator applictaion runs.
I am seeing an issue when booting an application using JRuby. This porting project that's being tried for the first time.
I've tried tuning the JVM to permit larger stack frames. From the default (on my system) from 1024 to 32,768. 32 times larger. Setting the jvm options here
My reproducer is the ported project branch. Using that branch the project can be built then run.
You can build and run the code using these commands.
Should I continue searching for the magical stack size or, does this smell like a defect to you as well ?
Here's the repeating part of the stack trace; it appears to be something odd about how it's loading the 3scale_backend binary:
This trace was produced by passing
I also enabled
It looks like the logic here in the binstub is failing to find the installed bin location, instead falling back to the same script. This causes the stack overflow.
The load line is the one that keeps recursing, because
I'm not sure what would cause this, but it seems that in your configuration, the 3scale_backend's bin script resolves to this top bin dir, rather than the unpacked version of the gem.
Are you sure. Using bundle gem it reports the top bin directory.
@headius I suspect you are expecting the path returned should be one of 2nd, 3rd or 4th path. Is that right ?
Right, it seems like since it's picking the /opt/app dir as the gem location for 3scale_backend, when it tries to resolve the binscript it's looping back on itself. I'm not sure if this is something we're doing or something Bundler is doing or something odd about your environment, though.
@whitingjr Not really, I'm afraid.
I notice you did not mention any non-JRuby Ruby impl...does this work with CRuby? If so we could at least confirm whether the same issue exists there. This seems to be a problem in either bundler or RG or something specific to how you have this configured and deployed. The question in my mind is whether this should work...it's clearly using the app dir as the location for the gem, which certainly isn't right when it tries to resolve the bin script again.
Or perhaps the bin script inside /opt/app should be the real script for the gem rather than this RubyGems-generated stub?