-
Bug
-
Resolution: Fixed
-
P3
-
8, 11
-
b01
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8310305 | 8u391 | Johny Jose | P3 | Resolved | Fixed | b01 |
The getHardwareAddress method in NetworkInterface has a call to native method getMacAddr0 and which inturn invokes getMacAddress. In getMacAddress there is solaris specific call to getMacFromDevice which make a call to
open the device for which the address is to be retrieved(fd = open(style1dev,
O_RDWR)). But this fd is never getting closed in this method (neither returned
from excpetion nor in the normal flow as well). So if multiple devices are present and
each read will result in new fd getting created and will result in memory
loss. This requires a fix in JDK, where we have to close the fd before the
method getMacFromDevice exit.
open the device for which the address is to be retrieved(fd = open(style1dev,
O_RDWR)). But this fd is never getting closed in this method (neither returned
from excpetion nor in the normal flow as well). So if multiple devices are present and
each read will result in new fd getting created and will result in memory
loss. This requires a fix in JDK, where we have to close the fd before the
method getMacFromDevice exit.
- backported by
-
JDK-8310305 Memory leak in Java Solaris native code when calling NetworkInterface.getHardwareAddress()
-
- Resolved
-