Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JRuby 1.7.16's complete.jar has a path regression from 1.7.15 #2032

Closed
rtyler opened this Issue Oct 9, 2014 · 5 comments

Comments

Projects
None yet
3 participants
@rtyler
Copy link

commented Oct 9, 2014

Starting process 'command '/usr/local/openjdk8/bin/java''. Working directory: /usr/home/tyler/source/lookout/git/metron Command: /usr/local/openjdk8/bin/java -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar org.jruby.Main -S gem install /usr/home/tyler/.gradle/caches/modules-2/files-2.1/rubygems/rake/10.3.2/1da8bf3abbb179aefdf5b6f3a249adc1fbbf24c3/rake-10.3.2.gem --ignore-dependencies --install-dir=/usr/home/tyler/source/lookout/git/metron/build/tmp/jrubyExec -N --platform=java
Successfully started process 'command '/usr/local/openjdk8/bin/java''

Will result in:

Errno::ENOENT: No such file or directory - /.gem/jruby/1.9
              file? at org/jruby/RubyFileTest.java:131
               dirs at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/defaults/jruby.rb:83
            collect at org/jruby/RubyArray.java:2407
               dirs at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/defaults/jruby.rb:82
              stubs at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/specification.rb:705
               _all at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/specification.rb:657
               each at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/specification.rb:855
       reverse_each at org/jruby/RubyEnumerable.java:1072
       latest_specs at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/specification.rb:971
  find_latest_files at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems.rb:490
       load_plugins at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-comp                                                                              lete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems.rb:1006
             (root) at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/gem_runner.rb:81
            require at org/jruby/RubyKernel.java:1065
             (root) at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
            require at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
               load at org/jruby/RubyKernel.java:1081
             (root) at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar!/META-INF/jruby.home/bin/jgem:9
               load at org/jruby/RubyKernel.java:1081
             (root) at /usr/home/tyler/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16/8ef6c848cc5491c5f22ddad4532c68fe778421f6/jruby-complete-1.7.16.jar!/META-INF/jruby.home/bin/gem:1
             (root) at gem:1
:rake FAILED

This fails for 1.7.16 but works fine with 1.7.15

@rtyler

This comment has been minimized.

Copy link
Author

commented Oct 29, 2014

This manifests itself with JRuby 1.7.16.1 too:

Errno::ENOENT: No such file or directory - /.gem/jruby/1.9
              file? at org/jruby/RubyFileTest.java:131
               dirs at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/defaults/jruby.rb:83
            collect at org/jruby/RubyArray.java:2407
               dirs at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/defaults/jruby.rb:82
              stubs at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/specification.rb:705
               _all at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/specification.rb:657
               each at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/specification.rb:855
       reverse_each at org/jruby/RubyEnumerable.java:1072
       latest_specs at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/specification.rb:971
  find_latest_files at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems.rb:490
       load_plugins at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems.rb:1006
             (root) at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/gem_runner.rb:81
            require at org/jruby/RubyKernel.java:1065
             (root) at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
            require at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
               load at org/jruby/RubyKernel.java:1081
             (root) at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/bin/jgem:9
               load at org/jruby/RubyKernel.java:1081
             (root) at /tmp/gradle873699958317020593projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.16.1/b76682bd0966a31dab60dc5e275d8b28ac17c38f/jruby-complete-1.7.16.1.jar!/META-INF/jruby.home/bin/gem:1
             (root) at gem:1

The way that I've reproduced this is by changing the version in this file and the running ./gradlew check from the jruby-gradle/jruby-gradle-plugin repository

@mkristian mkristian added this to the JRuby 1.7.17 milestone Oct 29, 2014

@mkristian

This comment has been minimized.

Copy link
Member

commented Oct 29, 2014

yes, jruby-1.7.16.1 only fixed this security issue and removed the extra unused files from jruby-complete.jar. everything else is the same as 1.7.16 - so no bug fixes :(

@headius headius added the core label Oct 29, 2014

@rtyler

This comment has been minimized.

Copy link
Author

commented Oct 29, 2014

@mkristian yeah, I didn't expect 1.7.16.1 to fix this issue in particular, I just wanted to bump the ticket :)

@rtyler rtyler added ffi in progress and removed ffi labels Nov 10, 2014

@mkristian

This comment has been minimized.

Copy link
Member

commented Nov 11, 2014

a simple way to reproduce it:

java -Djruby.native.enabled=false -jar jruby-complete-1.7.17-SNAPSHOT.jar -e 'p Gem::Specification.dirs'
@mkristian

This comment has been minimized.

Copy link
Member

commented Nov 13, 2014

fixed with f54a41f

@mkristian mkristian closed this Nov 13, 2014

@mkristian mkristian removed the in progress label Nov 13, 2014

mkristian added a commit that referenced this issue Nov 14, 2014

added tests for File.file? with native.enabled=false
complements the fix for #2032 with a test case for testing File.exists?,
File.directory? and File.file? executing jruby without native enabled.

Sponsord by Lookout Inc.

yousuketto added a commit to yousuketto/jruby that referenced this issue Nov 22, 2014

added tests for File.file? with native.enabled=false
complements the fix for jruby#2032 with a test case for testing File.exists?,
File.directory? and File.file? executing jruby without native enabled.

Sponsord by Lookout Inc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.