Matthew, I have built and installed:
Welcome to Racket v6.2.900.17. on the same machine described in the original post. The test script below has started failing again. Has the code reverted back to its old behaviour? Tim On Monday, August 24, 2015 at 3:59:03 PM UTC+1, Tim Brown wrote: > --------------------------------------------------------------------------- > #lang racket/base > (require racket/place > racket/match > racket/sandbox > db) > > (provide server-place) > > (define (server-place pl) > (define pgc (postgresql-connect #:database "my_db" > #:user "tim" > #:password "letmein")) > (define bcast-read-ch (place-channel-get pl)) > > ;; This is either necessary or aggravating > ;; [6 places survives 2 runs of 10,000,000 without a crash] > (define do-sbx? (not (getenv "NO_SANDBOX"))) > (unless do-sbx? (displayln "NO SANDBOX!")) > (define sbx (when do-sbx? (parameterize ([sandbox-eval-limits #f]) > (make-evaluator 'racket/base)))) > > (place-channel-put pl "standing by") > (let loop () > (match-define reply-to-pch (place-channel-get bcast-read-ch)) > (define n 1) > (define rsp-val > ;; This causes: SIGSEGV MAPERR si_code 1 fault on addr ... > (query-value pgc "SELECT $1 + 1" n) > ;;(query-value pgc "SELECT 1") ; This causes a spin+grow > ) > > (place-channel-put reply-to-pch 1) > (loop))) > > (module main racket/base > (require racket/place syntax/location) > > (define (env->int e) (let ((v (getenv e))) (and v (string->number v)))) > (define max-clients (or (env->int "CLIENT_THREADS") 20)) > (define report-period (or (env->int "REPORT_PERIOD") 10000)) > (define n-tests (or (env->int "TESTS") 10000000)) > (define n-servers (or (env->int "SERVER_PLACES") 3)) > > (define-values (bcast-to-ch bcast-from-ch) (place-channel)) > > (for/list ((n (in-range n-servers))) > (define srv-pl (dynamic-place (quote-module-path "..") 'server-place)) > ;; Tell server where to get its broadcast requests > (place-channel-put srv-pl bcast-from-ch) > (place-channel-get srv-pl)) ; Synchronise > > (define thread-limiter-sem (make-semaphore max-clients)) > > (define (consumer n) > (unless (zero? n) > (semaphore-wait thread-limiter-sem) > (thread > (lambda () > (define-values (reply-read-ch reply-write-ch) (place-channel)) > (when (zero? (modulo n report-period)) (displayln (- n-tests n))) > (place-channel-put bcast-to-ch reply-write-ch) > (place-channel-get reply-read-ch) > (semaphore-post thread-limiter-sem))) > (consumer (sub1 n)))) > (consumer n-tests)) > --------------------------------------------------------------------------- > > ----------------------------------------------------------------------- > $ racket --version > Welcome to Racket v6.2.900.10. > # racket is vanilla ./configure and make > $ uname -a > Linux XXX 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u1 x86_64 GNU/Linux > $ grep 'model name' /proc/cpuinfo > model name : Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz > model name : Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz > model name : Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz > model name : Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz > ----------------------------------------------------------------------- -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.