From: Arthur Lambert <lambertarthur22@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] issue with timer_create and openblas after update buildroot from 2019_02 to 2021_02
Date: Wed, 7 Apr 2021 11:01:59 +0200 [thread overview]
Message-ID: <CAGpqJgqZBG5qMZDaS59syis2y1rm53f1KMWYzJKiwepHcJbadA@mail.gmail.com> (raw)
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>
next reply other threads:[~2021-04-07 9:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-07 9:01 Arthur Lambert [this message]
2021-04-08 22:59 ` [Buildroot] issue with timer_create and openblas after update buildroot from 2019_02 to 2021_02 Peter Seiderer
2021-04-09 7:53 ` Arthur Lambert
2021-04-09 19:18 ` Peter Seiderer
2021-04-13 19:52 ` Peter Seiderer
2021-04-16 21:26 ` Peter Seiderer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGpqJgqZBG5qMZDaS59syis2y1rm53f1KMWYzJKiwepHcJbadA@mail.gmail.com \
--to=lambertarthur22@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.