From owner-freebsd-stable Tue Mar 28 8:56:31 2000 Delivered-To: freebsd-stable@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 0061737C18E for ; Tue, 28 Mar 2000 08:56:24 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id IAA09650; Tue, 28 Mar 2000 08:56:20 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id IAA04266; Tue, 28 Mar 2000 08:56:20 -0800 (PST) (envelope-from jdp@polstra.com) Date: Tue, 28 Mar 2000 08:56:20 -0800 (PST) Message-Id: <200003281656.IAA04266@vashon.polstra.com> To: aa8vb@ipass.net Subject: Re: Dynamic linker bug in 3.4-RELEASE (I think) In-Reply-To: <20000327215804.A64173@ipass.net> References: <20000317195156.A24243@ipass.net> <200003280211.SAA03086@vashon.polstra.com> <20000327215804.A64173@ipass.net> Organization: Polstra & Co., Seattle, WA Cc: stable@freebsd.org Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <20000327215804.A64173@ipass.net>, Randall Hopper 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