GNU bug report logs - #43521
ports.test "non-revealed port is closed" breaks other tests

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: guile; Reported by: Rob Browning <rlb@HIDDEN>; dated Sat, 19 Sep 2020 19:27:01 UTC; Maintainer for guile is bug-guile@HIDDEN.

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


Received: (at submit) by debbugs.gnu.org; 19 Sep 2020 20:40:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 16:40:47 2020
Received: from localhost ([127.0.0.1]:48219 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJjf5-0000Di-6H
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 16:40:47 -0400
Received: from lists.gnu.org ([209.51.188.17]:49312)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rlb@HIDDEN>) id 1kJjf4-0000Db-4j
 for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 16:40:46 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:41638)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rlb@HIDDEN>)
 id 1kJjf3-0003ox-99
 for bug-guile@HIDDEN; Sat, 19 Sep 2020 16:40:45 -0400
Received: from defaultvalue.org ([45.33.119.55]:37508)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <rlb@HIDDEN>) id 1kJjf1-00065X-Fn
 for bug-guile@HIDDEN; Sat, 19 Sep 2020 16:40:44 -0400
Received: from trouble.defaultvalue.org (localhost [127.0.0.1])
 (Authenticated sender: rlb@HIDDEN)
 by defaultvalue.org (Postfix) with ESMTPSA id 4809420147
 for <bug-guile@HIDDEN>; Sat, 19 Sep 2020 15:40:41 -0500 (CDT)
Received: by trouble.defaultvalue.org (Postfix, from userid 1000)
 id E30BB14E072; Sat, 19 Sep 2020 15:40:40 -0500 (CDT)
From: Rob Browning <rlb@HIDDEN>
To: bug-guile@HIDDEN
Subject: Re: ports.test "non-revealed port is closed" breaks other tests
In-Reply-To: <87d02h5zlt.fsf@HIDDEN>
References: <87ft7d601y.fsf@HIDDEN>
 <87d02h5zlt.fsf@HIDDEN>
Date: Sat, 19 Sep 2020 15:40:40 -0500
Message-ID: <87a6xl5wl3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=45.33.119.55; envelope-from=rlb@HIDDEN;
 helo=defaultvalue.org
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/19 15:25:46
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
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: -2.4 (--)

Rob Browning <rlb@HIDDEN> writes:

> ...and I'd have to think about it more carefully, but if dropping
> the close-fdes call would completely prevent any subsequent test from
> re-using the fd unsafely before the lingering port is collected, then
> perhaps that's one potential fix.

I ended up doing that for now:

  https://salsa.debian.org/rlb/deb-guile/-/commit/9fae58b134d8951e15b39b8e1751160a245228a6

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Information forwarded to bug-guile@HIDDEN:
bug#43521; Package guile. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 19 Sep 2020 19:35:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 15:35:31 2020
Received: from localhost ([127.0.0.1]:48155 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJidv-00075O-La
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 15:35:31 -0400
Received: from lists.gnu.org ([209.51.188.17]:58372)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rlb@HIDDEN>) id 1kJidu-00075H-TV
 for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 15:35:31 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:59822)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rlb@HIDDEN>)
 id 1kJidu-0007sa-Lh
 for bug-guile@HIDDEN; Sat, 19 Sep 2020 15:35:30 -0400
Received: from defaultvalue.org ([45.33.119.55]:37504)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <rlb@HIDDEN>) id 1kJids-00077H-8i
 for bug-guile@HIDDEN; Sat, 19 Sep 2020 15:35:30 -0400
Received: from trouble.defaultvalue.org (localhost [127.0.0.1])
 (Authenticated sender: rlb@HIDDEN)
 by defaultvalue.org (Postfix) with ESMTPSA id 0FCC92008E
 for <bug-guile@HIDDEN>; Sat, 19 Sep 2020 14:35:27 -0500 (CDT)
Received: by trouble.defaultvalue.org (Postfix, from userid 1000)
 id 9A8E614E072; Sat, 19 Sep 2020 14:35:26 -0500 (CDT)
