[Top][All Lists]

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

bug#26616: guile-2.2 par-for-each hangs for large lists

From: Linas Vepstas
Subject: bug#26616: guile-2.2 par-for-each hangs for large lists
Date: Sat, 22 Apr 2017 19:32:39 -0500

The following spins, burning about 250% cpu time, for large lists; it works fine for smaller lists.   This is for a recent version of guile from git: 

guile -v
guile (GNU Guile)

will retry with newer guile shortly.

On fresh guile:

(use-modules (srfi srfi-1))
(define al (list-tabulate 100000 values))
(define foo 0)
(par-for-each (lambda (x) (set! foo (+ x foo))) al)

^CERROR: In procedure scm-error:
ERROR: User interrupt

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In ice-9/threads.scm:
   289:22  5 (loop _)
In ice-9/futures.scm:
   265:11  4 (touch #<future 55e1984d3400 started #<procedure 55e198659f60 a…>)
   243:14  3 (work)
In unknown file:
           2 (wait-condition-variable #t)
While executing meta-command:
ERROR: In procedure cdr: Wrong type argument in position 1 (expecting pair): ()
scheme@(guile-user) [1]>

The above is after interrupting after an hour or so of accumulated CPU time.

Again, shorter lists (e.g. 10K long) work fine. My production lists are about 400K to 2M in size.


reply via email to

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