[Ecls-list] Multi thread problem
Stanislav Frolov
frolosofsky at gmail.com
Thu Sep 27 11:13:35 UTC 2012
On Thursday 27 September 2012 10:01:04 Juan Jose Garcia-Ripoll wrote:
>
> Yes it is possible to do what you intend. I just wanted to make sure that
> there was no problem with thread registration at the Boehm-Weiser garbage
> collector level -- when the library intercepts your calls, it registers all
> threads and so the code in ECL becomes harmlessly redundant.
>
> Thanks for reporting this problem. Will get back to you ASAP.
>
> Juanjo
Thank you, Juanjo.
I read ecl sources and debug my problem. Well, segfaults reason is infinite
recursion. There are calls sequence (in new thread!):
ecl_import_current_thread -> alloc_process -> { ecl_alloc_object ->
alloc_2.d:
#ifdef GBC_BOEHM_PRECISE
...
#else
const cl_env_ptr the_env = ecl_process_env(); <<<
ecl_process_env -> FElibc_error -> make_constant_base_string -> ... ->
ecl_alloc_object -> recursion }
There is a bug in error processing, I think. But root of my problem is in
FElibc_error:"pthread_getspecific() failed.". I don't understand ECL's
threading but looks like you call pthread_getspecific (ecl_process_env) before
pthread_setspecific (ecl_set_process_env).
More information about the ecl-devel
mailing list