[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
test-ou
From: |
Ludovic Courtès |
Subject: |
test-ou |
Date: |
Fri, 20 Jan 2017 16:56:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hi!
With 2.1.6 I get this test failure on x86_64-linux-gnu:
--8<---------------cut here---------------start------------->8---
wrote
`/tmp/guix-build-guile-next-2.1.6.drv-0/guile-2.1.6/cache/guile/ccache/2.2-LE-8-3.9/tmp/guix-build-guile-next-2.1.6.drv-0/guile-2.1.6/test-suite/standalone/test-out-of-memory.go'
GC Warning: Failed to expand heap by 134348800 bytes
GC Warning: Failed to expand heap by 134217728 bytes
GC Warning: Out of Memory! Heap size: 1 MiB. Returning NULL!
error creating finalization thread: Cannot allocate memory
GC Warning: Failed to expand heap by 1000132608 bytes
GC Warning: Failed to expand heap by 1000001536 bytes
GC Warning: Out of Memory! Heap size: 1 MiB. Returning NULL!
GC Warning: Failed to expand heap by 499712 bytes
GC Warning: Failed to expand heap by 65536 bytes
GC Warning: Out of Memory! Heap size: 1 MiB. Returning NULL!
GC Warning: Failed to expand heap by 499712 bytes
GC Warning: Failed to expand heap by 65536 bytes
GC Warning: Out of Memory! Heap size: 1 MiB. Returning NULL!
Warning: Unwind-only `out-of-memory' exception; skipping pre-unwind handler.
FAIL: test-out-of-memory
--8<---------------cut here---------------end--------------->8---
It happens once every 2–3 runs. With the attached patched, I determined
that it’s the third test (iota) that’s failing:
--- a/test-suite/standalone/test-out-of-memory 2016-08-01 13:32:31.548127428
+0200
+++ b/test-suite/standalone/test-out-of-memory 2017-01-20 16:52:43.181547628
+0100
@@ -18,7 +18,10 @@ exec guile -q -s "$0" "$@"
(catch #t
;; Silence GC warnings.
(lambda ()
- (current-warning-port (open-output-file "/dev/null")))
+ (let ((stderr (dup (current-error-port))))
+ (set-current-error-port stderr)
+ (close-fdes 2)
+ (dup2 (open-fdes "/dev/null" O_WRONLY) 2)))
(lambda (k . args)
(print-exception (current-error-port) #f k args)
(write "Skipping test.\n" (current-error-port))
@@ -32,7 +35,8 @@ exec guile -q -s "$0" "$@"
(unless (and soft (< soft *limit*))
(setrlimit 'as (if hard (min *limit* hard) *limit*) hard))))
-(define (test thunk)
+(define (test n thunk)
+ (pk 'test n)
(catch 'out-of-memory
(lambda ()
(thunk)
@@ -42,27 +46,27 @@ exec guile -q -s "$0" "$@"
(use-modules (rnrs bytevectors))
-(test (lambda ()
+(test 1 (lambda ()
;; Unhappily, on 32-bit systems, vectors are limited to 16M
;; elements. Boo. Anyway, a vector with 16M elements takes 64
;; MB, which doesn't fit into 50 MB.
(make-vector (1- (ash 1 24)))))
-(test (lambda ()
+(test 2 (lambda ()
;; Likewise for a bytevector. This is different from the above,
;; as the elements of a bytevector are not traced by GC.
(make-bytevector #e1e9)))
-(test (lambda ()
+(test 3 (lambda ()
;; This one is the kicker -- we allocate pairs until the heap
;; can't expand. This is the hardest test to deal with because
;; the error-handling machinery has no memory in which to work.
(iota #e1e8)))
-(test (lambda ()
+(test 4 (lambda ()
;; The same, but also causing allocating during the unwind
;; (ouch!)
(dynamic-wind
(lambda () #t)
- (lambda () (iota #e1e8))
- (lambda () (iota #e1e8)))))
+ (lambda () (pk 'body) (iota #e1e8))
+ (lambda () (pk 'unwind) (iota #e1e8)))))
;; Local Variables:
;; mode: scheme
Ideas?
Thanks,
Ludo’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- test-ou,
Ludovic Courtès <=