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=Af5ZA2q/89tpW40Va+cqK21+hvmN+dDaF0xTTmcCWcvPyTRMkK76v 3hJhd/Ck3rNjdgumvAkJSN4+Vr7ECeDl/n5qyM3jR8DaMBmeC9nLg0joVhj8Dw+T ztgKuOaC/bxgeg7CvPSaKAHVSqd2YzbZ4rQQxMr4sd+8FbLRWBiKec= 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=tX1M0l7O7T2LVmtRmWofDNgWu/A=; b=cAOhJ2e/vgup5rdWW0W34CkpL3uv X7Tu5Z6TELxl9xheqpbulk6qBovTrzGbQei3g3cA+oWRVtOSsyQLFe2unjqU2fyn 6AnlPE2fWyhRM9ZR2lY2AcSHEoS1Bl+/XA/xyqW007fyPvTP8p2y84op5viJHIJy FgY63a1AWDmJH4Y= 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: =?ISO-8859-1?Q?No, score=-98.2 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,GARBLED_BODY,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:7d43957, H*i:sk:7d43957, H*f:sk:7d43957, =d0=bf=d0=b8=d1?= X-HELO: drew.franken.de Date: Wed, 22 Mar 2017 09:53:14 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: dlclose() vs fork() Message-ID: <20170322085314.GB1785@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> <20170321134200 DOT GA18800 AT calimero DOT vinschen DOT de> <7d43957e-bd64-fdec-a7ef-15f66c29b9bb AT asokolov DOT org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nVMJ2NtxeReIH9PS" Content-Disposition: inline In-Reply-To: <7d43957e-bd64-fdec-a7ef-15f66c29b9bb@asokolov.org> User-Agent: Mutt/1.8.0 (2017-02-23) --nVMJ2NtxeReIH9PS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mar 22 08:44, Alexey Sokolov wrote: > Thanks Corinna for the quick fix, > The user confirmed it's working now with the snapshot. >=20 > 21.03.2017 13:42, Corinna Vinschen =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > 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. > >=20 > > dlopen/dlclose reference counting was broken. I applied a fix and > > uploaded new dev snapshots to https://cygwin.com/snapshots/ Thanks for testing and feedback. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --nVMJ2NtxeReIH9PS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJY0jt6AAoJEPU2Bp2uRE+gMyMP/jDQ4CnQcABpz9mtfvRdriGT meoEoyDBoef3NZ3q6uXYNlnweDmyuHiis7VGH2UBeb3A3KOicJx4GloPeS9e2EzX B5rSS4ZoW9wEGNvy7ohqPvDViPq1opDeX5PA2BuFwcE0hDgyLJ5zirBnxGJXOyQQ r9L4938eqe0KCldDccBHWj6N45EvU/obyjV4QrlXlEvNWb8vFVomsJkQLD5jtxXl HaoY2X7coj27UlmGzqzgt/WVSZp5ZHmsCvz5tYUJe8UceAr4cIdKMQ2FDzSzNV/a YA9TJe9QrpONxrHGwn3SUXNP44O6SA7xiH0V1jLIqGP+yM00maI0GlQa8IvWDQeA 211cNjsFULi+RTWpNTyNKqbPEgIt11XcEdR+MsBMRhyO8UZIwi/PchuWxBj+jh3K f3t/OovgvnSRsqbCDPgjYsg4cKy6650a3ExhT94Sl4wWCJ9b5ov/+wDTZDOqLr+c B52IAYOEqw9Co7ST/NAuo6dvhWcWj65G0jKv+PLNIRfWSzhMYg8GigOZqGaFjt79 Pq/MGm5na4jpa9iIGh6TI5U8XGRxDjcAY3bW2cKKNuV3uzip6mWD6clfnMoZj6Fm tI9DUdkvl7hFsG4xiI466vXYqt8fAq70b9Hi+kNFFoVWgWv94Bj6wCsulzQOfIwB wzErRU3nikq+p43Qgnvc =wxJK -----END PGP SIGNATURE----- --nVMJ2NtxeReIH9PS--