https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227285

--- Comment #7 from Jan Kokemüller <jan.kokemuel...@gmail.com> ---
Created attachment 192515
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=192515&action=edit
patch for a GC that detects cycles

I've tried to modify the GC so that it detects cycles in all "in flight"
sockets and only destroys sockets that are in such a cycle. With this patch the
test program doesn't exit anymore.

I wonder if there can be false negatives with a GC that just detects cycles.
DragonFly has some interesting comments[1]. DragonFly still suffers from this
race, though.

It looks like Linux had the same race when they still used a mark & sweep GC
instead of a cycle detecting one. Search for "rewrite AF_UNIX garbage
collector".

The BUGS section in the man page for send(2) looks related to this problem.
This seems to be a long standing issue.


[1]:
https://github.com/DragonFlyBSD/DragonFlyBSD/blob/b9f81f6ad2f9ae32fb3ec268a1ea2edac10f373e/sys/kern/uipc_usrreq.c#L72

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to