Re: KSE headache: Spinlock called when not threaded

From: Dan Nelson (dnelson_at_allantgroup.com)
Date: 11/08/04

  • Next message: Lowell Gilbert: "Re: Integrated NIC support"
    Date: Mon, 8 Nov 2004 12:44:33 -0600
    To: Kyryll A Mirnenko <mirya@innovativemarketing.com.ua>
    
    

    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
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Lowell Gilbert: "Re: Integrated NIC support"

    Relevant Pages

    • Re: How to replace libpthread correctly on 7.0?
      ... I removed and rebuilt all my ports using the ports system, and so far I haven't noticed any problems with them. ... When I attempted to rebuild Code::Blocks, the build failed with an error relating to libpthread.so.2. ... I searched the web a bit and discovered that libpthread had fallen out of favor in 7 and was being replaced by something else. ... I thought that "make" was making all new executables and libraries, but in fact it was pulling in an old library that was linked to libpthread. ...
      (freebsd-questions)
    • Re: library problems with -CURRENT
      ... >It's not in UPDATING, but a change was recently made (can't say exactly ... This was introduced by libpthread ... This affects all ports which are still using libc.5 and libpthread/libkse. ... The easiest approach is probably to rebuild all your ports so that they ...
      (freebsd-current)
    • Re: Fatal error Spinlock called when not threaded. ... (Re:FreeBSD 5.3-BETA6 available)
      ... This affects your ports, not the base system. ... Unless you rebuild all your ports from ... The problem is mostly due to shared libraries being linked to ... on such a shared library will link the application to libpthread, ...
      (freebsd-current)
    • Re: HEADS UP: libkse -> libpthread switch
      ... it is recommended that you don't install a ... > ldd to check libraries and binaries for use of multiple ... > libpthread isn't found. ... > Change libkse back to libpthread and make it the default ...
      (freebsd-current)
    • Re: Thread safe malloc in Tru64?
      ... user-space libraries) is a result of cooperation between those libraries ... Without libpthread, there's no thread safety. ... You're already linking with -lmach, if you're using the UNSUPPORTED Mach ... using POSIX thread synchronization in a thread created using ...
      (comp.unix.tru64)