Libc Socket in Thread

ttcoder at netcourrier.com ttcoder at netcourrier.com
Mon Oct 4 16:52:57 CEST 2021


> Error: pthread_self() called from alien thread named 'Broker Thread'
> no RM attachment (READ pf_addr=0x4b8 pf_ip=0x10f62dfc from pager_object: 
> pd='init -> manager' thread='Broker Thread')

Looking at thread.cc,
it seems you're subclassing Genode::Thread and (presumably) instantiating it using the Genode thread API.

Others will correct me if I'm wrong but I think as of Genode 19.x it's no longer possible to call the LibC from such "pure native" threads.

You'll have to use the POSIX API instead (pthread_create() etc), and threads created in such a context will correctly register themselves in libc.lib.so and no longer trigger the assert() in pthread_self(), in the ubiquitous errno handling and so on.

Cedric







More information about the users mailing list