All of lore.kernel.org
 help / color / mirror / Atom feed
* pthreads should rdepend on libgcc
@ 2019-11-13  8:34 Bartosz Golaszewski
  2019-11-13 15:04 ` Mark Hatle
  2019-11-13 22:38 ` Khem Raj
  0 siblings, 2 replies; 10+ messages in thread
From: Bartosz Golaszewski @ 2019-11-13  8:34 UTC (permalink / raw)
  To: openembedded-core

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.

Please advise on how to best approach this.

Thanks in advance,
Bartosz Golaszewski


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-11-14 11:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13  8:34 pthreads should rdepend on libgcc Bartosz Golaszewski
2019-11-13 15:04 ` Mark Hatle
2019-11-13 15:50   ` Ross Burton
2019-11-13 22:36     ` Khem Raj
2019-11-14 11:01       ` Bartosz Golaszewski
2019-11-14 11:22       ` Adrian Bunk
2019-11-13 21:03   ` Bartosz Golaszewski
2019-11-13 21:58     ` Richard Purdie
2019-11-13 22:38 ` Khem Raj
2019-11-14 11:00   ` Bartosz Golaszewski

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.