Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Nov 2004 12:44:33 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Kyryll A Mirnenko <mirya@innovativemarketing.com.ua>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: KSE headache: Spinlock called when not threaded
Message-ID:  <20041108184433.GA66976@dan.emsphone.com>
In-Reply-To: <200411082039.57036.mirya@innovativemarketing.com.ua>
References:  <200411082039.57036.mirya@innovativemarketing.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041108184433.GA66976>