Ivan Radovanovic <[email protected]> has reassigned Bugzilla Automation <[email protected]>'s request for maintainer-feedback to [email protected]: Bug 198727: [PATCH] lang/mono FileSystemWatcher (kevent) deadlock problem https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198727
--- Description --- Created attachment 154559 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=154559&action=edit patch - ready to go into files directory of port There were 2 problems with mono's original implementation of kevent FileSystemWatcher on FreeBSD: * FileSystemWatcher implementation in mono's HEAD for kevent was relying on Darwin's specific behavior (when kevent is executed with NULL timeout, if kqueue FD is closed kevent call on Darwin returns with error, however FreeBSD doesn't behave that way - in fact according to feedback I got from kernel developers on FreeBSD close would block waiting for kevent to complete thus causing deadlock) * All watcher events were generated from the same thread which detected them and that presented possibility of deadlock if change handler was to disable/reset watcher (this manifested in ASP.Net applications not being restarted after dll changes, and not recompiling individual components on aspx/ascx file changes) Attached patch fixes those problems (I was able to verify that after applying it XSP and mono's fastcgi servers behave in expected way). Attached patch does several things: * renames member of imported timespec structure from misleading tv_usec to proper tv_nsec (value is in nanoseconds, not microseconds) * adds watcher thread abort in case it doesn't gracefully shutdown within 2 seconds (I think not really needed, but better safe than sorry) * moves actual event dispatching to separate thread (thus eliminating potential for deadlock described earlier) Attached patch is to be applied on latest version of port at this moment (3.12.1) _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-mono To unsubscribe, send any mail to "[email protected]"
