From owner-freebsd-current@FreeBSD.ORG Thu Feb 19 21:33:57 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 4616D16A4CE for ; Thu, 19 Feb 2004 21:33:57 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0327F43D1D for ; Thu, 19 Feb 2004 21:33:57 -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 i1K5XuSQ011363; Fri, 20 Feb 2004 00:33:56 -0500 (EST) Date: Fri, 20 Feb 2004 00:33:56 -0500 (EST) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Doug White In-Reply-To: <20040219203518.V55111@carver.gumbysoft.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: openldap server + kse = bewm 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: Fri, 20 Feb 2004 05:33:57 -0000 On Thu, 19 Feb 2004, Doug White wrote: > hey folks, > > Looks like the OpenLDAP server, slapd, and KSE don't get along too well. > > I can reliably segfault slapd by doing a few requests of it on a -CURRENT > machine built this morning PST. TLS seems to accelerate things, but it > can be done without. I have this backtrace, with a debugging libpthread, > but I'm not sure how useful it is to you folks. > > This is 100% reproducible, although initially it was croaking in > pthread_testcancel() instead of a kse function. This leads me to suspect > strange mutex corruption, but I'd like someone who understands kse to at > least spot-check. > > I thought at first it might be some strange interaction between berkeley > db 4.2's special assembly mutexes and kse, but I rebuilt db42 with pthread > mutexes and rebuilt openldap to use DB_PRIVATE so the db would mount, but > no change in status. > > Here's the trace from gdb: > > #0 0x284374a7 in kse_release () at {standard input}:15 > #1 0x28431fed in kse_wait (kse=0x8102000, td_wait=0x0, sigseqno=0) > at /usr/src/lib/libpthread/thread/thr_kern.c:1816 > #2 0x28430485 in kse_sched_multi (kmbx=0x0) > at /usr/src/lib/libpthread/thread/thr_kern.c:1011 > #3 0x28434014 in _i386_enter_uts () at {standard input}:25 > #4 0x2842fa4e in _thr_sched_switch (curthread=0x8260000) > at /usr/src/lib/libpthread/thread/thr_kern.c:596 > #5 0x2842c905 in mutex_lock_common (curthread=0x8260000, m=0x810e304, > abstime=0x0) at /usr/src/lib/libpthread/thread/thr_mutex.c:555 > #6 0x2842d633 in __pthread_mutex_lock (m=0x810e304) > at /usr/src/lib/libpthread/thread/thr_mutex.c:796 > #7 0x2839634f in pthread_mutex_lock () from /lib/libc.so.5 This is interesting. pthread_mutex_lock() is from libc, not libpthread! Are libraries linked in the correct order? -lpthread must be before -lc (you shouldn't have -lc anyways). -- Dan Eischen