From owner-freebsd-current@FreeBSD.ORG Wed Mar 3 06:21:49 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75EC716A533; Wed, 3 Mar 2004 06:21:49 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33B6A43D2F; Wed, 3 Mar 2004 06:21:49 -0800 (PST) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i23ELmbN021887; Wed, 3 Mar 2004 09:21:48 -0500 (EST) Date: Wed, 3 Mar 2004 09:21:48 -0500 (EST) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Alfred Perlstein In-Reply-To: <20040303105149.GH56622@elvis.mu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: David Xu cc: current@freebsd.org Subject: Re: fix for libpthread X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2004 14:21:49 -0000 On Wed, 3 Mar 2004, Alfred Perlstein wrote: > * Alfred Perlstein [040303 02:46] wrote: > > * David Xu [040303 00:09] wrote: > > > Alfred Perlstein wrote: > > > > > > >This assertion doesn't seem necessary. Apply to > > > >src/lib/libpthread/thread/thr_spinlock.c > > > > > > > As I saw some reports in the -CURRENT list, the panic is always > > > triggered by mix up > > > of libc_r and libpthread in same program. So to avoid other mysterious > > > crashes, > > > I'd like keep the code there, it is now used to check the problem. > > > > Can you clarify? Without this patch mplayer refuses to work for > > me and crashes at startup. With the patch it runs just fine. > > > > Is there a workaround? > > I sort of see what you are saying: > ~ % ldd `which mplayer` > /usr/local/bin/mplayer: > libpng.so.5 => /usr/local/lib/libpng.so.5 (0x2828e000) > libz.so.2 => /lib/libz.so.2 (0x282b0000) > libfreetype.so.9 => /usr/local/lib/libfreetype.so.9 (0x282bd000) > libncurses.so.5 => /lib/libncurses.so.5 (0x28320000) > libGL.so.1 => /usr/X11R6/lib/libGL.so.1 (0x2835c000) > libXv.so.1 => /usr/X11R6/lib/libXv.so.1 (0x283c9000) > libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x283ce000) > libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x283dd000) > libpthread.so.1 => /usr/lib/libpthread.so.1 (0x284a5000) > libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x284c8000) > libintl.so.6 => /usr/local/lib/libintl.so.6 (0x285b7000) > libm.so.2 => /lib/libm.so.2 (0x285bf000) > libc.so.5 => /lib/libc.so.5 (0x285d7000) > libc_r.so.5 => /usr/lib/libc_r.so.5 (0x286a2000) > > I see somehow it got linked against BOTH libpthread and libc_r, > there has to be a way to prevent that sort of bogus linkage > from happening. :( Or at least make it work right when it > does happen... It's too hard to make it work correctly; it involves coordinating some of the thread library internals which are private. If someone linked against both LinuxThreads or NPT and libpthread, would you advocate fixing libc/libc_r/libthr/libpthread to allow this? :-) -- Dan Eischen