emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#25386: closed (guile-2.0 and 2.2 thread leakage+cr


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#25386: closed (guile-2.0 and 2.2 thread leakage+crash; very simple test attached.)
Date: Wed, 01 Mar 2017 15:33:01 +0000

Your message dated Wed, 01 Mar 2017 16:31:57 +0100
with message-id <address@hidden>
and subject line Re: bug#25386: This can be closed
has caused the debbugs.gnu.org bug report #25386,
regarding guile-2.0 and 2.2 thread leakage+crash; very simple test attached.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
25386: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25386
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: guile-2.0 and 2.2 thread leakage+crash; very simple test attached. Date: Sat, 7 Jan 2017 15:47:51 -0600
The (very simple) program below leaks ... something, very rapidly, and
then crashes after about 15-30 seconds.  Last thing printed before
crash:

rate=194.80519560944032
num threads=2
((gc-time-taken . 2791348254) (heap-size . 7532883968) (heap-free-size
. 2449408) (heap-total-allocated . 23912882640)
(heap-allocated-since-gc . 1073995264) (protected-objects . 90)
(gc-times . 87))

Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
Aborted

Similar issue in guile-2.2 except it takes longer (8 minutes) and
crashes in gc somewhere.  I assume that some sort of
continuation is left lying about, even though the thread has
exited.

(define junk 0)
(define halt #f)

(define (wtf-thr)
   (define start (- (current-time) 0.1))

   ; Create thread that does junk and exits.  Yes, the increment
   ; of `junk` is not protected, and its racey, but so what.
   (define (mkthr v) (call-with-new-thread (lambda () (set! junk (+ junk
1)))))

   ; thread arguments
   (define thrarg (make-list 10 0))

   (define cnt 0)
   (define (mke)
      ; Create a limited number of threads
      (define thr-list (map mkthr thrarg))
      ; (display (length (all-threads)))
      (map join-thread thr-list)

      ; Some handy debug printing.
      (set! cnt (+ cnt 1))
      (if (eq? 0 (modulo cnt 500))
         (begin
            (display "rate=")
            (display (/ cnt (- (current-time) start))) (newline)
            (display "num threads=")
            (display (length (all-threads))) (newline)
            (display (gc-stats)) (newline) (newline)
         )))

   ; tail recursive infinite loop.
   (define (aloop) (mke) (if (not halt) (aloop)))

   ; while forever.
   (aloop)
)

; Run elsewhere, so that we have a shell prompt
; (not required for the bug)
(call-with-new-thread wtf-thr)

; halt if desired.
; (set! halt #t)



--- End Message ---
--- Begin Message --- Subject: Re: bug#25386: This can be closed Date: Wed, 01 Mar 2017 16:31:57 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
On Wed 11 Jan 2017 07:14, Linas Vepstas <address@hidden> writes:

> This can be closed as 'fixed'; I tested on today's git
>
> guile (GNU Guile) 2.1.5.19-7e9395
>
> and the worst of it seems to be over.  mem usage growth on the
> original test case:

OK, closing :)

Andy


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]