client/server communication makes kernel's TCP buffer overflow
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Steps to reproduce:
- Launch pvserver in mutli-client mode
- Launch paraview client to connect to the above paraview -url=cs://localhost:11111
- Launch the attached script (shrink-sphere.py), either with "pvpython" (in which case the Ctrl-C is not caught properly) or with python (and the correct PYTHONPATH) directly.
- Inspecting the network status with: netstat --inet -np shows that the Python client script has its TCP buffer growing and growing (column "Recv-Q"). This ultimately crashes. It seems that the client is not trying to read everything the server sends.
This is not a timing issue: increasing the "sleep" delay in the script to 1 sec shows the same behavior. This is only with scripting: the configuration with only pvserver and paraview-client doesn't exhibit the behavior.
The behavior is seen with both the binary version (Linux 64 bits) and with a self-recompiled version (Linux 64 bits) of ParaView 4.0.1.
-------- THE SCRIPT:
Supposing the pvserver is already started on 'localhost'
from paraview import simple as spl from time import sleep
Connect to the pvserver
spl.Connect('localhost')
Create a sphere and apply the Shrink filter to it:
ss = spl.Sphere(Radius=2, ThetaResolution=32) shr = spl.Shrink(Input=ss) spl.Show(shr) spl.SetDisplayProperties(Representation = "Wireframe") #shr.SetPropertyWithName("ShrinkFactor", 0.9)
Loop on the shrink factor up and down for a while:
shr.ShrinkFactor = 0.5
step = 0.1 try: while True: if shr.ShrinkFactor >= 1.0: step = -0.1 if shr.ShrinkFactor <= 0.0: step = +0.1 shr.ShrinkFactor += step sleep(0.1) pass except KeyboardInterrupt: print "Ctrl-C received" try: while True: pass except KeyboardInterrupt: print "Ctrl-C again! This time bye bye."
spl.Disconnect()