﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	difficulty
981	entropy-unix from srfi-27 pegs the CPU after /dev/urandom is accessed	andyjpb	Kon Lovett	"cpu-peg.scm:
{{{
(use srfi-27 entropy-unix)

(define (make-secret-generator)
  (let ((source (make-entropy-source-urandom-device)))
    (lambda (byte-width)
       (entropy-source-u8vector source byte-width))))

((make-secret-generator) 12)
}}}

{{{
csi -n cpu-peg.scm &
top
}}}

After the above code has been running for a minute or so the csi process will use 99.95 of the CPU.


Compiling the following code with csc and running the subsequent binary has the same effect:

cpu-peg-csc.scm:
{{{
(use srfi-27 entropy-unix)

(define (make-secret-generator)
  (let ((source (make-entropy-source-urandom-device)))
    (lambda (byte-width)
       (entropy-source-u8vector source byte-width))))

((make-secret-generator) 12)

(let loop ()
 (thread-sleep! 10)
 (display ""x"")(newline)
 (loop))
}}}




Maybe this has something to do with the following changesets?
 * http://bugs.call-cc.org/changeset/1732
 * http://bugs.call-cc.org/changeset/1720"	defect	closed	major	someday	unknown	4.8.x	fixed			
