X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=MwD6BvjyC0DN3hFxKfbPCc8LHIekpbLACEQjCQWIRhFCih4V+NGw+ pHJ2g3XNUi8Rh9jNgderlduhGuUTKXPvPcpbI7bPhV07SKjPlXAHrj3V5huUZNyj Dy6OYXgrUd9nPW/cfOmTDyv8TZuEliSeaUlauNhrgsHmwXraBzn1cU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=yKTqFBJn5MyvZTkNBz/K0NrnLzc=; b=KI/mU81uBAJcldVY2W3tF6KaBQ/2 ZgBMMgigg2ge2HPZhcRIfRYutCyusWS9a5Xcq1gY1PuxOWz6NZ45WbPmq0ltjkgO dg2yAjhCIj97cc9BHyAh/sVkvUsvOJN98Wnmid88wwHPgLrMsRQzVRjpPbTr3QsC Wk4Jx0iXXEbHjVw= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-101.7 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*i:sk:1504e7f, sokolov, Sokolov, H*MI:sk:1504e7f X-HELO: drew.franken.de Date: Tue, 21 Mar 2017 14:42:00 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: dlclose() vs fork() Message-ID: <20170321134200.GA18800@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <1504e7ff-dd60-f55f-d00a-0a1ae5d5e034 AT asokolov DOT org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="u3/rZRmxL6MmkK24" Content-Disposition: inline In-Reply-To: <1504e7ff-dd60-f55f-d00a-0a1ae5d5e034@asokolov.org> User-Agent: Mutt/1.8.0 (2017-02-23) --u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mar 21 09:03, Alexey Sokolov wrote: > Hello, > If the same DLL is dlopen()ed several times, dlclose() will actually > unload the DLL only after the same number of calls to dlclose(). >=20 > This works fine in cygwin, until we add fork(). >=20 > It looks like in the child process the counters of inherited DLLs are > set to 1, so the first dlclose() unloads it, causing segfault for > subsequent access to the unloaded code. > https://github.com/znc/znc/issues/1385#issuecomment-288014319 has a > working minimal example of this behavior. dlopen/dlclose reference counting was broken. I applied a fix and uploaded new dev snapshots to https://cygwin.com/snapshots/ I'm just building a 2.8.0-0.2 test release as well. Please test. Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --u3/rZRmxL6MmkK24 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJY0S2oAAoJEPU2Bp2uRE+gclEQAJx51l2A2jhttcdxsf/a6n6y gfyI5GPpCu94b8eZGfU5x5Y79swwc8xQtIZONarq6m15IInUJTqx5Ka9deYPeMzB Rg+Fso5gKQg+T4VEs/AZsUtJLJi2O84g+tEnqqNZ0nr3InPbAidobXRsq4uhwn8J 6nxmGcv/CzqE1ccG4GoE7rGww/h1fWuVZ3AK8BnPnSIBJaE3ZJwG3GRdxCG7sMRb 7SU5p2j7E3c2dMaGZFKr9ZLblsfsqn2xfIo0x16FHgCxJuJQ1vFwIbYbBEHVmmTc lzTr7uSYdcEv97SpcpVAvnWVpN+SisKwoD41LY+QnkMJCVO/rIJKKIo/GR9r9ADt /fCael3Lq9QEqwSG4QRc/C4H1l/4LIvU5BNIMoBKUu0b9OElokWSquvEMWfAbVqK vOOcRU/lHuoAhnGD1ENSf2paKpXtvJI3OkgEFvh17c/ntZXiV6x77UB/mQFPvEjT dzZuhkzNSIOQbIWuGPtZgLhsgo8mcACP4twTUWJMYs7otYjnJGDfC4Bjb0oC4xxm D0YxIiFc0PQ4MPFdnWN0RjzUNipdzXFtm+wXs9bmaHbMsRVEJ5oTVk/w6f3zih6G DJxG6enFEhvviWyCDvVi4u8htnG73QhF6cSZiEe5OubdZKN1xwbgDeeVCTCUf6CQ dsG+lR/snUs9etO0+fXC =UNUz -----END PGP SIGNATURE----- --u3/rZRmxL6MmkK24--