Skip to content

Warbler tries to builds huge jar #86

tomtaylor opened this Issue Apr 5, 2012 · 14 comments

6 participants


I'm attempting to package a simple JRuby app into a jar file. No gemspec, just using a Gemfile with a couple of dependencies from git. Using warbler 1.3.5.

When I run bundle exec warble jar it spins out of control, trying to package a huge file. I killed it when it reached 1.5GB.

Some details:

$ ruby -v
jruby 1.6.6 (ruby-1.8.7-p357) (2012-01-30 5673572) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_31) [darwin-x86_64-java]

I'm running this through rbenv on OSX 10.7 Lion.

Here's a dump of bundle exec warble jar:debug:

ratnikov commented Apr 5, 2012

Looks like you killed it off when it was packaging redis. Is it adding files you're not expecting it to?


The list of files in the debug listing looks fine, but it just continues to write data. I just ran it again, and after 20 seconds it had filled 334MB. Would you like a copy of the jar produced?


Oh, and I upgraded to jruby 1.6.7, with the same results.


OK, this is odd - if you remove the jar and run it, it works fine. If you run it with the jar already present it gets itself into the loop. Even though it says that it's running rm -f dennis.jar before Creating dennis.jar. I'm guessing it's not deleting the previous one properly and it's attempting to package itself.


I don't quite understand what you mean.

ratnikov commented Apr 9, 2012

Argh. I meant that you could make sure that warble does NOT package the jar. However, according to your gist, it doesn't seem like it attempts to.

I will take a look at this if I have time, but until then you could try to see if you can figure the root issue of this and send a pull request.

ghost commented Apr 25, 2012

Please see a pull request I submitted: #93

It addresses this issue.

JRuby Team member

@tomtaylor @robatsimplymeasured So there is a #{config.jar_name} directory that is getting saved to disk? Warbler shouldn't need to build a directory on disk containing the current project. And the jar file itself should be removed before running. Still not sure what is happening here.

jarib commented May 13, 2012

I'm also seeing this intermittently (on JRuby 1.6.7 + OS X Lion). Not sure how to provide more details though. The jar file was 2.6GB when I killed it, and since it's not a valid zip I can't really inspect its contents.

Update: Not sure if it's helpful, but here's a thread dump from when this happens

JRuby Team member

Hmm. Anything unusual about your projects, like maybe a symlink that's recursively including things?

@nicksieger nicksieger closed this May 13, 2012
@nicksieger nicksieger reopened this May 13, 2012
JRuby Team member

(Whoops didn't mean to close.)

mberning commented Nov 8, 2012

I am having this issue as well. Seems to only occur when I have both a gemspec and a warble.rb file. If I eliminate one or the other the jar builds just fine.

@BanzaiMan BanzaiMan added a commit that closed this issue Jan 31, 2013
@BanzaiMan BanzaiMan Based on #93 (which was not correct), we attempt to resolve #86.
#93 was created by a user who no longer exists on github, so I cannot merge it and give credit to that user. The patch did introduce a couple of spec failures, and, here, I attempt to avoid them.

Note that we still need a spec to test this; I will ask participants in #86 for that.
@BanzaiMan BanzaiMan closed this in 7a7b62b Jan 31, 2013
JRuby Team member

Not quite closed. We need a spec, and I would like to ask some help here.

@BanzaiMan BanzaiMan reopened this Jan 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.