guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix thread-unsafe lazy initializations


From: Mark H Weaver
Subject: Re: [PATCH] Fix thread-unsafe lazy initializations
Date: Thu, 23 Jan 2014 16:22:31 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Panicz Maciej Godek <address@hidden> writes:

> 2014/1/23 Mark H Weaver <address@hidden>:
>> This patch fixes all of the thread-unsafe lazy initializations I could
>> find in stable-2.0, using 'scm_i_pthread_once'.
>>
>> Any comments and/or objections?
>
> Does this fix the error that Chris Vine found some time ago?

Probably not, but who knows?  Would you like to try?

There are definitely still thread-safety problems with module
autoloading.  I haven't fixed those yet.

> If so, is there any test in the test suite that failed before, and
> doesn't fail anymore?

No.

> According to Ludovic, Chris' example corresponds to
> test-pthread-create-secondary.c -- yet they differ in that guile's
> test doesn't use scm_c_eval_string, which helped to reveal the
> problem.
> Shouldn't it be added to the test suite along with the patch, for regression?

It would be a lot of work to add tests for all of these fixes, and I'm
not sure it would be easy to write tests that would detect these
problems with reasonably high probability.

Anyway, I'm already overloaded with work to do.
Would you like to do it?

> Could we come up with any tests that would prove with certainty that
> there are still some failures caused by lazy intializations of
> modules?

I don't need such a test.  It's obvious from the code that module
autoloading is not thread safe.

    Regards,
      Mark



reply via email to

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