cancel
Showing results for 
Search instead for 
Did you mean: 

PC Processors

filipesmedeiros
Journeyman III

Java NIO Selector bug?

Hello everyone, first time posting.

I am currently developing a Java project in which I use the Java NIO Selector. But something happens. The problem is quite difficult to explain by words, but the short of it is that the program runs as intended on my laptop (Intel i7 CPU, Windows 10 Home), but bugs out on my desktop (Ryzen 2700x, Windows 10 Education). I believe what's happening is that the selector is not firing as soon as channels become readable, acceptable, etc. Sometimes they seem to not fire at all.

Does anyone know if the Selector class (and related ones like SelectableChannel) use architecture specific calls that would change from Intel to Ryzen CPUs, and if so, is there any way I could fix that by changing my code? Also, are there any known issues between any Java classes or packages (standard JDK), or specifically the NIO package, and AMD/Ryzen CPUs?

Thank you in advance.

0 Likes
3 Replies
misterj
Big Boss

filipesmedeiros, I suspect I cannot help you, but the only Architecture item I can think of worth trying is SMT (Simultaneous MultiTasking)  Please DL a copy of Ryzen Master from AMD and disable SMT and see what happens.  For many years developers have tested against Intel processors, so now users have a great reason to use AMD and bugs can show - Intel or AMD?  Enjoy, John.

Hello, misterj. I'm gonna try that and get back to you, if possible. Thanks for the help!

EDIT:

That didn't seem to help, but it was a good shot, thank you anyway!

0 Likes

Thanks, filipesmedeiros.  I suggest you contact AMD Online Support and perhaps JAVA.  It is possible that the JAVA code is not Thread Safe on AMD processors and they may have heard of the problem.  Good luck, John.

0 Likes