GNU bug report logs - #38364

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: kris <cq.personal@HIDDEN>; merged with #38368; dated Mon, 25 Nov 2019 21:33:36 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 38364 <at> debbugs.gnu.org:


Received: (at 38364) by debbugs.gnu.org; 26 Nov 2019 01:27:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 25 20:27:37 2019
Received: from localhost ([127.0.0.1]:50028 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iZPdh-0001cM-4t
	for submit <at> debbugs.gnu.org; Mon, 25 Nov 2019 20:27:37 -0500
Received: from quimby.gnus.org ([95.216.78.240]:58080)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>)
 id 1iZPde-0001bz-T1; Mon, 25 Nov 2019 20:27:35 -0500
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1iZPdW-0008By-3l; Tue, 26 Nov 2019 02:27:28 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: kris <cq.personal@HIDDEN>
Subject: Re: bug#38368: gcc/ dlclose() documentation feedback
References: <CACTzTFAPK2hpEyQpA6vhgRhcKMarD=cOOkwQHyMcpOvDb1kFPw@HIDDEN>
Date: Tue, 26 Nov 2019 02:27:25 +0100
In-Reply-To: <CACTzTFAPK2hpEyQpA6vhgRhcKMarD=cOOkwQHyMcpOvDb1kFPw@HIDDEN>
 (kris's message of "Mon, 25 Nov 2019 02:58:42 +0100")
Message-ID: <87tv6rig02.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: kris <cq.personal@HIDDEN> writes: > I think there is some
 ambiguity in the man page for dlclose(). This bug report landed in the Emacs
 bug tracker -- perhaps because of the debbugs.gnu.org outage yesterday? 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ingebrigtsen.no]
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38364
Cc: 38364 <at> debbugs.gnu.org, 38368 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

kris <cq.personal@HIDDEN> writes:

> I think there is some ambiguity in the man page for dlclose().

This bug report landed in the Emacs bug tracker -- perhaps because of
the debbugs.gnu.org outage yesterday?

What package was this bug report meant for?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38364; Package emacs. Full text available.
Merged 38364 38368. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Nov 2019 12:56:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 25 07:56:03 2019
Received: from localhost ([127.0.0.1]:47831 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iZDuM-0005TK-PR
	for submit <at> debbugs.gnu.org; Mon, 25 Nov 2019 07:56:03 -0500
Received: from lists.gnu.org ([209.51.188.17]:49370)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cq.personal@HIDDEN>) id 1iZDqU-0005JQ-Lu
 for submit <at> debbugs.gnu.org; Mon, 25 Nov 2019 07:52:03 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:42990)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <cq.personal@HIDDEN>) id 1iZ3bx-0006gj-Gc
 for bug-gnu-emacs@HIDDEN; Sun, 24 Nov 2019 20:56:22 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <cq.personal@HIDDEN>) id 1iZ3bw-0004ou-D8
 for bug-gnu-emacs@HIDDEN; Sun, 24 Nov 2019 20:56:21 -0500
Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:35047)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <cq.personal@HIDDEN>)
 id 1iZ3bw-0004oh-7U
 for bug-gnu-emacs@HIDDEN; Sun, 24 Nov 2019 20:56:20 -0500
Received: by mail-qt1-x830.google.com with SMTP id n4so15467170qte.2
 for <bug-gnu-emacs@HIDDEN>; Sun, 24 Nov 2019 17:56:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=sSZ63YYvHlNx/YNFAttr7I2OdmqG+JV9s9n7O2sTk3Q=;
 b=SNouqcfGRZZSS4WQuv97+feRPgUOg33cm+uziD+skoKF2PvsMu9xiDce96p7WO96uU
 Ad+XQ5KSwCsL5p4dUXiSW7Lc5PHA6Qg4UXDscTNUTMxuMn4HjB6yysQLlTgw3veReauJ
 OC/7CZ9zyYTDYtDaBAAt7wwU02NtMarY+FBGHIIyCHO3IveuFh+6ZW4U8zteyDxUksLK
 aWLaQD+0RziHsK1pbbRxvk05FDVaKlgmUvccvAG3Jel7PXu5st90nYxdypewlHE3x6Yk
 +Ic8kk8oCD45e5V6VQt9OdY9AlvWRucZ64QEm6OeYzBqEEloHnni+yOHkAYRV7qKVlvZ
 A2NA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=sSZ63YYvHlNx/YNFAttr7I2OdmqG+JV9s9n7O2sTk3Q=;
 b=XytESFpcYqcK9xh6sRma2ArGMB8El7HqV+J8ZlEIsur6qrus8JmSvBanBV/y1WM2S4
 bvVDjYRrSmjT4wu8hpWWKrHOqULbLmi8U21q9iYJCLdTswx386TBMAo5aWo846YB2y6s
 u6IynB5lCvDMe145UeiSP0+UznHYxhoGGzZEFl8crX1tONb05LSxaNtGC1UnkCdEslWr
 qk3mf0kZcGafL5esOxg2nUQlH21FRXrdzvCExlSnrjGVi15Ojlf3DPV+/0qMdaN8IEFu
 Rk/4Nl3O+0b++6rFTyuxJhTfWzC9FP/boko+aKwE/aaSWhMg+7GGi5aF9XQ2SDPmyNUK
 GmgQ==
X-Gm-Message-State: APjAAAX38ZqnQWowaEh07wjOEi6xNX+5FPbFAgrl+M/EF73WWW0r6veg
 wE7rzAy0Sur2nao9C1f9W/+SaR5rqa/OE5D1SWOYFw==
X-Google-Smtp-Source: APXvYqyIMECGEaKvBt8maV5TohDzunSQrwP1yR8Ckrc9Ix+t+bCI7HADuoAEpeWtCoPnj94q7EkirDAXHgwqAW7lLvQ=
X-Received: by 2002:ac8:138b:: with SMTP id h11mr8998644qtj.153.1574646978868; 
 Sun, 24 Nov 2019 17:56:18 -0800 (PST)
MIME-Version: 1.0
Received: by 2002:a0c:e306:0:0:0:0:0 with HTTP; Sun, 24 Nov 2019 17:56:18
 -0800 (PST)
From: kris <cq.personal@HIDDEN>
Date: Mon, 25 Nov 2019 02:56:18 +0100
Message-ID: <CACTzTFDXz0rVDZukQNFE6Qa-48J3HTQFQXL4h9md6QnH40fRdg@HIDDEN>
Subject: 
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2607:f8b0:4864:20::830
X-Spam-Score: 2.7 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  hello I think there is some ambiguity in the man page for
 dlclose(). A successful return from dlclose() does not guarantee that the
 symbols associated with handle are removed from the caller's address space.
 In addition to references resulting from explicit [...] 
 Content analysis details:   (2.7 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
 medium trust [209.51.188.17 listed in list.dnswl.org]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (cq.personal[at]gmail.com)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 2.0 BLANK_SUBJECT          Subject is present but empty
 2.0 SPOOFED_FREEMAIL       No description available.
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

hello

I think there is some ambiguity in the man page for dlclose().

***********
A  successful return from dlclose() does not guarantee that the
symbols associated with handle are removed from the caller's address
space.  In addition to references  resulting  from  explicit  dlopen()
 calls, a shared object may have been implicitly loaded (and reference
counted) because of dependencies in other shared objects.  Only when
all references have been released can the shared object be removed
from the address space.
********

that strikes me as undermining the docs for RTLD_NOLOAD in the same page which
say that residency CAN be tested.
i do the following to ensure the object is unloaded:
void *handle = dlopen(path,RTLD_NOW | RTLD_NOLOAD);
if(handle){
  return(dlclose(handle) || dlclose(handle) );
}
... it appears to take 2 calls to achieve the unload which I presume
means the refcount got incremented by this dlopen() despite the
RTLD_NOLOAD.
then I test again this way and the 2nd dlclose() fails and confirms
the object is unloaded.
or so I thought.
this worked until I came to recursively load a chain of objects (not
automatically)
and then tried reloading the 1st in the chain.
despite doing the above closing sequence on the chain in reverse order
and finally
on the head of the chain, before doing another dlopen() with a new
version of the disk file,
I found that extracting the data from the address returned from a
dlsym() yielded old data. I have to conclude that the object unload
does NOT happen and that the above dlopen(RTLD_NOLOAD)/dlclose()  test
is erroneous (at least in this layered arrangement).

so getting back to the original ambiguity claim, the passage mentions
removing symbols in the first instance then switches to 'references
being released' the next.  what are 'references' (symbols?) and how
does one determine anything about them or rather enough to 'release'
them so as to circumvent the lack of a guarantee from dlclose() ?
I have scoured the available docs and can find no more on how to
ascertain what prevents unloading or how such can be addressed.

I hope you agree there is at least a lack of clarity.
thanks for reading.




Acknowledgement sent to kris <cq.personal@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#38364; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 26 Nov 2019 01:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.