[Bug 227259] accept() does not wakeup on shutdown()/close()
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Apr 3 15:50:18 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227259
Bug ID: 227259
Summary: accept() does not wakeup on shutdown()/close()
Product: Base System
Version: 11.0-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: rozhuk.im at gmail.com
Attachment #192171 text/plain
mime type:
Created attachment 192171
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=192171&action=edit
acc_test.c
We have some legacy app that create socket, create thread and in new thread
call accept() with this socket.
Main thread wait for signals and do shutdown() + close() for socket, then wait
until accept thread wakeup and exit, then app exit/create new socket+thread.
On FreeBSD 9, 10 - OK.
On FreeBSD 11 - thread does not wakeup on shutdown() and close().
FreeBSD 10:
cc acc_test.c -O0 -DDEBUG -DACCT_CLOSE -pthread -o acc_test - HANG
cc acc_test.c -O0 -DDEBUG -DACCT_CLOSE -DACCT_SELECT -pthread -o acc_test -
HANG
cc acc_test.c -O0 -DDEBUG -DACCT_CLOSE -DACCT_SELECT -DACCT_NONBLOCK -pthread
-o acc_test - HANG
cc acc_test.c -O0 -DDEBUG -DACCT_CLOSE -DACCT_POLL -pthread -o acc_test - OK
cc acc_test.c -O0 -DDEBUG -DACCT_CLOSE -DACCT_POLL -DACCT_NONBLOCK -pthread -o
acc_test - OK
cc acc_test.c -O0 -DDEBUG -DACCT_SHUTDOWN -pthread -o acc_test - OK
cc acc_test.c -O0 -DDEBUG -DACCT_SHUTDOWN -DACCT_SELECT -pthread -o acc_test -
HANG
cc acc_test.c -O0 -DDEBUG -DACCT_SHUTDOWN -DACCT_SELECT -DACCT_NONBLOCK
-pthread -o acc_test - HANG
cc acc_test.c -O0 -DDEBUG -DACCT_SHUTDOWN -DACCT_POLL -pthread -o acc_test - OK
cc acc_test.c -O0 -DDEBUG -DACCT_SHUTDOWN -DACCT_POLL -DACCT_NONBLOCK -pthread
-o acc_test - OK
FreeBSD 11:
cc acc_test.c -O0 -DDEBUG -DACCT_CLOSE -pthread -o acc_test - HANG
cc acc_test.c -O0 -DDEBUG -DACCT_CLOSE -DACCT_SELECT -pthread -o acc_test -
HANG
cc acc_test.c -O0 -DDEBUG -DACCT_CLOSE -DACCT_SELECT -DACCT_NONBLOCK -pthread
-o acc_test - HANG
cc acc_test.c -O0 -DDEBUG -DACCT_CLOSE -DACCT_POLL -pthread -o acc_test - OK
cc acc_test.c -O0 -DDEBUG -DACCT_CLOSE -DACCT_POLL -DACCT_NONBLOCK -pthread -o
acc_test - OK
cc acc_test.c -O0 -DDEBUG -DACCT_SHUTDOWN -pthread -o acc_test - HANG
cc acc_test.c -O0 -DDEBUG -DACCT_SHUTDOWN -DACCT_SELECT -pthread -o acc_test -
HANG
cc acc_test.c -O0 -DDEBUG -DACCT_SHUTDOWN -DACCT_SELECT -DACCT_NONBLOCK
-pthread -o acc_test - HANG
cc acc_test.c -O0 -DDEBUG -DACCT_SHUTDOWN -DACCT_POLL -pthread -o acc_test -
HANG
cc acc_test.c -O0 -DDEBUG -DACCT_SHUTDOWN -DACCT_POLL -DACCT_NONBLOCK -pthread
-o acc_test - HANG
Summary
FreeBSD 10:
poll() + close()
poll() + shutdown()
accept() + shutdown()
FreeBSD 11:
poll() + close()
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list