From owner-freebsd-questions@FreeBSD.ORG Mon Nov 8 18:44:36 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E49216A4CE for ; Mon, 8 Nov 2004 18:44:36 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12E1F43D49 for ; Mon, 8 Nov 2004 18:44:36 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id iA8IiY46047208; Mon, 8 Nov 2004 12:44:34 -0600 (CST) (envelope-from dan) Date: Mon, 8 Nov 2004 12:44:33 -0600 From: Dan Nelson To: Kyryll A Mirnenko Message-ID: <20041108184433.GA66976@dan.emsphone.com> References: <200411082039.57036.mirya@innovativemarketing.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200411082039.57036.mirya@innovativemarketing.com.ua> X-OS: FreeBSD 5.3-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: freebsd-questions@freebsd.org Subject: Re: KSE headache: Spinlock called when not threaded X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 18:44:36 -0000 In the last episode (Nov 08), Kyryll A Mirnenko said: > I found out some apps recompiled with KSE libpthread (not from ports, > just by myself from original sources) are terminated with this > message while worked fine for libc_r; here's the source > (lib/libpthread/thr_spinlock.c): > > void > _spinlock(spinlock_t *lck) > { > struct spinlock_extra *extra; > > if (!__isthreaded) > PANIC("Spinlock called when not threaded."); [..] > Removing the 1st check works for most apps, but some of 'em (xmms is > the one) hang up there; can anyone tell me what can be wrong there? You probably updated from an older 5.x to 5.3? This is libpthread's obscure way of saying "there are two threads libraries linked to this app and I can't handle it". Run "ldd -a" on your binary and see if libc_r got pulled in via a shared library. If so, rebuild that library so it pulls in libpthread instead of libc_r. A workaround until you get everything rebuilt is to redirect libc_r to libpthread via /etc/libmap.conf: libc_r.so.5 libpthread.so.1 libc_r.so libpthread.so -- Dan Nelson dnelson@allantgroup.com