Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jul 2014 10:54:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 192109] New: recvmsg fails to receive socket FD and subsequent functions on that FD fails with EBADF error.
Message-ID:  <bug-192109-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192109

            Bug ID: 192109
           Summary: recvmsg fails to receive socket FD and subsequent
                    functions on that FD fails with EBADF error.
           Product: Base System
           Version: 9.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: Needs Triage
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: abhijit_kulkarni@symantec.com

Created attachment 144963
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=144963&action=edit
sample program to reproduce problem

I have application that sends socket FD from one process to another using
sendmsg API and receives that FD using recvmsg API. It works perfectly on
FreeBSD 6 (i386-32 bits binary) but fails on FreeBSD 9.2 (amd64-64 bits binary)
.  The recvmsg API does not fail but the FD, that is retuned, is no longer
socket FD hence further use of that FD fails with EBADF error.
Has anyone faced this problem before? Is this a known issue?

I have tried simple program that uses Unix domain socket and shares FD between
2 processes. It reproduces my problem. The program open file '/etc/motd' and
sends the FD to another process using sendmsg. The other process receives the
FD and prints the contents of the file. The program works perfectly on FreeBSD
6 (i386-32 bits binary) but fails to print contents of file on FreeBSD 9.2
(amd64-64 bits binary).

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-192109-8>