On Wed, Oct 27, 2010 at 10:05:20PM +0300, Mikolaj Golub wrote: > In hast_proto_send() we send header and then data. Couldn't it be that > remote_send and sync threads interfere and their packets are mixed? May be > some > synchronization is needed here? > > I set sleep(1) in hast_proto_send() between proto_send(header) and > proto_send(data). The error started to occur frequently.
Synchronization requests are sent through the remote thread just like regular I/O requests, exactly because of races that can occur. I looked at the code and the keepalive packets arbe sent from another thread. Could you try turning them off in primary.c and see if that helps? -- Pawel Jakub Dawidek http://www.wheelsystems.com p...@freebsd.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am!
pgpS7yoGKFxb8.pgp
Description: PGP signature