From owner-freebsd-bugs@FreeBSD.ORG Tue Dec 13 23:20:33 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C900B16A420 for ; Tue, 13 Dec 2005 23:20:33 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2EA043D8A for ; Tue, 13 Dec 2005 23:20:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id jBDNK3BI014010 for ; Tue, 13 Dec 2005 23:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id jBDNK3g1014009; Tue, 13 Dec 2005 23:20:03 GMT (envelope-from gnats) Resent-Date: Tue, 13 Dec 2005 23:20:03 GMT Resent-Message-Id: <200512132320.jBDNK3g1014009@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nick Johnson Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCD7616A41F for ; Tue, 13 Dec 2005 23:17:30 +0000 (GMT) (envelope-from root@turing.morons.org) Received: from turing.morons.org (morons.org [64.147.161.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08B2443D68 for ; Tue, 13 Dec 2005 23:17:25 +0000 (GMT) (envelope-from root@turing.morons.org) Received: from localhost (localhost.morons.org [127.0.0.1]) by turing.morons.org (Postfix) with ESMTP id B1F6B17067 for ; Tue, 13 Dec 2005 15:17:25 -0800 (PST) Received: from turing.morons.org ([127.0.0.1]) by localhost (turing.morons.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 86767-07 for ; Tue, 13 Dec 2005 15:17:14 -0800 (PST) Received: by turing.morons.org (Postfix, from userid 0) id 9491E17035; Tue, 13 Dec 2005 15:17:14 -0800 (PST) Message-Id: <20051213231714.9491E17035@turing.morons.org> Date: Tue, 13 Dec 2005 15:17:14 -0800 (PST) From: Nick Johnson To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/90367: libmap.conf needs exclusivity support X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Nick Johnson List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2005 23:20:34 -0000 >Number: 90367 >Category: bin >Synopsis: libmap.conf needs exclusivity support >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Dec 13 23:20:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Nick Johnson >Release: FreeBSD 6.0-STABLE i386 >Organization: morons.org >Environment: System: FreeBSD turing.morons.org 6.0-STABLE FreeBSD 6.0-STABLE #2: Tue Dec 6 08:53:05 PST 2005 root@turing.morons.org:/usr/obj/usr/src/sys/TURING i386 >Description: It is a fairly common problem that a program that uses dynamic linking can end up linking multiple different implementations of the same library. This can happen with Java programs that use JNI where the JNI shared object file is linked with a different threading library than the Java executable. One way to deal with this might be to add exclusivity groups to libmap.conf. For example, a directive might look like this: Exclusive libc_r.so* libpthread.so* libthr.so* # globs might be nice too! Then if the linker encounters a request for a shared object in an Exclusive group, and something from that group has already been linked, no additional linking will be performed. In the case of posix threads, this should work well, because it's a well-known API and private / undocumented functions shouldn't be used anyway... (ie, if it works to change the mapping in libmap.conf, this should work too). The tricky bit would be knowing which shared objects had already been linked to a running program, and doing all of this in a way that doesn't hinder performance considerably. >How-To-Repeat: n/a >Fix: n/a >Release-Note: >Audit-Trail: >Unformatted: