-
Notifications
You must be signed in to change notification settings - Fork 10
The ipbus
deamon never closes the TCP connections
#126
Comments
I would tend to agree, as @lpetre-ulb is going to be submitting a PR to the upstream, we should try to have the version we are using as vanilla as possible, especially if the patch put in upstream solves these (old) issues. One question/request for @lpetre-ulb, can you do an quick investigation on a |
Yes, of course. Is there a specific metric I should look at? Transaction/second, words/second, packet/second, latency, ... Also does the type of transaction matter? If the |
I don't remember if I tried playing with the The most basic test would be something like: import uhal, itertools
# set up hwdevice as uhal device
reglist = [list, of, registers, to, read, where, the, length, of, the, list, is, more, than, 10]
regvals = [hwdevice.getNode(r).read() for r in reglist]
hwdevice.dispatch()
for k,r in itertools.zip(reglist,regvals):
print("{:s}: 0x{:08x}".format(k,r)) You can extend this to do read/write mixed in the same dispatch: import random
reglist = [list, of, registers, to, read, where, the, length, of, the, list, is, more, than, 10]
wvals = [random.randint(0x0, 0xffffffff) for r in reglist]
for w,r in itertools.izip(wvals,reglist):
hwdevice.getNode(r).write(w))
regvals.append(hwdevice.getNode(r).read())
hwdevice.dispatch()
for k,r,w in itertools.zip(reglist,regvals,wvals):
print("{:s}: 0x{:08x} (expected {:0x{08x})".format(k,r,w)) This could even be done for just a single register, by replacing I don't want you to put too much (of your valuable) time into understanding the performance differences between |
The development branch moved to a templated RPC-only based solution. |
Brief summary of issue
After killing the
ipbus
daemon on the CTP7, the program cannot be restarted immediately but one has to wait some time. During that period thebind
sycall fails with the "address in use" error. It can be seen that thenetstat
tool shows TCP connections in theLAST_ACK
state which progressively timeout.Types of issue
Expected Behavior
The
ipbus
daemon should not keep TCP connections open once the client disconnects.Current Behavior
While the daemon is running closed TCP connections are blocked in the
CLOSE_WAIT
state and theipbus
daemon consumes one full CTP7 CPU core after the first TCP connection is closed by the client.Steps to Reproduce (for bugs)
ipbus
daemon on the CTP7testConnectivity.py
for example)top
)netstat -an
; when writing this issue, 377 such connections are opened oneagle23
used for QC7)Possible Solution (for bugs)
When the
recv
call returns 0 the socket must beclose
d:xhal/xcompile/ipbus/Client.cpp
Lines 51 to 55 in d1f8b3d
Also @mexanick, I was wondering why you implemented this commit? If it was because connections were impossible once the maximum number of client was reached, fixing this issue should have the same effect.
Your Environment
The text was updated successfully, but these errors were encountered: