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] Two failing tests in test/test_command_line_switches.rb #1849

Closed
donv opened this issue Jul 23, 2014 · 8 comments
Closed

[jruby-1_7] Two failing tests in test/test_command_line_switches.rb #1849

donv opened this issue Jul 23, 2014 · 8 comments

Comments

@donv
Copy link
Member

donv commented Jul 23, 2014

These hang:

test_dash_little_v_version_verbose_T_taint_d_debug_K_kcode_r_require_b_benchmarks_a_splitsinput_I_loadpath_C_cwd_F_delimeter_J_javaprop_18

test_dash_little_v_version_verbose_T_taint_d_debug_K_kcode_r_require_b_benchmarks_a_splitsinput_I_loadpath_C_cwd_F_delimeter_J_javaprop_19

I have no idea why, yet. Help wanted.

@donv donv added this to the JRuby 1.7.14 milestone Jul 23, 2014
@donv donv added core labels Jul 23, 2014
donv added a commit that referenced this issue Jul 23, 2014

Verified

This commit was signed with the committer’s verified signature.
headius Charles Oliver Nutter
@dmarcotte
Copy link
Contributor

Hey @ratnikov, this issue bisects to the introduction of LibrarySearcher in 613673a. Here's some extra information in case it helps:

This is the command generated by this test for 1.9 (1.8 is similar):

echo 1,2,3 | "bin/jruby" --1.9 -J-Dfoo=bar -v -T3 -d -Ku -a -n -Ihello -C .. -F, -e 'puts $VERBOSE, $SAFE, $DEBUG, Encoding.default_external, $F.join(59.chr), $LOAD_PATH.join(44.chr), Dir.pwd, Java::java::lang::System.getProperty(:foo.to_s)'

Without 613673a (for instance, I checked out 1.7.13), this generates a number of warnings (about it not being 1.8), a couple of exceptions (side note: not sure if it's significant, but the 1.8 case does not have these exceptions), and some reasonable output.

With 613673a, this outputs many, many errors and hangs the test for some reason that isn't jumping out at me....

Hopefully that's enough to help you zero straight in on the issue... let me know if there's more I can do to help.

@dmarcotte
Copy link
Contributor

Oops. @ratnikov: I typoed your username in my comment. Fixed now, but I'm mentioning you again to make sure you're notified.

@ratnikov
Copy link
Contributor

Fun! Thanks for tracking this, will look at it.

@ratnikov
Copy link
Contributor

The -d flag is what causes it, by forcing to print all the class loading exceptions.

The reason for class loading exceptions is because it attempts to find a 'Service' for a library probably for .rb suffixed, and not just 'extension' suffixes.

@ratnikov
Copy link
Contributor

More specifically, I guess prior to LibrarySearcher the process for loading via 'load' is slightly different than require and the exception was triggered only then. Now that they're uniform, we attempt to load XXXService even requires, causing much more ClassNotFoundExceptions and logging in debug mode.

@ratnikov
Copy link
Contributor

I guess there are a couple of options here:

  1. Revert to the old behavior that XXXService only works with Kernel#load and not with Kernel#require. That would require the code to track whether the call came via load or require and skip the findServiceLibrary call if it's require.
  2. Maybe perform findServiceLibrary iff we're loading an 'extension' type of suffix, so .jar or .so and not .rb. I'm not really sure whether we currently depend on that behavior.
  3. Avoid rendering the classNotFound exception when lookup fails.

@enebo Any input? :)

@enebo enebo modified the milestones: JRuby 1.7.14, JRuby 1.7.15 Aug 27, 2014
@headius
Copy link
Member

headius commented Nov 12, 2014

Why does it hang?

@kares kares modified the milestones: JRuby 1.7.15, Non-Release Mar 1, 2018
@kares
Copy link
Member

kares commented Mar 1, 2018

since 1.7.x has EOLed .. let's call this one a day, shall we 🍂

@kares kares closed this as completed Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants