Has anyone seen writev on FreeBSD return EINVAL after a write to a socket even though the data has hit the wire?

David Collier-Brown davec-b at rogers.com
Thu May 2 14:06:42 MDT 2013


On 05/02/2013 12:11 PM, Jeremy Allison wrote:
> On Wed, May 01, 2013 at 08:52:52PM -0700, Richard Sharpe wrote:
>> Hi folks,
>>
>> I am seeing a problem with SMB2 and writev's of responses, usually
>> large responses, like a 64kiB read response. writev is returning
>> EINVAL even though the data has actually hit the wire. I have verified
>> this by looking at the capture and comparing the SMB sequence number
>> in the header of the packet on the wire with what is in memory pointed
>> to by the iovec sent to writev.
>>
>> It is most strange, and I am unable to think how this might happen.
> At this point you need kernel tracing to find the bug
> in FreeBSD. You might want to ping Julian about this.
>
> Jeremy.
>
You may want to log the base-address/length sets used, and look for
anything that will trigger the EINVAL, possibly iuncluding alignment. 
My leaky memory says Solaris merely does poorly on unaligned pointers,
while SunOS 4 suffered from problems...

--dave

-- 
David Collier-Brown,         | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
davecb at spamcop.net           |                      -- Mark Twain
(416) 223-8968



More information about the samba-technical mailing list