I have come across a critical problem with the IQConnect software when establishing multiple connections in quick succession.
Steps to reproduce:
1 - launch client, login
2 - for i = 1 to 15 {
create new socket on port 9100
send set protocol command
sleep x
}
3 - wait
4 - close all sockets
For values of x < ~15ms, the threads for each socket in the iqconnect process seem to enter some sort of race condition, and ramp up to 100% CPU (core) usage. This will typically happen to all 15 connections, but is sometimes limited to fewer (e.g 3 IQConnect threads running at 100% on 3 cores).
During failures:
- IQConnect threads are running at 100% on all 8 cores of my machine (although sometimes fewer as mentioned above).
- There is no response on the socket to any commands sent, including the initial set protocol.
- There are no entries in the IQConnectLog after "LOOKUP SOCKET ACCEPTED i - " for each connection.
Log files are attached.
Configuration:
This occurs on versions 5.1.1.3 and 5.2.1.0 (didn't test others). I am connecting from Java using standard java.net / java.io libraries
OS tested:
- Debian 8 64-bit (kernel 4.5.0 x86_64)
- Debian 7 32-bit (kernel 4.5.0 x86),
JVM tested:
- 1.7.0_80-b15 (32 bit)
- 1.8.0_77 (32 and 64-bit)
Wine tested:
- 1.6.2
- 1.9.6
Interestingly, I couldn't reproduce the problem using wine 1.4.1, but I suspect that's because 1.4.1 is slower to create and connect the sockets rather than wine being the problem. This issue only became evident because I am staging newer wine versions.
I couldn't reproduce the issue with the same code on Windows 7.
I would guess that the most likely explanation is a subtle concurrency bug in the IQConnect.exe connection code that is only evident when multiple connections are made almost simultaneously on a machine with many cores, but it is surprising that it hasn't been seen before.
I can provide test code (Java) if required.