aboutsummaryrefslogtreecommitdiff
Fibers 1.0.0 has a bug in run-fibers in which peer schedulers aren't destroyed -
so if you had 4 cores, 1 would be destroyed when run-fibers returned, but the
other 3 would stay around.  Each scheduler uses 3 file descriptors, so for
machines with many cores, this resource leak adds up quickly - quickly enough
that the test suite can even fail because of it.

See https://github.com/wingo/fibers/issues/36.

This fixes that.  It should be safe to destroy the peer schedulers at the given
point because the threads that could be running them are all either dead or the
current thread.

As of May 21, 2020, this bug still existed in the 1.0.0 (latest) release and in
git master.
--- a/fibers.scm	2020-05-21 18:38:06.890690154 -0500
+++ b/fibers.scm	2020-05-21 18:38:56.395686693 -0500
@@ -137,5 +137,6 @@
              (%run-fibers scheduler hz finished? affinity))
            (lambda ()
              (stop-auxiliary-threads scheduler)))))
+      (for-each destroy-scheduler (scheduler-remote-peers scheduler))
       (destroy-scheduler scheduler)
       (apply values (atomic-box-ref ret))))))

sktop): Update to 5.0.14. [arguments]: Use G-expressions; add pre-install phase. * gnu/packages/patches/linphone-desktop-without-sdk.patch: Update. Ricardo Wurmus 2021-03-29gnu: linphoneqt: Update to 4.2.5 and rename to linphone-desktop....Also enable the daemon and console interfaces. * gnu/packages/linphone.scm (linphoneqt) [name]: Rename to linphone-desktop. [source]: Switch to git repository. [patches]: Remove linphoneqt-tabbutton.patch and add linphone-desktop-without-sdk.patch. [outputs]<debug>: New output. [configure-flags]: Disable update checking and enable the daemon and console interfaces. [phases]<pre-configure>: New phase. <fix-cmake-error, set-version-string>: Remove phases. <extend-shared-resources>: Rename to... <post-install>: ... this; adjust. [native-inputs]: Add pkg-config. [inputs]: Add belr and ortp. Remove belle-sip. [home-page]: Update home page. [license]: Update to GPLv3+. * gnu/packages/patches/linphoneqt-tabbutton.patch: Remove file. linphone-desktop-without-sdk.patch: New file. * gnu/local.mk (dist_patch_DATA): Update. Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Raghav Gururajan