From ad81d052c9e0dd596416095be49134b3bc5a2851 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 25 Jul 2023 17:27:06 +0100 Subject: Set thread names To help with debugging. --- guix-qa-frontpage/branch.scm | 7 +++++++ guix-qa-frontpage/issue.scm | 7 +++++++ guix-qa-frontpage/manage-builds.scm | 17 +++++++++++++++++ guix-qa-frontpage/manage-patch-branches.scm | 7 +++++++ 4 files changed, 38 insertions(+) diff --git a/guix-qa-frontpage/branch.scm b/guix-qa-frontpage/branch.scm index 51fa4ef..0c90bc9 100644 --- a/guix-qa-frontpage/branch.scm +++ b/guix-qa-frontpage/branch.scm @@ -26,6 +26,8 @@ #:use-module (prometheus) #:use-module ((guix-build-coordinator utils) #:select (with-time-logging)) + #:use-module ((guix build syscalls) + #:select (set-thread-name)) #:use-module (guix-qa-frontpage mumi) #:use-module (guix-qa-frontpage git-repository) #:use-module (guix-qa-frontpage guix-data-service) @@ -440,6 +442,11 @@ (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name "branch data refresh")) + (const #t)) + (while #t (let ((start-time (current-time))) (with-exception-handler diff --git a/guix-qa-frontpage/issue.scm b/guix-qa-frontpage/issue.scm index 3cc9516..1dc56b7 100644 --- a/guix-qa-frontpage/issue.scm +++ b/guix-qa-frontpage/issue.scm @@ -23,6 +23,8 @@ #:use-module (ice-9 threads) #:use-module ((guix-build-coordinator utils) #:select (with-time-logging)) + #:use-module ((guix build syscalls) + #:select (set-thread-name)) #:use-module (guix-qa-frontpage database) #:use-module (guix-qa-frontpage manage-builds) #:use-module (guix-qa-frontpage manage-patch-branches) @@ -291,6 +293,11 @@ (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name "data refresh")) + (const #t)) + (while #t (let ((start-time (current-time))) (with-exception-handler diff --git a/guix-qa-frontpage/manage-builds.scm b/guix-qa-frontpage/manage-builds.scm index 5d23e3d..057547d 100644 --- a/guix-qa-frontpage/manage-builds.scm +++ b/guix-qa-frontpage/manage-builds.scm @@ -6,6 +6,8 @@ #:use-module (ice-9 streams) #:use-module (ice-9 threads) #:use-module (guix sets) + #:use-module ((guix build syscalls) + #:select (set-thread-name)) #:use-module (guix-build-coordinator utils) #:use-module (guix-build-coordinator client-communication) #:use-module (guix-qa-frontpage database) @@ -144,6 +146,11 @@ (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name "patch builds")) + (const #t)) + (while #t (with-exception-handler (lambda (exn) @@ -279,6 +286,11 @@ (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name "branch builds")) + (const #t)) + (while #t (with-exception-handler (lambda (exn) @@ -611,6 +623,11 @@ (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name "system test builds")) + (const #t)) + (while #t (with-exception-handler (lambda (exn) diff --git a/guix-qa-frontpage/manage-patch-branches.scm b/guix-qa-frontpage/manage-patch-branches.scm index b29cf67..f10ba9f 100644 --- a/guix-qa-frontpage/manage-patch-branches.scm +++ b/guix-qa-frontpage/manage-patch-branches.scm @@ -13,6 +13,8 @@ #:use-module (guix sets) #:use-module (guix memoization) #:use-module (guix build utils) + #:use-module ((guix build syscalls) + #:select (set-thread-name)) #:use-module (guix-build-coordinator utils) #:use-module ((guix build download) #:select (http-fetch)) #:use-module ((guix build utils) #:select (with-directory-excursion)) @@ -409,6 +411,11 @@ (call-with-new-thread (lambda () + (catch 'system-error + (lambda () + (set-thread-name "patch branches")) + (const #t)) + (while #t (with-exception-handler (lambda (exn) -- cgit v1.2.3