unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#26616: guile-2.2 par-for-each hangs for large lists
@ 2017-04-23  0:32 Linas Vepstas
  2017-04-23  3:14 ` bug#26616: close Linas Vepstas
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Linas Vepstas @ 2017-04-23  0:32 UTC (permalink / raw)
  To: 26616

[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]

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) 2.1.5.19-7e9395

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.

--linas

[-- Attachment #2: Type: text/html, Size: 1362 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-23 17:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-23  0:32 bug#26616: guile-2.2 par-for-each hangs for large lists Linas Vepstas
2017-04-23  3:14 ` bug#26616: close Linas Vepstas
2017-04-23  3:29 ` Linas Vepstas
2017-04-23 17:17 ` bug#26616: also a bug in guile-2.0.11 Linas Vepstas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).