#5600: pthread_self() sometimes returns NULL -----------------------------------+---------------------------------------- Reporter: kaliber | Owner: bonefish Type: bug | Status: new Priority: normal | Milestone: R1 Component: System/runtime_loader | Version: R1/Development Keywords: | Blockedby: Platform: All | Blocking: -----------------------------------+---------------------------------------- Following issue is very odd. I have a gcc4 binary called metacity which uses glib with pthreads. Sometimes pthread_self() returns NULL and metacity crashes. When I run metacity with LD_PRELOAD=any_existing_library_or_binary then it works. Debug code in glib (gthread) library: {{{ fprintf(stderr, "pthread_self(): %p\n", pthread_self()); }}} {{{ ~> metacity pthread_self(): (nil) Kill Thread ~> LD_PRELOAD=/bin/ls metacity pthread_self(): 0x323ee0 Window manager error: Unable to open X display ~> LD_PRELOAD=libroot.so metacity pthread_self(): 0x2fdee0 Window manager error: Unable to open X display }}} -- Ticket URL: <http://dev.haiku-os.org/ticket/5600> Haiku <http://dev.haiku-os.org> Haiku - the operating system.