Clear cached store connections when fetching lint warnings
As I'm seeing the inferior process crash with [1] just after fetching the derivation lint warnings. This change appears to help, although it's probably just a workaround. When there's more packages/derivations, the caches might need clearing while fetching the derivation lint warnings, or this will need to be split across multiple processes. 1: Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
This commit is contained in:
parent
ff116d5e64
commit
5727703d84
1 changed files with 17 additions and 2 deletions
|
|
@ -561,8 +561,23 @@ WHERE job_id = $1")
|
||||||
'()
|
'()
|
||||||
(with-time-logging (simple-format #f "getting ~A lint warnings"
|
(with-time-logging (simple-format #f "getting ~A lint warnings"
|
||||||
name)
|
name)
|
||||||
(inferior-eval-with-store inf store (lint-warnings-for-checker
|
(format (current-error-port)
|
||||||
name)))))))
|
"inferior heap size: ~a MiB~%"
|
||||||
|
(round
|
||||||
|
(/ (inferior-eval '(assoc-ref (gc-stats) 'heap-size) inf)
|
||||||
|
(expt 2. 20))))
|
||||||
|
|
||||||
|
(let ((warnings
|
||||||
|
(inferior-eval-with-store
|
||||||
|
inf
|
||||||
|
store
|
||||||
|
(lint-warnings-for-checker name))))
|
||||||
|
|
||||||
|
;; Clean the cached store connections, as there are caches
|
||||||
|
;; associated with these that take up lots of memory
|
||||||
|
(inferior-eval '(hash-clear! %store-table) inf)
|
||||||
|
|
||||||
|
warnings))))))
|
||||||
checkers))))
|
checkers))))
|
||||||
|
|
||||||
(define (all-inferior-package-derivations store inf packages)
|
(define (all-inferior-package-derivations store inf packages)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue