[ROOT] Broken pipe with TSocket

From: Mike Kordosky (kordosky@dell4.hep.utexas.edu)
Date: Thu Oct 05 2000 - 03:39:53 MEST


Hi,

I am using the TSocket class to receive data from a daq machine. The
problem is that when I increase the size of my data transfer past a
certain limit I encounter a broken pipe.  This broken pipe doesn't occur
until the second "spill".  The data in the first spill is ok.  Here is an
example:

++++++++++++++++++++++++Unpleasant Example++++++++++++++++++++++++++++

Now getting some data.
=============================================
Beginning of while loop
clock     : Real Time =   0.00 seconds Cpu Time =  -0.0
End of Recv
clock     : Real Time =   7.23 seconds Cpu Time =   0.0
Data Array Length: 624000
Number of Blocks Received: 0
Data: 65567
End of while loop
clock     : Real Time =  11.92 seconds Cpu Time =   4.4
++++++++++++++++++++++++++++++++++++++++

=============================================
Beginning of while loop
clock     : Real Time =  11.92 seconds Cpu Time =   4.4
SysError in <TUnixSystem::UnixRecv>: recv (Broken pipe)
Error in <TUnixSystem::RecvRaw>: cannot receive buffer
End of Recv
clock     : Real Time =  11.92 seconds Cpu Time =   4.4

 *** Break *** segmentation violation
Root > 
++++++++++++++++++++End Unpleasant Example++++++++++++++++++++++++++++++



The data array is an array of Int_t, so the size of the transfer is 
Data Array Length * 4 bytes = 624000 * 4 bytes = 2496000 bytes.



Things work perfectly for smaller data transfers:

+++++++++++++++++++++++Pleasant Example+++++++++++++++++++++++++++++++++

Now getting some data.
=============================================
Beginning of while loop
clock     : Real Time =   0.00 seconds Cpu Time =  -0.00 seconds
End of Recv
clock     : Real Time =   4.94 seconds Cpu Time =   0.01 seconds
Data Array Length: 416000
Number of Blocks Received: 0
Data: 65567
End of while loop
clock     : Real Time =   8.25 seconds Cpu Time =   3.07 seconds
++++++++++++++++++++++++++++++++++++++++

=============================================
Beginning of while loop
clock     : Real Time =   8.25 seconds Cpu Time =   3.07 seconds
End of Recv
clock     : Real Time =  10.04 seconds Cpu Time =   3.08 seconds
Number of Blocks Received: 1
Data: 65567
End of while loop
clock     : Real Time =  13.28 seconds Cpu Time =   6.12 seconds
++++++++++++++++++++++++++++++++++++++++
(etc.)
++++++++++++++++++++++End Pleasant Example+++++++++++++++++++++

Here, the size of the transfer is 1664000 bytes.  I have never seen a
broken pipe error while running this size (I have taken runs of 30+
spills).

I inserted the timing information since I thought that the analysis might
be becoming slower than the daq. In fact, the opposite is true (I am also
benchmarking the daq machine, which is not running ROOT).

Also, kNoBlock = 0 from which I assume that my socket is blocking.

I am not sure what I should do next in order to diagnose this
problem.  Could someone point me in the right direction?

Mike Kordosky
-- 
Graduate Research Assistant  // High Energy Physics Lab
kordosky@hep.utexas.edu     // University of Texas at Austin
ph: (512) 471-3526



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:34 MET