From unknown Tue Jun 17 01:47:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14718: 24.3.50; Endless loop in "package-read-all-archive-contents" Resent-From: Sebastian Wiesner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jun 2013 20:20:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 14718@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13721916013715 (code B ref -1); Tue, 25 Jun 2013 20:20:05 +0000 Received: (at submit) by debbugs.gnu.org; 25 Jun 2013 20:20:01 +0000 Received: from localhost ([127.0.0.1]:41033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrZia-0000xi-Py for submit@debbugs.gnu.org; Tue, 25 Jun 2013 16:20:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38288) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrZiY-0000xV-F7 for submit@debbugs.gnu.org; Tue, 25 Jun 2013 16:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrZiS-0005FD-3d for submit@debbugs.gnu.org; Tue, 25 Jun 2013 16:19:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-100.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM, T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrZiS-0005F8-0U for submit@debbugs.gnu.org; Tue, 25 Jun 2013 16:19:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrZiQ-0001yq-7z for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 16:19:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrZiO-00059s-Us for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 16:19:50 -0400 Received: from mail-ea0-x235.google.com ([2a00:1450:4013:c01::235]:41856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrZiO-00059m-P3 for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 16:19:48 -0400 Received: by mail-ea0-f181.google.com with SMTP id a15so7133230eae.40 for ; Tue, 25 Jun 2013 13:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=/uP1E+P/lyTc6hACoJ6vap/qdh0vts5MXyBg9upAoYc=; b=DEXh3be0cx82I/rbNjOrN7TE/QhZztFMPHtuJCx3ZBf+us+eW2BcQk5DQBnBdUukn4 z3xn4cGd4WfAsHaKQcVqb1ZIUWU5QBV2Q98CWxyDr8ijFFPvdrlVapkBjW/FzVpKflLs QJnkQRpysHBtqlIzIn9aA9rAaaIG1m8PmO8xRpjQ5mAh5qrR7azyO42nx1QAYdGrFMkM iIH7kXyG29uchdywiaPf8ECSCHySxWucgr49Edq+FAJrowaqQCMyPMQOV4oQJHay0ETJ oxwO6OJXBodX+aSOMI/rASDJisk+mfrm/2qcAFUuKYz9wiA42hdqyJ/V/qDlvaC7WM5d lvKw== X-Received: by 10.14.218.136 with SMTP id k8mr624024eep.111.1372191588046; Tue, 25 Jun 2013 13:19:48 -0700 (PDT) Received: from lunaryorn-air (host-188-174-198-200.customer.m-online.net. [188.174.198.200]) by mx.google.com with ESMTPSA id cg12sm38387651eeb.7.2013.06.25.13.19.46 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 25 Jun 2013 13:19:47 -0700 (PDT) From: Sebastian Wiesner Date: Tue, 25 Jun 2013 22:19:43 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) If a package is contained in two or more archives, "package-read-all-archive-contents" hangs in an endless loop. For instance, in "emacs -Q": ELISP> package-archives (("gnu" . "http://elpa.gnu.org/packages/")) ELISP> (package-refresh-contents) nil ELISP> (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) (("gnu" . "http://elpa.gnu.org/packages/") ("melpa" . "http://melpa.milkbox.net/packages/")) ELISP> package-archives (("gnu" . "http://elpa.gnu.org/packages/") ("melpa" . "http://melpa.milkbox.net/packages/")) ELISP> (package-refresh-contents) *** Eval error *** Quit during evaluation The last invocation continues forever. "Quit during evaluation" is the result of repeatedly pressing "C-g". I inserted some "message" calls into functions called by "package-refresh-contents", which indicate that the "while" loop at the bottom of "package--add-to-archive-contents" is the root cause. This loop seems to continue forever if "package--add-to-archive-contents" is invoked with a "package" which is already contained in another archive. Inserting a "(message "DEBUG: Looping for %s" package)" at the beginning of the body of this loop repeats this message a few thousand times before C-g succeeds in interrupting the evaluation. In my case, this was the "yasnippet" package which is contained in GNU as well as in MELPA. Apparently the test of this loop is wrong, but since I do not understand what the loop is supposed to do, I can't say how it is wrong. From unknown Tue Jun 17 01:47:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14718: 24.3.50; Endless loop in "package-read-all-archive-contents" Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jun 2013 00:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sebastian Wiesner Cc: 14718@debbugs.gnu.org Received: via spool by 14718-submit@debbugs.gnu.org id=B14718.1372207546931 (code B ref 14718); Wed, 26 Jun 2013 00:46:01 +0000 Received: (at 14718) by debbugs.gnu.org; 26 Jun 2013 00:45:46 +0000 Received: from localhost ([127.0.0.1]:41374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Urdrl-0000Er-9l for submit@debbugs.gnu.org; Tue, 25 Jun 2013 20:45:45 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:4976) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Urdrj-0000EY-36 for 14718@debbugs.gnu.org; Tue, 25 Jun 2013 20:45:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppA/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJBOICwaxH5AOkQoDklsDkhyBXoMT X-IPAS-Result: Av4EABK/CFFMCppA/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJBOICwaxH5AOkQoDklsDkhyBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="17169683" Received: from 76-10-154-64.dsl.teksavvy.com (HELO pastel.home) ([76.10.154.64]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Jun 2013 20:45:31 -0400 Received: by pastel.home (Postfix, from userid 20848) id C81A4678F1; Tue, 25 Jun 2013 20:45:36 -0400 (EDT) From: Stefan Monnier Message-ID: References: Date: Tue, 25 Jun 2013 20:45:36 -0400 In-Reply-To: (Sebastian Wiesner's message of "Tue, 25 Jun 2013 22:19:43 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > If a package is contained in two or more archives, > "package-read-all-archive-contents" hangs in an endless loop. For > instance, in "emacs -Q": Duh! Not sure how the nil got lost when I copied the loop from package-process-define-package. I installed the patch below which should fix it, Stefan === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-06-25 16:13:49 +0000 +++ lisp/ChangeLog 2013-06-26 00:43:32 +0000 @@ -1,3 +1,8 @@ +2013-06-26 Stefan Monnier + + * emacs-lisp/package.el (package--add-to-archive-contents): Add missing + nil terminate the loop (bug#14718). + 2013-06-25 Stefan Monnier * emacs-lisp/package.el: Use lexical-binding. Include obsolete === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-06-25 16:13:49 +0000 +++ lisp/emacs-lisp/package.el 2013-06-26 00:42:56 +0000 @@ -3,6 +3,7 @@ ;; Copyright (C) 2007-2013 Free Software Foundation, Inc. ;; Author: Tom Tromey +;; Daniel Hackney ;; Created: 10 Mar 2007 ;; Version: 1.0.1 ;; Keywords: tools @@ -924,7 +925,8 @@ (version-list-< version (package-desc-version (cadr existing-packages)))) (setq existing-packages (cdr existing-packages)) - (push pkg-desc (cdr existing-packages)))))))) + (push pkg-desc (cdr existing-packages)) + nil)))))) (defun package-download-transaction (packages) "Download and install all the packages in PACKAGES. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 01 14:20:33 2013 Received: (at control) by debbugs.gnu.org; 1 Jul 2013 18:20:33 +0000 Received: from localhost ([127.0.0.1]:50809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UtiiH-0005S2-Av for submit@debbugs.gnu.org; Mon, 01 Jul 2013 14:20:33 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:52553 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UtiiG-0005Rv-AG for control@debbugs.gnu.org; Mon, 01 Jul 2013 14:20:32 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1UtiiG-0002k1-3J for control@debbugs.gnu.org; Mon, 01 Jul 2013 14:20:32 -0400 Date: Mon, 01 Jul 2013 14:20:32 -0400 Message-Id: Subject: control message for bug 14718 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) close 14718