unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: David Pirotte <david@altosw.be>
Cc: 15683@debbugs.gnu.org
Subject: bug#15683: [critical] ERROR: ... close-pipe: pipe not in table
Date: Sun, 17 Nov 2013 06:29:12 -0500	[thread overview]
Message-ID: <87y54n6zcn.fsf@netris.org> (raw)
In-Reply-To: <877gc78huy.fsf@netris.org> (Mark H. Weaver's message of "Sun, 17 Nov 2013 05:04:05 -0500")

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

--8<---------------cut here---------------start------------->8---
(use-modules (ice-9 popen))
(define threads
  (map (lambda (_)
         (call-with-new-thread
           (lambda ()
             (let loop ()
               (let ((pipe (open-pipe* OPEN_READ "echo" "foo")))
                 (read pipe)
                 (close-pipe pipe))
               (loop)))))
       (iota 4)))
--8<---------------cut here---------------end--------------->8---

Replace the '4' with the number of cores in your machine.  The code
above will create the requested number of threads, which run in the
background forever, rapidly creating and closing pipes.

The above program is able to reproduce the bug within a few seconds on
both of the multicore machines I have access to (a dual-core x86_64 box
and a 4-core MIPS-compatible Loongson 3A box).

With my patches applied, the above program runs indefinitely without a
problem (I let it run for several minutes).

Please try the code above on the largest machines you have access to.

     Thanks,
       Mark





  reply	other threads:[~2013-11-17 11:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 16:24 bug#15683: [critical] ERROR: ... close-pipe: pipe not in table David Pirotte
2013-11-17  9:46 ` Mark H Weaver
2013-11-17 10:04   ` Mark H Weaver
2013-11-17 11:29     ` Mark H Weaver [this message]
2013-11-17 15:59       ` Mark H Weaver
2013-11-17 17:54       ` David Pirotte
2013-11-23 23:07 ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y54n6zcn.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=15683@debbugs.gnu.org \
    --cc=david@altosw.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).