Upstream fix for a memory leak introduced in Fibers 1.1.0 that would manifest in shepherd: https://github.com/wingo/fibers/issues/65 https://issues.guix.gnu.org/58631 diff --git a/fibers/scheduler.scm b/fibers/scheduler.scm index 2b03941..760b037 100644 --- a/fibers/scheduler.scm +++ b/fibers/scheduler.scm @@ -182,8 +182,10 @@ remote kernel thread." (#f (warn "scheduler for unknown fd" fd)) ((and events+waiters (active-events . waiters)) ;; First, clear the active status, as the EPOLLONESHOT has - ;; deactivated our entry in the epoll set. - (set-car! events+waiters #f) + ;; deactivated our entry in the epoll set. Set the car to 0, not #f, so + ;; that 'schedule-tasks-for-active-fd' doesn't end up re-adding a + ;; finalizer on FD. + (set-car! events+waiters 0) (set-cdr! events+waiters '()) (unless (zero? (logand revents (logior EPOLLHUP EPOLLERR))) (hashv-remove! (scheduler-fd-waiters sched) fd)) @@ -336,21 +338,19 @@ expressed as an epoll bitfield." (let ((fd-waiters (hashv-ref (scheduler-fd-waiters sched) fd))) (match fd-waiters - ((active-events . waiters) - (set-cdr! fd-waiters (acons events task waiters)) - (unless (and active-events - (= (logand events active-events) events)) - (let ((active-events (logior events (or active-events 0)))) - (set-car! fd-waiters active-events) - (add-fdes-finalizer! fd (fd-finalizer fd-waiters)) - (epoll-add*! (scheduler-epfd sched) fd - (logior active-events EPOLLONESHOT))))) - (#f + ((or #f (#f)) ;FD is new or was finalized (let ((fd-waiters (list events (cons events task)))) (hashv-set! (scheduler-fd-waiters sched) fd fd-waiters) (add-fdes-finalizer! fd (fd-finalizer fd-waiters)) (epoll-add*! (scheduler-epfd sched) fd - (logior events EPOLLONESHOT))))))) + (logior events EPOLLONESHOT)))) + ((active-events . waiters) + (set-cdr! fd-waiters (acons events task waiters)) + (unless (= (logand events active-events) events) + (let ((active-events (logior events active-events))) + (set-car! fd-waiters active-events) + (epoll-add*! (scheduler-epfd sched) fd + (logior active-events EPOLLONESHOT)))))))) (define (schedule-task-when-fd-readable sched fd task) "Arrange to schedule @var{task} on @var{sched} when the file e class='list nowrap'>AgeCommit message (Collapse)Author 2024-07-18services: sddm: Adjust pass env.Zheng Junjie * gnu/services/sddm.scm (sddm-shepherd-service): Adjust pass env when sddm build with qt6. Change-Id: Iabaa22824db8048c7c86921010b970226f85b7a5 2024-03-19services: sddm: Add extension for localed-service-type.Zheng Junjie * gnu/services/sddm.scm (sddm-service-type): Add extension for localed-service-type. * gnu/services/xorg.scm (xorg-configuration-keyboard-layout): Export it. Change-Id: I26e6475b733d69f1baf00786e302a3ec6d3c4a74 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> 2023-08-02services: sddm: Set some environment variables for the breeze theme.Zheng Junjie * gnu/services/sddm.scm (sddm-service-type): Pass #:environment-variables to make-forkexec-constructor. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> 2023-05-11system: pam: Let PAM extensions add shepherd requirements.Josselin Poiret * gnu/system/pam.scm (<pam-extension>): New record type. (pam-shepherd-service): Add Shepherd synchronization point. * gnu/services/mail.scm (dovecot-shepherd-service) * gnu/services/lightdm.scm (lightdm-shepherd-service) * gnu/services/mail.scm (opensmtpd-shepherd-service) * gnu/services/sddm.scm (sddm-shepherd-service) * gnu/services/ssh.scm (lsh-shepherd-service, openssh-shepherd-service) * gnu/services/xorg.scm (slim-shepherd-service, gdm-shepherd-service) * gnu/services/base.scm (greetd-shepherd-services): Add PAM requirement. * gnu/system/pam.scm (/etc-entry, extend-configuration, pam-root-service-type, pam-root-service) * gnu/services/authentication.scm (pam-ldap-pam-service) * gnu/services/base.scm (pam-limits-service-type) (greetd-pam-service) * gnu/services/desktop.scm (pam-gnome-keyring) * gnu/services/kerberos.scm (pam-krb5-pam-service) * gnu/services/pam-mount.scm (pam-mount-pam-service): Adapt to use pam-extension. Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2023-04-07services: sddm: Remove 'sddm-service' procedure.Bruno Victal * gnu/services/sddm.scm (sddm-service): Remove procedure. Signed-off-by: Ludovic Courtès <ludo@gnu.org>