[Bug 239803] Problem with concurrent transfer of file descriptors
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Aug 12 16:07:54 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239803
Bug ID: 239803
Summary: Problem with concurrent transfer of file descriptors
Product: Base System
Version: 12.0-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: bugs at FreeBSD.org
Reporter: knizhnik at garret.ru
Attachment #206476 text/plain
mime type:
Created attachment 206476
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=206476&action=edit
Reporduce the problem with file description corruption
Transferring file descriptors to another process without waiting confirmations
leads to unexpected behavior: descriptor is successfully transferred but
attempt to read from is reported as EOF (recv returns 0).
Attached example reproduces the problem (please build it with -pthread option).
If number of client threads is set to 1, then problem is not reproduced.
Another way to fix the problem is to wait confirmation about descriptor
delivery and close socket only after it.
It is seems to be critical that socket should not be closed before confirmation
of the transfer: if we wait confirmation but close socket before, then the
problem is still persists.
The bug is reproduced at several versions of FreeBSD including 12.0-stable and
also recent Mac-OS/X.
There was bug report with similar symptoms:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=131876
But looks likes r343784 is not fixing it.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list