Subject: bug#15683: [critical] ERROR: ... close-pipe: pipe not in table

From: David Pirotte <[email-masked]>
Date: Sun, 17 Nov 2013 15:54:23 -0200

Hello Mark,

Thank you for your work on this [tremendous] problem [for us].  I am running the
test on our 12 cores machine on the lab and so far so good [it did crash immediately
when running the 'old' guile...]

Not sure it interest you, but i made a module version of your test, where I
also call (current-processor-count), here below...

Many thanks again,
David

;; --

> To gain some confidence in these patches, I wrote a little test program:
> 

--8<---------------cut here---------------start------------->8---
(define-module (tests thread-safe-popen)
  :use-module (ice-9 popen)
  :export (thread-safe-popen-test))

(define (thread-safe-popen-test)
  (map (lambda (_)
         (call-with-new-thread
	  (lambda ()
	    (let loop ()
	      (let ((pipe (open-pipe* OPEN_READ "echo" "foo")))
		(read pipe)
		(close-pipe pipe))
	      (loop)))))
       (iota (current-processor-count))))

#!

(use-modules (tests thread-safe-popen))
(reload-module (resolve-module '(tests thread-safe-popen)))

(thread-safe-popen-test)

!#
--8<---------------cut here---------------end--------------->8---