Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

Using oneshot kqueue() on macOS
Oneshot kqueue() is disabled on macOS due to #7651 Recall that the paper "Mio: A High-Performance Multicore IO Manager for GHC" says: "Mio also uses kqueue on OS X, since Darwin, the foundation for Apple’s OS X, is a variant of BSD. However, we encountered problems running parallel builds of the GHC compiler using Mio as described above. We have been unable to uncover the underlying source of the problem to our satisfaction. However, several Internet discussions suggest that the implementation of kqueue and pipe on OS X are unstable. We were able to resolve the observed prob- lems on OS X by avoiding the use of one-shot mode on OS X, instead unregistering events after they are delivered, and by send- ing wakeup writes to a pipe monitored by the dispatcher threads’ kqueue instances on every event registration. With these changes, the behavior on OS X, including parallel builds of GHC, has been stable." Now the serious bug on KQueue has been fixed: - #13903 - https://phabricator.haskell.org/D3692 So, I guess it's time to use oneshot on macOS. A patch is attached. <details><summary>Trac metadata</summary> | Trac field | Value | | ---------------------- | -------------- | | Version | 8.6.1 | | Type | Bug | | TypeOfFailure | OtherFailure | | Priority | normal | | Resolution | Unresolved | | Component | Core Libraries | | Test case | | | Differential revisions | | | BlockedBy | | | Related | | | Blocking | | | CC | | | Operating system | | | Architecture | | </details> <!-- {"blocked_by":[],"summary":"Using oneshot kqueue() on macOS","status":"New","operating_system":"","component":"Core Libraries","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":["KQueue,","build","oneshot,","parallel"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Oneshot kqueue() is disabled on macOS due to https://ghc.haskell.org/trac/ghc/ticket/7651\r\n\r\nRecall that the paper \"Mio: A High-Performance Multicore IO Manager for GHC\" says: \r\n\r\n\"Mio also uses\r\nkqueue\r\non OS X, since Darwin, the foundation\r\nfor Apple’s OS X, is a variant of BSD. However, we encountered\r\nproblems running parallel builds of the GHC compiler using Mio\r\nas described above. We have been unable to uncover the underlying\r\nsource of the problem to our satisfaction. However, several Internet\r\ndiscussions suggest that the implementation of\r\nkqueue\r\nand\r\npipe\r\non OS X are unstable. We were able to resolve the observed prob-\r\nlems on OS X by avoiding the use of one-shot mode on OS X,\r\ninstead unregistering events after they are delivered, and by send-\r\ning wakeup writes to a pipe monitored by the dispatcher threads’\r\nkqueue instances on every event registration. With these changes,\r\nthe behavior on OS X, including parallel builds of GHC, has been\r\nstable.\"\r\n\r\nNow the serious bug on KQueue has been fixed:\r\n- https://ghc.haskell.org/trac/ghc/ticket/13903\r\n- https://phabricator.haskell.org/D3692\r\n\r\nSo, I guess it's time to use oneshot on macOS. A patch is attached.","type_of_failure":"OtherFailure","blocking":[]} -->
issue