unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Olivier Dion via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" <bug-guile@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 59055-done@debbugs.gnu.org
Subject: bug#59055: [PATCH] Fix possible deadlock.
Date: Sun, 20 Nov 2022 13:33:56 -0500	[thread overview]
Message-ID: <874jutqxuz.fsf@laura> (raw)
In-Reply-To: <87wn7p5yt0.fsf@gnu.org>

On Sun, 20 Nov 2022, Ludovic Courtès <ludo@gnu.org> wrote:

> Did you try to come up with a reproducer?  That would be awesome but I
> guess it’s hard because you need to trigger EINTR at the right point.

With a stress test in guile-parallel.  Very hard to reproduce indeed.
You can also reproduce it with `ice-9 futures` I think.

Here's the stress test that I've been using:
--8<---------------cut here---------------start------------->8---
(use-modules
  ((ice-9 futures) #:prefix ice-9:)
  (srfi srfi-1)
  (srfi srfi-26))

(define (run-stress-test N future touch)
  (for-each
   touch
   (unfold
    (cut = N <>)
    (lambda (_)
      (future
       (const #t)))
    1+
    0)))

(run-stress-test 10000000 ice-9:make-future ice-9:touch)
--8<---------------cut here---------------end--------------->8---

-- 
Olivier Dion
oldiob.dev





      reply	other threads:[~2022-11-20 18:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-05 16:59 bug#59055: [PATCH] Fix possible deadlock Olivier Dion via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2022-11-20 17:19 ` Ludovic Courtès
2022-11-20 18:33   ` Olivier Dion via Bug reports for GUILE, GNU's Ubiquitous Extension Language [this message]

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=874jutqxuz.fsf@laura \
    --to=bug-guile@gnu.org \
    --cc=59055-done@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=olivier.dion@polymtl.ca \
    /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).