[Top][All Lists]

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

bug#36609: 27.0.50; Possible race-condition in threading implementation

From: Pip Cet
Subject: bug#36609: 27.0.50; Possible race-condition in threading implementation
Date: Fri, 12 Jul 2019 12:44:35 +0000

On Fri, Jul 12, 2019 at 9:02 AM Pip Cet <address@hidden> wrote:
> On Thu, Jul 11, 2019 at 8:52 PM Andreas Politz
> <address@hidden> wrote:
> > I think there is a race-condition in the implementation of threads.  I
> > tried to find a minimal test-case, without success.  Thus, I've attached
> > a lengthy source-file.  Loading that file should trigger this bug and
> > may freeze your session.
> It does here, so I can provide further debugging information if
> needed. On first glance, it appears that xgselect returns abnormally
> with g_main_context acquired in one thread, and then other threads
> fail to acquire it and loop endlessly.

Okay, I'm still not sure this is really the problem Andreas was
seeing, but this code fails to work with xg_select:

(let ((thread (make-thread (lambda ()
                 (sleep-for 3)))))
  (thread-signal thread 'error nil))

Proposed patch attached.

Attachment: 0001-Protect-against-abnormal-exit-in-xg_select.patch
Description: Text Data

reply via email to

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