Workaround fibers getting stuck handling exceptions

This commit is contained in:
Christopher Baines 2025-04-18 13:20:20 +01:00
parent fd2a3ad6c1
commit d4cd94f185

View file

@ -1288,6 +1288,16 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
(null? sources))) (null? sources)))
(run-fibers (run-fibers
(lambda ()
(with-exception-handler
;; Fibers get's stuck if it handles an exception, so handle
;; exceptions here so this procedure actually finishes
(const #f)
(lambda ()
(with-exception-handler
(lambda (exn)
(print-backtrace-and-exception/knots exn)
(raise-exception exn))
(lambda () (lambda ()
(with-postgresql-connection (with-postgresql-connection
"fix" "fix"
@ -1336,7 +1346,8 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
1000 1000
input-derivations 1000))))) input-derivations 1000)))))
(fix-derivation-inputs conn drv)))))))) (fix-derivation-inputs conn drv))))))))))
#:unwind? #t))
#:hz 0 #:hz 0
#:parallelism 1)) #:parallelism 1))