'mbuffer' broken for network support / pipes under 7.2-R / 8.1-R?

Karl Pielorz kpielorz_lst at tdx.co.uk
Wed Sep 22 14:18:52 UTC 2010


I've got the port of mbuffer (/usr/ports/misc/mbuffer) installed on a 
number of machines (amd64/FreeBSD 6.4-S, 7.2-S and 8.1-R) - but it seems to 
have issues...

Firstly - any attempt to use the 'network' options of it, fail miserably 
(this is where mbuffer sends the data via tcp, instead of stdout) - e.g.

tester# mbuffer -I 10000
Assertion failed: ((err == 0) && (bsize == sizeof(rcvsize))), function 
openNetworkInput, file mbuffer.c, line 1358.
Abort (core dumped)

None of the network options (for sending, or receiving) seem to work - they 
all fail with the above assert under 7.2/8.1

Under 6.4 - they 'seem' to work, but you get a warning "mbuffer: warning: 
unable to set socket receive buffer size: No buffer space available" spat 

Also, I've noticed - if using mbuffer as part of a chain, it fails to 
finish under 7.2/8.1 - e.g.

  tester# cat /usr/src/COPYRIGHT | ssh root at othermachine "cat >test"

Works fine.

  tester# cat /usr/src/COPYRIGHT | mbuffer | ssh root at othermachine "cat 

Completes the transfer fine, but then 'hangs forever' - hitting CTRL-C nets:

  "mbuffer: warning: error during output to <stdout>: canceled"

The same on an older 6.4 based host, completes fine.

Anyone know about this, or can think of any workarounds? - 'mbuffer' is 
very handy (not only for speeding I/O but also rate limiting on transfers 



More information about the freebsd-ports mailing list