Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7AB291812B for ; Fri, 23 Oct 2015 10:00:15 +0000 (UTC) Received: (qmail 47585 invoked by uid 500); 23 Oct 2015 10:00:03 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 47487 invoked by uid 500); 23 Oct 2015 10:00:03 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 47473 invoked by uid 99); 23 Oct 2015 10:00:03 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Oct 2015 10:00:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 57E71C0EC9 for ; Fri, 23 Oct 2015 10:00:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.11 X-Spam-Level: X-Spam-Status: No, score=-0.11 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=greenbytes.de Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ePJwfPgzg4EY for ; Fri, 23 Oct 2015 09:59:48 +0000 (UTC) Received: from mail.greenbytes.de (mail.greenbytes.de [217.91.35.233]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 7EBE142B60 for ; Fri, 23 Oct 2015 09:59:48 +0000 (UTC) Received: from [192.168.178.41] (unknown [93.211.97.239]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.greenbytes.de (Postfix) with ESMTPSA id D7FF515A044D for ; Fri, 23 Oct 2015 11:59:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1445594387; bh=gRZ5wTjGO/8Qw+6+HeiOOQVvoavxhSQbiKAUm3I0/xs=; h=Subject:From:In-Reply-To:Date:References:To:From; b=TkHDMDPefUc2nKZou+TiGKvtd5j3Ty5aEQC60Dm/8hL1WIaxMmN2OmkuoPV/gJ8oY 6h1j6sN+e+2sk6x/xz8I8pZ+xA5fJsbx8qCPnxIPDLNUGh+0eux/2C2UTfA7Bm1gF7 CTqaHbnK1yqhLJ7H0heBiZICv7RtRkT2I2cgapB4= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: segfault analysis From: Stefan Eissing In-Reply-To: Date: Fri, 23 Oct 2015 11:59:46 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <14EF204A-C8E6-406E-A441-9030403297D6@greenbytes.de> To: dev@httpd.apache.org X-Mailer: Apple Mail (2.3096.5) ;-) The problem with the unlock in release is that the h2_mplx might have = been destroyed by then, as the signal might give the lock to someone = waiting. I could move that mutex into h2_session ownership, just lending = it to h2_mplx... //Stefan > Am 23.10.2015 um 11:22 schrieb Yann Ylavic : >=20 > On Fri, Oct 23, 2015 at 11:18 AM, Yann Ylavic = wrote: >>=20 >> Index: modules/http2/h2_mplx.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- modules/http2/h2_mplx.c (revision 1710105) >> +++ modules/http2/h2_mplx.c (working copy) >> @@ -143,12 +143,18 @@ static void reference(h2_mplx *m) >> apr_atomic_inc32(&m->refs); >> } >>=20 >> -static void release(h2_mplx *m) >> +static void release(h2_mplx *m, int lock) >> { >> if (!apr_atomic_dec32(&m->refs)) { >> + if (lock) { >> + apr_thread_mutex_lock(m->lock); >> + } >> if (m->join_wait) { >> apr_thread_cond_signal(m->join_wait); >> } >> + if (lock) { >> + apr_thread_mutex_lock(m->unlock); >=20 > We'd rather unlock here :) >=20 >> + } >> } >> }