[OE-core] pthreads should rdepend on libgcc

Bartosz Golaszewski brgl at bgdev.pl
Thu Nov 14 11:00:53 UTC 2019


śr., 13 lis 2019 o 23:39 Khem Raj <raj.khem at gmail.com> napisał(a):
>
> On Wed, Nov 13, 2019 at 12:34 AM Bartosz Golaszewski <brgl at bgdev.pl> wrote:
> >
> > This isn't a patch as I'm not sure how to fix the right way it but it
> > seems to my that every program that calls pthread_exit() indirectly
> > rdepends on libgcc_s.so.1 being installed in the system (at least when
> > using glibc).
> >
> > This is because the implementation of __pthread_exit() in glibc calls
> > pthread_cancel() which leads to pthread_cancel_init() being called in
> > which said shared object is being loaded with dlopen(). When this
> > fails, the program aborts with the following error message:
> >
> >     libgcc_s.so.1 must be installed for pthread_cancel to work
> >     Aborted
> >
> > A quick way of reproducing it is building a core-image-minimal (which
> > by default doesn't contain libgcc) with the core python3 package and
> > running the simple python HTTP server:
> >
> >     python3 -m http.server 8000
> >
> > Fetching any file will result in the above crash of the python process
> > when the thread serving the file exits.
> >
> > I'm not sure if the same issue is present in musl - the implementation
> > of __pthread_exit() there is different.
> >
>
> musl will not have this issue since it does not depend on libgcc
> unwinder implicitly.
>
> > Please advise on how to best approach this.
> >
>
> use musl ;)

I'd love to, but I'm stuck with systemd. :)

Bart

>
> > Thanks in advance,
> > Bartosz Golaszewski
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core at lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core


More information about the Openembedded-core mailing list