From owner-freebsd-current Wed Mar 8 9: 2:17 2000 Delivered-To: freebsd-current@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id DFA9B37C32F for ; Wed, 8 Mar 2000 09:02:09 -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 JAA12193; Wed, 8 Mar 2000 09:02:05 -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 JAA39397; Wed, 8 Mar 2000 09:02:04 -0800 (PST) (envelope-from jdp@polstra.com) Date: Wed, 8 Mar 2000 09:02:04 -0800 (PST) Message-Id: <200003081702.JAA39397@vashon.polstra.com> To: dmmiller@cvzoom.net Subject: Re: More "ld-elf.so.1: assert failed" messages In-Reply-To: <38C5A975.957756C4@cvzoom.net> References: <38BA5751.2396AE87@cvzoom.net> <38BB1E9C.CF44EC93@cvzoom.net> <200003060201.SAA85727@vashon.polstra.com> <38C5A975.957756C4@cvzoom.net> Organization: Polstra & Co., Seattle, WA Cc: current@freebsd.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <38C5A975.957756C4@cvzoom.net>, Donn Miller wrote: > John Polstra wrote: > > > > Below is a patch for "src/libexec/rtld-elf" which should fix the > > assert failures in wine. I'd appreciate hearing from anybody who > > tests this with multithreaded packages such as wine, JDK, Mozilla, > > and linuxthreads. > > [snipped patch] > > OK, here's some of the errors I get with Mozilla. It looks like it > happens when Gdk runs out os SysV shared memory. Otherwise, if I > don't get the "Gdk-WARNING **: shmget failed!", the ld.so erros never > occur, and Mozilla runs OK. It seems as if Wine is working OK so far, > though, although I probably haven't tested Wine enough: [...] > /usr/libexec/ld-elf.so.1: Application locking error: 1 readers and 1 > writers in dynamic linker. See DLLOCKINIT(3) in manual pages. This means that one thread was in the middle of a dlopen() call when another thread either called a new function for the first time (invoking the dynamic linker for lazy binding) or called dlsym(). Really the only _right_ place I can find to fix this kind of thing is in the application itself, by calling dllockinit() to set up locking for the dynamic linker invocations. I keep trying to come up with solutions that will work without that, but I'm not at all sure it's possible. I'll take another look at Mozilla and see what's done for other platforms. They must have this same problem, at least potentially. Thanks very much for testing this! John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message