[Buildroot] issue with timer_create and openblas after update buildroot from 2019_02 to 2021_02
Arthur Lambert
lambertarthur22 at gmail.com
Wed Apr 7 09:01:59 UTC 2021
I am trying to update buildroot from 2019_02 tag to 2021_02. After the
update I have
some issue with timer_create function from uclibc . I get -1 return error
with EAGAIN errno.
The error only occurred with SIGEV_THREAD type.
I was able to track the code responsible from the error without
understanding the reason
output/build/uclibc-1.0.37/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c
line-150
>> {
>> /* Create the helper thread. */
>> pthread_once (&__helper_once, __start_helper_thread);
>> if (__helper_tid == 0)
>> {
>> /* No resources to start the helper thread. */
>> __set_errno (EAGAIN);
>> return -1;
>> }
I am was also able to reproduce the issue with a minimalist piece of code.
The issue seems
to be related to openblas. I dont see the link between BLAS and
thread/timer issue ??
>> #include <stdlib.h>
>> #include <unistd.h>
>> #include <stdio.h>
>> #include <signal.h>
>> #include <time.h>
>>
>>
>> int main(void)
>> {
>>
>> struct sigevent alarm_sigevt;
>> timer_t alarm_timer;
>> int ret = 0;
>>
>> alarm_sigevt.sigev_notify = SIGEV_THREAD;
>> alarm_sigevt.sigev_notify_function = NULL;
>> alarm_sigevt.sigev_notify_attributes = NULL;
>> alarm_sigevt.sigev_value.sival_ptr = NULL;
>> ret = timer_create(CLOCK_REALTIME, &alarm_sigevt, &alarm_timer);
>> printf ("ret : %d\n", ret);
>>
>> exit(EXIT_SUCCESS);
>> }
I compile the code like this :
/home/arthur/work/buildroot/atto_dreem3_dev/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-gcc
test_timer.c -o test_timer
I run the binary on my arm target :
# ./test_timer
ret : 0
#
Everything is working fine here.
I just add openblas library now :
/home/arthur/work/buildroot/atto_dreem3_dev/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-gcc
test_timer.c -o test_timer -lopenblas
I now run the new binary :
# ./test_timer
ret : -1
An issue with openblas which init too many timer ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210407/9f6f31fe/attachment.html>
More information about the buildroot
mailing list