warbler icon indicating copy to clipboard operation
warbler copied to clipboard

Warbler tries to builds huge jar

Open tomtaylor opened this issue 12 years ago • 14 comments

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.

tomtaylor avatar Apr 05 '12 09:04 tomtaylor

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

ratnikov avatar Apr 05 '12 19:04 ratnikov

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?

tomtaylor avatar Apr 09 '12 08:04 tomtaylor

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

tomtaylor avatar Apr 09 '12 08:04 tomtaylor

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.

tomtaylor avatar Apr 09 '12 08:04 tomtaylor

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 before Creating 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

ratnikov avatar Apr 09 '12 18:04 ratnikov

I don't quite understand what you mean.

tomtaylor avatar Apr 09 '12 21:04 tomtaylor

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.

ratnikov avatar Apr 09 '12 22:04 ratnikov

Please see a pull request I submitted: https://github.com/jruby/warbler/pull/93

It addresses this issue.

ghost avatar Apr 25 '12 23:04 ghost

@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.

nicksieger avatar May 07 '12 19:05 nicksieger

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

jarib avatar May 13 '12 13:05 jarib

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

nicksieger avatar May 13 '12 18:05 nicksieger

(Whoops didn't mean to close.)

nicksieger avatar May 13 '12 18:05 nicksieger

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.

mberning avatar Nov 08 '12 20:11 mberning

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

BanzaiMan avatar Jan 31 '13 02:01 BanzaiMan