From owner-freebsd-current@FreeBSD.ORG Sat May 5 23:55:16 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE8E21065687; Sat, 5 May 2012 23:55:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 919308FC16; Sat, 5 May 2012 23:55:16 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:68f7:d8e6:6bfb:e905] (unknown [IPv6:2001:7b8:3a7:0:68f7:d8e6:6bfb:e905]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 0B5635C37; Sun, 6 May 2012 01:55:09 +0200 (CEST) Message-ID: <4FA5BDDC.4050307@FreeBSD.org> Date: Sun, 06 May 2012 01:55:08 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120425 Thunderbird/13.0 MIME-Version: 1.0 To: "Hartmann, O." References: <4FA54D4A.4050703@zedat.fu-berlin.de> In-Reply-To: <4FA54D4A.4050703@zedat.fu-berlin.de> X-Enigmail-Version: 1.5a1pre Content-Type: multipart/mixed; boundary="------------070005000407080202000300" Cc: freebsd-current@freebsd.org, freebsd-questions@freebsd.org, David Xu Subject: Re: OpenLDAP 2.4.31 on FreeBSD 10.0-CURRENT/amd64 broken! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 05 May 2012 23:55:17 -0000 This is a multi-part message in MIME format. --------------070005000407080202000300 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 2012-05-05 17:54, Hartmann, O. wrote: > Since Friday, I have on all of our FreeBSD 10.0-CURRENT/amd64 boxes > massive trouble with net/openldap24-server (SASL enabled, so it is > openldap-sasl-server). > > Last time OpenLDAP worked was Thursday last week, when obviously a > problematic update to the OS was made I managed to reproduce the segfault you are seeing in slapd, which is caused by a problem in libthr.so, introduced in r234947. Please apply the attached diff, rebuild lib/libthr and install it, and then try your slapd tests again. Let us know. :) @David, can you please review this diff? It looks like there was a mistake merging from Perforce, where you also moved the line: sc = SC_LOOKUP(wchan); to the top of the _sleepq_add() function, just before the call to _sleepq_lookup(). If this isn't done, sc may be uninitialized when it is dereferenced later on in the function. --------------070005000407080202000300 Content-Type: text/x-diff; name="libthr-segfault-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libthr-segfault-1.diff" Index: lib/libthr/thread/thr_sleepq.c =================================================================== --- lib/libthr/thread/thr_sleepq.c (revision 234994) +++ lib/libthr/thread/thr_sleepq.c (working copy) @@ -113,11 +113,11 @@ _sleepq_add(void *wchan, struct pthread *td) struct sleepqueue_chain *sc; struct sleepqueue *sq; + sc = SC_LOOKUP(wchan); sq = _sleepq_lookup(wchan); if (sq != NULL) { SLIST_INSERT_HEAD(&sq->sq_freeq, td->sleepqueue, sq_flink); } else { - sc = SC_LOOKUP(wchan); sq = td->sleepqueue; LIST_INSERT_HEAD(&sc->sc_queues, sq, sq_hash); sq->sq_wchan = wchan; --------------070005000407080202000300--