bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59055: [PATCH] Fix possible deadlock.


From: Olivier Dion
Subject: bug#59055: [PATCH] Fix possible deadlock.
Date: Sun, 20 Nov 2022 13:33:56 -0500

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 via email to

[Prev in Thread] Current Thread [Next in Thread]