Date: Mon, 12 Aug 2019 16:07:53 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 239803] Problem with concurrent transfer of file descriptors Message-ID: <bug-239803-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239803 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@FreeBSD.org Reporter: knizhnik@garret.ru Attachment #206476 text/plain mime type: Created attachment 206476 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D206476&action= =3Dedit Reporduce the problem with file description corruption Transferring file descriptors to another process without waiting confirmati= ons 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 opti= on). 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 confirma= tion 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=3D131876 But looks likes r343784 is not fixing it. --=20 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-239803-227>