mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
tests: publish: Constrain guix-publish thread use.
On systems with more than 64 processors. Otherwise starting so many threads during the test will trip resource limits and lead to a spurious failure with SIGABRT. I'm seeing this on a 128 core system running Guix, and limiting to just 64 processors seems sufficient. * tests/publish.scm: Call setaffinity when the current processor count exceeds 64. Change-Id: Id4c6d7dcc9ae8dd8dafa2587def98f538061425c
This commit is contained in:
parent
b55e3b1a4b
commit
5058b40aba
1 changed files with 14 additions and 0 deletions
|
@ -96,6 +96,20 @@
|
|||
(lambda ()
|
||||
exp ...)))))
|
||||
|
||||
;; guix-publish uses (current-processor-count) as the default number of
|
||||
;; workers, however on a system with a large number of cores, that large
|
||||
;; number of worker threads being used in the course of these tests can end up
|
||||
;; hitting resource limits and causing spurious test failures.
|
||||
;;
|
||||
;; This will depend on what resource limits are in use, but 64 seems low
|
||||
;; enough to be able to run the tests without problems.
|
||||
(let ((max-processors 64))
|
||||
(when (> (current-processor-count)
|
||||
max-processors)
|
||||
(setaffinity
|
||||
(getpid)
|
||||
(make-bitvector max-processors #t))))
|
||||
|
||||
;; Run a local publishing server in a separate thread.
|
||||
(with-separate-output-ports
|
||||
(call-with-new-thread
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue