warble aborted! stack level too deep #106

Closed
headius opened this Issue Aug 1, 2012 · 7 comments

5 participants

@headius
JRuby Team member

(Moved here from http://jira.codehaus.org/browse/JRUBY-6412)

Warbler has given me this error intermittently in the past, but yesterday and today, I can't get past it.

I can't reproduce this on a fresh new Rails project, unfortunately, it's just my existing app that's having problems.

Stack trace and files to reproduce here: https://gist.github.com/f7c8a272189634386e93

@jkutner
JRuby Team member

I had a really similar error a while back, and it ended up having something to do with creating the task twice (or something like that, can't remember exactly). But I was trying to do basically the same thing as you -- create a task dependency. I modified my rake script to look like this:

task :war do
  Warbler::Task.new(:warble)
  Rake::Task['warble'].invoke
  # call dependency stuff (custom code in my case)
end

EDIT: looking at this project again, I see a shell script that runs rake assets:precompile and then rake war. so i guess i never got past it :P

@kinjal

more things that did not work.

background: I was following instructions on this site, adjusting commands along the way (e.g. script/generate scaffold replaced with rails g. I ran into stack level too deep at the point of warble -T.

a similar issue, but with rake proposed running bundle exec rake so I ran bundle exec warble -T. It gave the following message:

Gem::LoadError: warbler is not part of the bundle. Add it to Gemfile.

So I added to the Gemfile. Still no luck.

@kranz

Same thing here, and btw following the same tutorial.
Using rvm 1.19.15, jruby 1.7.3., rails 3.2.13, warble 1.3.8, ubuntu 12.04

warble -T ends up with the dreaded "warble aborted! stack level too deep"

So tried to update jruby to 1.7.4, with many troubles:

/lib/i386-linux-gnu/ld-2.15.so crashes saying:

The crashed program seems to use third-party or local libraries:
/home/kranz/.rvm/rubies/jruby-1.7.4/lib/native/i386-SunOS/libjffi-1.2.so

It then suggest to update the following packages

libc6 coreutils dpkg libc-bin multiarch-support perl-base

Updated packages, then

rvm reinstall jruby-1.7.4

Now jruby installs;
then shutdown and restart ubuntu, reinstall rails and warbler.
Run "bundle install"
Finally fired warble pluginize and.... ka-boom!

"warble aborted! stack level too deep"

Do we have any hope?

update

Tried to install on a fresh new ubuntu 12.04 server: same problem

@kranz

Found that the problem is
warble pluginize

Here the steps to reproduce the issue

  • rails new testapp --database mysql
  • bundle install
  • modify database.yml to add the correct username and password
  • rake db:create
  • rails g scaffold person name:string age:integer
  • rake db:migrate
  • then, running webrick locally the app (of course...) works.

If warble pluginize is run, lib/tasks/warbler/warbler.rake is created

Now if i run "warble -T" or "warble config" i get the "stack too deep" error.

Avoiding the creation of warble rake taks allows building the war file

@jkutner
JRuby Team member

Just FYI, that tutorial is way out of date. We still need to fix this problem, but i would take what's written there with a grain of salt. You can still use warbler without the pluginize command.

@jayjlawrence

I've run into this issue recently using JRuby 1.7.6 and 1.7.8 combined with Warble 1.40 and Bundler 1.5.0.rc.1. My suspicion is actually a problem with 'alias_menthod' sometimes failing when used for monkey patching. I've filed a report with JRuby folks - jruby/jruby#1260 - and have included a project to recreate the issue on a couple of OS and JVM combos. Hopefully my report is right and that they can fix it fairly soon.

@jkutner
JRuby Team member

This is fixed with following environment:

$ jruby -v 
jruby 9.0.1.0 (2.2.2) 2015-09-02 583f336 Java HotSpot(TM) 64-Bit Server VM 25.51-b03 on 1.8.0_51-b16 [darwin-x86_64]

$ bundle version
Bundler version 1.10.6

$ gem list warbler

*** LOCAL GEMS ***

warbler (2.0.0.rc1)

Probably fixed in other versions too.

@jkutner jkutner closed this Sep 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment