diff options
author | Christopher Baines <mail@cbaines.net> | 2025-02-25 09:24:17 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2025-02-25 09:24:17 +0000 |
commit | c8a641846ac4ed3bd883861cefca1758a2a05ff8 (patch) | |
tree | df1a2ca404fce15a4b6a4c1db40d8aeeab9a89e4 | |
parent | 4782dcc6b6bbedfa6d1da03fc4e10d42ac767d5d (diff) | |
download | qa-frontpage-c8a641846ac4ed3bd883861cefca1758a2a05ff8.tar qa-frontpage-c8a641846ac4ed3bd883861cefca1758a2a05ff8.tar.gz |
Enable and instrument core dumps
-rw-r--r-- | scripts/guix-qa-frontpage.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/guix-qa-frontpage.in b/scripts/guix-qa-frontpage.in index 89d1ecb..4e1aa2e 100644 --- a/scripts/guix-qa-frontpage.in +++ b/scripts/guix-qa-frontpage.in @@ -276,6 +276,22 @@ (setup-database (assq-ref opts 'database) metrics-registry))) + (with-exception-handler + (lambda (exn) + (simple-format #t "failed enabling core dumps: ~A\n" exn)) + (lambda () + (setrlimit 'core #f #f)) + #:unwind? #t) + + (let ((core-file + (string-append (getcwd) "/core")) + (metric + (make-gauge-metric metrics-registry + "core_dump_file_last_modified_seconds"))) + (when (file-exists? core-file) + (metric-set metric + (stat:mtime (stat core-file))))) + (start-guix-qa-frontpage (assq-ref opts 'port) (assq-ref opts 'host) |