|
From: | Chicken Trac |
Subject: | [Chicken-janitors] #981: entropy-unix from srfi-27 pegs the CPU after /dev/urandom is accessed |
Date: | Sun, 10 Feb 2013 18:32:30 -0000 |
#981: entropy-unix from srfi-27 pegs the CPU after /dev/urandom is accessed ---------------------+------------------------------------------------------ Reporter: andyjpb | Owner: kon Type: defect | Status: new Priority: major | Milestone: someday Component: unknown | Version: 4.8.x Keywords: | ---------------------+------------------------------------------------------ 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 -- Ticket URL: <http://bugs.call-cc.org/ticket/981> Chicken Scheme <http://www.call-with-current-continuation.org/> Chicken Scheme is a compiler for the Scheme programming language.
[Prev in Thread] | Current Thread | [Next in Thread] |