java.lang.Error: IP Helper Library GetIfTable function failed

JDK Bug System | Webbug Group | 6 months ago
  1. 0

    FULL PRODUCT VERSION : java version "1.7.0_75" Java(TM) SE Runtime Environment (build 1.7.0_75-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode) ADDITIONAL OS VERSION INFORMATION : The bug was found on Windows 7 64-bit, but can occur on all supported Windows versions. A DESCRIPTION OF THE PROBLEM : Method NetworkInterface.getNetworkInterfaces() might throw java.lang.Error with error message "IP Helper Library GetIfTable function failed", if it is called at the same time as a new network interface shows up in Windows. The reason is a subtle race condition. Function enumInterfaces in NetworkInterface.c first calls GetIfTable(...) with a NULL buffer to retrieve the buffer size. Then it allocates a buffer of this size and calls GetIfTable(...) again. If a new network interface has appeared between these two calls, the buffer will be too small and the last GetIfTable(...) call will fail (that is, return ERROR_INSUFFICIENT_BUFFER instead of 0). Then the function throws a java.lang.Error with the above error message. The solution is to call GetIfEntry again with a new buffer if it returns ERROR_INSUFFICIENT_BUFFER, and give up first after a reasonable number of reattempts. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Start a Java application that calls NetworkInterface.getNetworkInterfaces() in a loop. Plug out and in a USB wi-fi adapter until the error occurs. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - No NetworkInterface.getNetworkInterfaces() calls should throw java.lang.Error. ACTUAL - java.lang.Error: IP Helper Library GetIfTable function failed at java.net.NetworkInterface.getAll(Native Method) at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:334) ... ERROR MESSAGES/STACK TRACES THAT OCCUR : The bug was found when a client connected to an RMI server, at the same time as a mobile broadband dongle was plugged in to the PC: Exception in thread "RMI TCP Accept-0" java.lang.Error: IP Helper Library GetIfTable function failed at java.net.NetworkInterface.getAll(Native Method) at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:334) at sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:86) at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:399) at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:371) at java.lang.Thread.run(Thread.java:745) REPRODUCIBILITY : This bug can be reproduced rarely.

    JDK Bug System | 6 months ago | Webbug Group
    java.lang.Error: IP Helper Library GetIfTable function failed
  2. 0

    Scala doesn't work

    GitHub | 4 years ago | jvilk
    java.lang.Error: native method NYI: Lsun/misc/Unsafe;::park(ZJ)V
  3. 0

    Eclipse fails to compile pasted code

    Stack Overflow | 6 years ago | Salem
    java.lang.Error: Unresolved compilation problems: Syntax error on tokens, ArgumentList expected instead years cannot be resolved to a type Duplicate field Buttons.old Syntax error on tokens, ArgumentList expected instead Duplicate field Buttons.old</p> </blockquote> <pre><code>at practice1.Buttons.&lt;init&gt;(Buttons.java:13)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Java Applet not working for any code in eclipse

    Stack Overflow | 2 years ago | Spectral Stealth You2941
    java.lang.Error: Unresolved compilation problems: The public type Tutorial must be defined in its own file Syntax error, insert "}" to complete ClassBody</p> <pre><code>at Tutorial.&lt;init&gt;(Applet101.java:4)
  6. 0

    Reaping an object with references

    Google Groups | 2 decades ago | Craig R Hughes
    java.lang.Error: Reaping an object with references

  1. melezov 2 times, last 3 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.Error

    IP Helper Library GetIfTable function failed

    at java.net.NetworkInterface.getAll()
  2. Java RT
    Thread.run
    1. java.net.NetworkInterface.getAll(Native Method)
    2. java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:334)
    3. sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:86)
    4. sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:399)
    5. sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:371)
    6. java.lang.Thread.run(Thread.java:745)
    6 frames