From: Rob Browning <rlb@HIDDEN>
To: bug-guile@HIDDEN
Subject: Re: ports.test "non-revealed port is closed" breaks other tests
In-Reply-To: <87ft7d601y.fsf@HIDDEN>
References: <87ft7d601y.fsf@HIDDEN>
Date: Sat, 19 Sep 2020 14:35:26 -0500
Message-ID: <87d02h5zlt.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=45.33.119.55; envelope-from=rlb@HIDDEN;
 helo=defaultvalue.org
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/19 15:25:46
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
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: -2.4 (--)

Rob Browning <rlb@HIDDEN> writes:

> I believe the problem is that if the gc doesn't collect the port when
> the test calls (gc), then the test (which recognizes that possibility)
> calls close-fdes on the underlying fd.  However, the port still exists,
> and it may be garbage collected later, during a test that's using the
> same fd, which may break that test.

...and I'd have to think about it more carefully, but if dropping
the close-fdes call would completely prevent any subsequent test from
re-using the fd unsafely before the lingering port is collected, then
perhaps that's one potential fix.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Information forwarded to bug-guile@HIDDEN:
bug#43521; Package guile. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 19 Sep 2020 19:26:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 15:26:11 2020
Received: from localhost ([127.0.0.1]:48141 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJiUl-0006qT-Fy
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 15:26:11 -0400
Received: from lists.gnu.org ([209.51.188.17]:54336)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rlb@HIDDEN>) id 1kJiUj-0006q2-91
 for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 15:26:02 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:58178)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rlb@HIDDEN>)
 id 1kJiUi-0005Px-RT
 for bug-guile@HIDDEN; Sat, 19 Sep 2020 15:26:01 -0400
Received: from defaultvalue.org ([45.33.119.55]:37502)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <rlb@HIDDEN>) id 1kJiUb-0005yG-NS
 for bug-guile@HIDDEN; Sat, 19 Sep 2020 15:26:00 -0400
Received: from trouble.defaultvalue.org (localhost [127.0.0.1])
 (Authenticated sender: rlb@HIDDEN)
 by defaultvalue.org (Postfix) with ESMTPSA id 334A720147
 for <bug-guile@HIDDEN>; Sat, 19 Sep 2020 14:25:46 -0500 (CDT)
Received: by trouble.defaultvalue.org (Postfix, from userid 1000)
 id B23D014E072; Sat, 19 Sep 2020 14:25:45 -0500 (CDT)
From: Rob Browning <rlb@HIDDEN>
To: bug-guile@HIDDEN
Subject: ports.test "non-revealed port is closed" breaks other tests
Date: Sat, 19 Sep 2020 14:25:45 -0500
Message-ID: <87ft7d601y.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=45.33.119.55; envelope-from=rlb@HIDDEN;
 helo=defaultvalue.org
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/19 15:25:46
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
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: -2.4 (--)


I think the "non-revealed port is closed" test can break other tests,
depending on the gc's behavior.  At the moment this is easy to reproduce
for some reason (presumably differing gc behavior) on the Debian s390x
machines.

I believe the problem is that if the gc doesn't collect the port when
the test calls (gc), then the test (which recognizes that possibility)
calls close-fdes on the underlying fd.  However, the port still exists,
and it may be garbage collected later, during a test that's using the
same fd, which may break that test.

I did add some low-level fprintf diagnostics which confirmed that exact
behavior.  i.e. one of the subsequent tests would call (gc), and I could
see that the old port object (identified by the %p pointer) from the
earlier "non-revealed port is closed" test, closed the fd which broke
the the current test when it attempted a seek on the fd that should
still be open.

For now, I've just commented out the test in the Debian packages, and
unless some other arrangements can be made, suspect we might want to do
the same thing in Guile itself.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Acknowledgement sent to Rob Browning <rlb@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#43521; Package guile. 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: Sat, 19 Sep 2020 20:45:02 UTC

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