-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Too big for int #4744
Comments
If you can provide a simple reproduction script, that would be helpful. I think I know where the issue is, though. You can also help us by passing -Xbacktrace.style=full to get the full JVM stack trace, which will tell us precisely where the error is happening. I'm poking at it now. |
Ok, so it looks like this is a bug in httpclient or, arguably, the library that's providing that large timeout value. httpclient apparently implements its own SSL socket for JRuby by calling into the Java socket and SSL APIs directly. The call to Unfortunately, there doesn't appear to be anything we can do in JRuby. The only method that matches does require int, and the value being passed is too big. I'll look into improving the error message, but I recommend you reopen this with httpclient (they probably should intercept too-large values and truncate or report a good error rather than an obscure error like this). |
Here's output from a similar case. Blah.blah is a Java method that receives and returns int.
The following output is the full trace, showing that this error stems from big2long logic used when preparing the arguments for the Java call. The Bignum is too large for int, so a RangeError is raised.
|
Environment
jruby 9.1.12.0 (2.3.3) 2017-06-15 33c6439 Java HotSpot(TM) 64-Bit Server VM 25.144-b01 on 1.8.0_144-b01 +jit [darwin-x86_64]
When using
httpclient
and supplying a high timeout value it breaks with:Expected Behavior
The text was updated successfully, but these errors were encountered: