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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=wT3OFRVMp+clYt8G f76wjEeEkcJ0GZyWDRBN5Mzwi+jWRVUDeReMQyXDbARMyIotgHmMXDjKj9Hu65yO 0JQ4Ml1o8A4PvnC4xAaIDps9FuWvbarAJhyMM47UM6YU4pZetHSbDzrkRqVawLJb kFAaHshhNjy7912EgIsv1541pCM= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=xxGT7n+Qt0Pch435GA1QZE H28ZI=; b=MUjQihm6gi1mzBjaIh2aSJv0P6bh9kjz6A1cjKgBO7QeDAzhF6RiE6 elXHTrYkdv8QJl3guPH5XavvKZYEkfwv8K04tRcXN3UWDNVl53NgqDRubW9w4VOs 5pfnX7nr+UVX/ItMswJZ36iRvs7f9p/PxS/zDc1FDMNQxjcufU6MA= 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=2.1 required=5.0 tests=BAYES_00,BODY_8BITS,GARBLED_BODY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy==d0=bf=d0=b8=d1, =d0=b5=d1?= X-HELO: mail-wm0-f41.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=iIBfm1k152pp7KJOtnnpMWtV7tsoMeJuH2W20RiaClE=; b=EPA7y+AiLdjoUr7Lw8a89uhfm7tlr5/obCng/X4ws8v3ZNvCMQ3zwCVFZ/Ka9UAW1F NW7jiMteOj/uuFuSJ8Xr+ulyidp88v1m8EDpdrR831ELWkzReDGpUI0kiOnv+hfPzFSV e1S7aEt/IPR0+Rra4E5OEsD8FKgTCcU/YKL6WD6fSOf3TKTVblvUMinlsWp1Wr9jvzKL rygWgvSxsyeha+zLCvT8vQ+fIRWNorcjXvzr+Mfk3alt/fgAuKi12jhrsbs+AYKYm8Me C0zdg2h87Vl/d82u8kIq2U7Q088MkBd1lzt33z+ZEd76U/WCjyFh0eS02R39/mZlijzS pOCA== X-Gm-Message-State: AFeK/H3afCSX36PJ0Zjqp4g7i9HPe4dTjRqp0P8tmDwR3cv9bH8NuQ0B4XHNpQyi+gywog== X-Received: by 10.28.145.130 with SMTP id t124mr6555650wmd.39.1490172276943; Wed, 22 Mar 2017 01:44:36 -0700 (PDT) Subject: Re: dlclose() vs fork() 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> From: Alexey Sokolov Message-ID: <7d43957e-bd64-fdec-a7ef-15f66c29b9bb@asokolov.org> Date: Wed, 22 Mar 2017 08:44:35 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170321134200.GA18800@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Note-from-DJ: This may be spam Thanks Corinna for the quick fix, The user confirmed it's working now with the snapshot. 21.03.2017 13:42, Corinna Vinschen пишет: > 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(). >> >> This works fine in cygwin, until we add fork(). >> >> 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 > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple