diff options
author | Christopher Baines <mail@cbaines.net> | 2022-01-19 19:26:48 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2022-01-19 19:26:48 +0000 |
commit | 9655039649216e0b4e5d4940c81928ebe66854b0 (patch) | |
tree | cb07ca2698b9c32734a2ca6d923fd1ba1fdcd3a0 | |
parent | a0abeeb621557bd1a8172d28e0e912f99021c7c3 (diff) | |
download | build-coordinator-9655039649216e0b4e5d4940c81928ebe66854b0.tar build-coordinator-9655039649216e0b4e5d4940c81928ebe66854b0.tar.gz |
Add some extra exception handling around processing hook events
As hook processing can get stuck if one of the weird "conversion to port
encoding failed" errors occurs.
-rw-r--r-- | guix-build-coordinator/coordinator.scm | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm index f1233aa..b011a71 100644 --- a/guix-build-coordinator/coordinator.scm +++ b/guix-build-coordinator/coordinator.scm @@ -711,10 +711,18 @@ (while #t (with-exception-handler (lambda (exn) - (log-msg (build-coordinator-logger build-coordinator) - 'CRITICAL - "hook processing thread " event-name - " exception: " exn)) + (with-exception-handler + (lambda _ + ;; Things are really going wrong if logging about + ;; the hook processing thread crashing, also raises + ;; an exception, so just try and sleep and hope + ;; things go better next time + (sleep 10)) + (lambda () + (log-msg (build-coordinator-logger build-coordinator) + 'CRITICAL + "hook processing thread " event-name + " exception: " exn)))) (lambda () (while #t (unless (process-event event-name handler) |