[Design of Messaging on JBoss (Messaging/JBoss)] - Re: UUIDGenerator broken on Windows...
by jmesnil
in UUIDGenerator.generateTimeBasedUUID, we use only the 1st 4 bytes of the address so that it works with IPv4 (4 bytes), IPv4 (16 bytes) and MAC (6 bytes).
The check on getHardwareAddress should be (address.length >= 4) so that we can safely use the byte array.
However, I'm surprised that Windows returns a 0-sized array.
Clebert, could you run this code on Java *6* on Windows to check what it returns:
public static void main(String[] args) throws SocketException
{
Enumeration networkInterfaces = NetworkInterface.getNetworkInterfaces();
while (networkInterfaces.hasMoreElements())
{
NetworkInterface networkInterface = (NetworkInterface)networkInterfaces.nextElement();
byte[] hardwareAddress = networkInterface.getHardwareAddress();
if (hardwareAddress == null)
{
System.out.println(networkInterface.getDisplayName() + ":null");
} else
{
String s = "";
for (int i = 0; i < hardwareAddress.length - 1; i++)
{
s += Integer.toHexString(hardwareAddress) + ":";
}
s += hardwareAddress[hardwareAddress.length - 1];
System.out.println(networkInterface.getDisplayName() + ":" + s);
}
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206823#4206823
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206823
15 years, 3 months
[Design of POJO Server] - Re: Strange classloading behavior -- thread stuck
by bstansberry@jboss.com
I was able to induce the classloading loop quite easily using JDK 6 (u12) a stock 5.0.0.GA. But with the 2.0.3-SNAPSHOT libraries I've been trying for over half an hour without success.
So, something you did helped. :-)
More mysterious is exactly what caused the problem. I have logs from a server that failed and grepped for "Circular" or "LinkageError" and saw nothing. The logs are quite complex so it would probably take hours of detail analysis to get anything out of them. I attached them to JBCL-81 just so they are archived somewhere in case they prove useful.
I believe a bug I found today (https://jira.jboss.org/jira/browse/MODCLUSTER-47) was relevant here. It basically resulted in one node continually sending an RPC to another, with a complex object passed as a param and a complex object returned. So, fair bit of classloading calls involved. This RPC happens about 20 times a second. Failure seemed to occur when you made an AJP request to the server while this was going on; the thread handling the AJP request ends up in the state shown in my 3rd post on this thread; the JGroups thread ends up in the tight loop.
The continual RPC issue is why the log attached to the JIRA is so large.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206784#4206784
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206784
15 years, 3 months