GNU bug report logs - #14579
locking breaks across filesystems

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: libtool; Reported by: Amitai Schlair <schmonz@HIDDEN>; dated Sat, 8 Jun 2013 18:22:02 UTC; Maintainer for libtool is bug-libtool@HIDDEN.

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


Received: (at submit) by debbugs.gnu.org; 8 Jun 2013 18:21:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 08 14:21:13 2013
Received: from localhost ([127.0.0.1]:58744 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UlNlI-0001lm-V6
	for submit <at> debbugs.gnu.org; Sat, 08 Jun 2013 14:21:13 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48089)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <schmonz@HIDDEN>) id 1UlNXx-0001HT-So
	for submit <at> debbugs.gnu.org; Sat, 08 Jun 2013 14:07:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <schmonz@HIDDEN>) id 1UlNXg-0004T8-IF
	for submit <at> debbugs.gnu.org; Sat, 08 Jun 2013 14:07:13 -0400
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,
	T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:56604)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <schmonz@HIDDEN>) id 1UlNXg-0004Sy-FK
	for submit <at> debbugs.gnu.org; Sat, 08 Jun 2013 14:07:08 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49771)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <schmonz@HIDDEN>) id 1UlNXa-000400-Ut
	for bug-libtool@HIDDEN; Sat, 08 Jun 2013 14:07:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <schmonz@HIDDEN>) id 1UlNXX-0004P3-69
	for bug-libtool@HIDDEN; Sat, 08 Jun 2013 14:07:02 -0400
Received: from mail-vb0-x22d.google.com ([2607:f8b0:400c:c02::22d]:54054)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <schmonz@HIDDEN>) id 1UlNXX-0004Os-1c
	for bug-libtool@HIDDEN; Sat, 08 Jun 2013 14:06:59 -0400
Received: by mail-vb0-f45.google.com with SMTP id p14so1239934vbm.4
	for <bug-libtool@HIDDEN>; Sat, 08 Jun 2013 11:06:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:sender:date:x-google-sender-auth:message-id:subject
	:from:to:content-type;
	bh=70jh6G2wy/P3dl8UsyGvks0Qva4ISpQ8zI32Pch9MSU=;
	b=G5rpuvxUas8id4n6OuY8BN9LtMNS3k7meaYQu2BV+w/sj565rvFjR100TrHuAXYbm2
	M9WbDlb6SzmzuCZk80ZnnmhzlYWIIzwzByThlorbdMbVr84Oq2bxdzWCioB5+TLzAagV
	tCbO7P2zb8xPYeP7shwkJzEhb5TTzKAKiq4UnvFFlIv0Y2IPcvi1iqMSY43M7EDIrkSQ
	/ANuXxaNRDk9qQhWS2LzLnPbG4vqzGnFy10JRJOy2kS+fS6QTHy7cOGGERWCt9XBm8ed
	20QYY0yej/RUSqpMefbtBFHXIq8kPLl10DwzfGMxWoJDeNYVV5ix8Cz8IHSXq7/bE+Sx
	ekCQ==
MIME-Version: 1.0
X-Received: by 10.52.165.200 with SMTP id za8mr1670110vdb.41.1370714818166;
	Sat, 08 Jun 2013 11:06:58 -0700 (PDT)
Received: by 10.220.104.4 with HTTP; Sat, 8 Jun 2013 11:06:57 -0700 (PDT)
Date: Sat, 8 Jun 2013 14:06:57 -0400
X-Google-Sender-Auth: Lmdxr5RgVIsO3kUlLaFEleb4Zew
Message-ID: <CA+pHapvmC6Z2MA0f=NoAshhPJ5V9mXo6PkGMVZpfk1GX2bCrqQ@HIDDEN>
Subject: locking breaks across filesystems
From: Amitai Schlair <schmonz@HIDDEN>
To: bug-libtool@HIDDEN
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.4 (---)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sat, 08 Jun 2013 14:21:11 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://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: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.1 (------)

What I tried:

On Mac OS X 10.6.8 (Darwin 10.8.0) with Xcode 3.2.5, fetch and extract
pkgsrc into a dedicated disk partition. Using pkgsrc, build and
install libtool 2.4.2 to the root partition. Using pkgsrc, try
building and installing software that uses libtool.


What I expected to happen:

Succeed at building and installing software that uses libtool.


What actually happened:

Fail, like so (in this example, pkg-config):

[...]
  CC       gprintf.lo
  CC       glib-unix.lo
  CC       gthread-posix.lo
  CC       giounix.lo
  CC       gspawn.lo
  CCLD     libglib-2.0.la
libtool: link: Waiting for
/Volumes/pkgsrc/current/devel/pkg-config/work.ap-juicer/pkg-config-0.28/glib/glib/libcharset/.libs/libcharset.a.lock
to be removed
libtool: link: Waiting for
/Volumes/pkgsrc/current/devel/pkg-config/work.ap-juicer/pkg-config-0.28/glib/glib/libcharset/.libs/libcharset.a.lock
to be removed
libtool: link: Waiting for
/Volumes/pkgsrc/current/devel/pkg-config/work.ap-juicer/pkg-config-0.28/glib/glib/libcharset/.libs/libcharset.a.lock
to be removed
[repeats forever]


What I've figured out so far:

* The error message comes from func_extract_an_archive() (and not the
other occurrence of "to be removed").

* It's conditionalized on lock_old_archive_extraction being "yes",
which is true only on Darwin.

* It attempts to create a lockfile as a hardlink to libtool itself,
which fails when the installed libtool is not on the same filesystem
as the source being built.

* It assumes the only reason the hardlink could fail is the target
already existing.

* When it fails for any other reason, a wrong conclusion goes to
stderr, the real error goes to /dev/null, and we're stuck in an
infinite loop.

* If I set lock_old_archive_extraction=no, everything works as
expected in my limited testing.


What I haven't figured out, and am asking you to:

* What Darwin-specific problem is lock_old_archive_extraction trying
to prevent? I see that the variable was introduced 2009-06-10,
accompanied by an automated test to verify that convenience archive
extraction works concurrently. I couldn't figure out at a glance how
to run that test, so I'm not sure whether a working
lock_old_archive_extraction would have done me any good. What have I
broken on my Darwin system by setting it to "no"? In what context is
it still needed? (I'm guessing there is one, but if it turns out there
isn't, removing lock_old_archive_extraction and related codepaths
would solve my problem.)

* Can the locking code (if it needs to live) print the actual error
when there is one, so that future problems are less confusing?

* Can the locking code (if it needs to live) either work entirely
within the build area or not rely on hardlinks, so that it works in a
filesystem configuration like mine?

Thank you for libtool and for reading this bug report!




Acknowledgement sent to Amitai Schlair <schmonz@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-libtool@HIDDEN. Full text available.
Report forwarded to bug-libtool@HIDDEN:
bug#14579; Package libtool. 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: Fri, 31 Oct 2014 17:00:04 UTC

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