Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-08-2006, 10:17 PM   #1
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Rep: Reputation: 31
why are my apps using the wrong thread library?

Almost all of my gnome apps are dying. I look at the stacktraces, and for all the ones I've checked, they start by referencing the wrong thread library:

Backtrace was generated from '/usr/glibc2/opt/bin/gnome-background-properties'

Using host libthread_db library "/lib/tls/".
0x40beeb98 in waitpid () from /usr/glibc2/lib/
#0  0x40beeb98 in waitpid () from /usr/glibc2/lib/
#1  0x4011be70 in ?? () from /usr/glibc2/opt/lib/
#2  0x400d7e25 in libgnomeui_segv_handle () from /usr/glibc2/opt/lib/
#3  0x40bed469 in __pthread_sighandler () from /usr/glibc2/lib/
#4  <signal handler called>
#5  0x40c5c581 in kill () from /usr/glibc2/lib/
#6  0x40be9f55 in pthread_kill () from /usr/glibc2/lib/
#7  0x40bea2e0 in raise () from /usr/glibc2/lib/
#8  0x40c5c199 in raise () from /usr/glibc2/lib/
#9  0x40c5d802 in abort () from /usr/glibc2/lib/
#10 0x409f6b10 in g_logv () from /usr/glibc2/opt/lib/
#11 0x409f6b49 in g_log () from /usr/glibc2/opt/lib/
#12 0x409f6c9c in g_return_if_fail_warning () from /usr/glibc2/opt/lib/
#13 0x0804cc39 in gnome_wp_capplet_scroll_to_item ()
#14 0x0804df4b in gnome_wp_load_stuffs ()
#15 0x409ef3b1 in g_idle_dispatch () from /usr/glibc2/opt/lib/
#16 0x409ece3c in g_main_context_dispatch () from /usr/glibc2/opt/lib/
#17 0x409f022b in g_main_context_iterate () from /usr/glibc2/opt/lib/
#18 0x409f0547 in g_main_loop_run () from /usr/glibc2/opt/lib/
#19 0x403341d1 in gtk_main () from /usr/glibc2/opt/lib/
#20 0x08050470 in main ()
It SAYS it's using the lib in /lib/tls, which it shouldn't be. It should be using the threads library compiled with glibc. Does anyone know what's going wrong here? Should I recompile glibc?
Old 02-11-2006, 08:15 PM   #2
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Original Poster
Rep: Reputation: 31
I'm in the process of recompiling everything with the env variable LD_LIBRARY_PATH set to point to the new libraries. I thought this wasn't needed, becuase the gcc I'm using automatically links to new glibc and new libraries. Perhaps this wasn't enough to force it to use new libs. I'll post more once I find out if it works or not.
Old 02-11-2006, 10:09 PM   #3
Senior Member
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
well i mean the is just the debugging thing
for after it already goes bad i think
so yea it tries to initialize the one in /lib/tls first
cause thats just the way the beguhher works
and the thing is it appears to work fine cause it hunts through the problem.
/lib/tls is a distribution added hack to glibc.

if you are using new glibc and gnome is compiled against the old one

LD_LIBRARY_PATH works only for the loader not the linker i think
in a twist of confusion for linking you should use LD_RUN_PATH
as in RUN_LD or "run the native linker" not run an executable or library.
man ld says LD_RUN_PATH is used just like -rpath-link. so it specifies directories to look first for secondary libs used by the libs mentioned in -l flags. glibc would be one of those for shure

proper way might be to just use -L for linking
ld searches -L option first and in order before defaults.
plus -rpath-link option or LD_RUN_PATH.

and for runtime make sure you have LD_LIBRARY_PATH set


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware and Native POSIX Thread Library (NPTL) win32sux Slackware 19 05-17-2005 10:41 AM
pthread_cancel(pthread_t thread) wrong on Redhat 9!!!! tclwp Programming 3 01-14-2005 07:08 AM
Apps compare in one thread user_of_slack Linux - Software 1 10-03-2004 11:03 PM
X11 library problem wrong ELF size chewysplace Linux - Software 1 04-12-2004 02:40 PM
Thread Library used in Slack and Linux ckamheng Slackware 1 01-12-2004 09:05 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration