-
-
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
threaded calls to InetAddress.getByName stop working after NIC disconnects twice #4549
Comments
@enebo any thoughts around this bug and prioritization of a relevant fix? |
@acchen97 I would not think it would be possible for us to behave differently than Java unless somehow we toggle some environment in some way that causes this (but I cannot think of what that would be). Both of your scripts are calling into the same Java code but the JRuby in indirecting a little bit on the way to make the same Java call. There really should be no difference? @headius any ideas? |
This is truly bizarre. I can't imagine what we'd be doing differently than Java here, since we just use the JDK socket classes currently. My only thought is that perhaps the way we're requesting the JDK resolve the URL uses some internal JDK cache that gets marked as error and stays error. |
Oh wow, looking at the code again I realize you're actually calling the Java class from Ruby. Yeah this is seriously strange. Same URL, same API call, only difference is that we do it from Ruby. |
Ok, so I tried this locally, turning wifi off to trigger the errors, but my run was able to recover. Took a while to start erroring, took a while to stop erroring, but it did both.
This is JDK 8u121 on macos 10.13. |
This is Ubuntu Linux 16.04. There are two NIC disables (disable networking from Unity tray) and two reenables. It recovered both times.
|
This is weird, I'm having trouble replicating it myself. That said I'm still finding a strange behaviour, after about 5-10 nic restarts the script will terminate silently.
|
In any case, I am leaning toward this not being our issue. We are really just using JDK APIs to look up addresses, and if it gives up there's not a lot we could do to fix it. |
++ thanks for taking the time to investigate. closing now, I will reopen if I find new information. |
Environment
Linux ip-10-77-5-109.eu-west-1.compute.internal 3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab OpenJDK 64-Bit Server VM 25.121-b13 on 1.8.0_121-b13 +jit [linux-x86_64]
jruby 1.7.25 (1.9.3p551) 2016-04-13 867cb81 on OpenJDK 64-Bit Server VM 1.8.0_121-b13 +jit [linux-amd64]
Expected Behavior
Steps to reproduce:
3.1 on the first run ruby script
3.2 on the second run
nmcli device disconnect eth0 && sleep 15 && nmcli device connect eth0
to disable temporarily the NICExample script:
Actual Behavior
Console output:
NOTE:
Using the equivalent java code the problem doesn't occur as after a couple of exceptions the code is able to resolve the host:
Note that this doesn't reproduce consistently 100% but pretty much every time. I'm happy to provide more information on this.
This comes from investigation done in consequence of the bug reported here
The text was updated successfully, but these errors were encountered: