Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 2000 08:56:20 -0800 (PST)
From:      John Polstra <jdp@polstra.com>
To:        aa8vb@ipass.net
Cc:        stable@freebsd.org
Subject:   Re: Dynamic linker bug in 3.4-RELEASE (I think)
Message-ID:  <200003281656.IAA04266@vashon.polstra.com>
In-Reply-To: <20000327215804.A64173@ipass.net>
References:  <20000317195156.A24243@ipass.net> <200003280211.SAA03086@vashon.polstra.com> <20000327215804.A64173@ipass.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <20000327215804.A64173@ipass.net>,
Randall Hopper  <aa8vb@ipass.net> wrote:
>  |> If I run it over-and-over many times repeatedly, occasionally the dynamic
>  |> linker will fail to resolve the "sigwait" symbol.
>  |
>  |Is your program multi-threaded?  There are some known problems in
>  |connection with that.
> 
> This program isn't threaded, though I compiled it with -pthread (another
> util in that dir is threaded, and I'd used the same CFLAGS for both).
> 
>  |Try setting LD_BIND_NOW=1 in the environment and see if that changes
>  |the behavior.
> 
> That seemed to clear it up.  (Though, it happens so rarely it's hard to be
> sure.)

It may be a race between a signal handler and the mainline code, then.
Or it could be that the pthreads library (libc_r) uses one or more
internal threads which would make your application multi-threaded even
if you didn't intend it to be.  I will have to look again to see where
things stand in the -stable version of the dynamic linker.  I just got
home from vacation, and the warm sunshine seems to have irradiated
away most of my memory cells. :-)

If it's convenient for you, please try using the dynamic linker from
-current or 4.0.  It should cure this problem, and it should build OK
on a 3.4 system.  (You can find it in "src/libexec/rtld-elf".)  A word
of caution: be very careful if you experiment with the dynamic linker.
Almost nothing works if it is broken.  (In particular, you won't be
able to run the compiler to build a new one.)  Make a backup copy
named something like "/usr/libexec/ld-elf.so.1.good" first, so you can
"mv" it back into place if something goes wrong.  The basic utilities
such as "mv" and "cp" are statically linked, so they'll still work
even if the dynamic linker is broken.

John
-- 
  John Polstra                                               jdp@polstra.com
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003281656.IAA04266>