warbler
warbler copied to clipboard
Warbler tries to builds huge jar
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
: https://gist.github.com/c116c72320b968d1044e
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
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.
Seems like all you have to do is make sure that wrabler tries to package the jar. :)
-- D
On Mon, Apr 9, 2012 at 4:42 AM, Tom Taylor [email protected] wrote:
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
beforeCreating dennis.jar
. I'm guessing it's not deleting the previous one properly and it's attempting to package itself.
Reply to this email directly or view it on GitHub: https://github.com/jruby/warbler/issues/86#issuecomment-5022392
I don't quite understand what you mean.
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.
Please see a pull request I submitted: https://github.com/jruby/warbler/pull/93
It addresses this issue.
@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.
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 https://gist.github.com/b6302f25800063c5fa2d
Hmm. Anything unusual about your projects, like maybe a symlink that's recursively including things?
(Whoops didn't mean to close.)
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.
Not quite closed. We need a spec, and I would like to ask some help here.