From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nljlistbox2@gmail.com (N. Jackson) Newsgroups: gmane.emacs.bugs Subject: bug#20808: 24.5; Emacs looping with 100% CPU at line 15287 (?) of xdisp.c Date: Tue, 16 Jun 2015 22:59:51 -0300 Message-ID: <87d20vhz6w.fsf@moondust.localdomain> References: <87mw03j57i.fsf@moondust.localdomain> <83ioaqpel9.fsf@gnu.org> <878ubmayn4.fsf@moondust.localdomain> <83616qoyyd.fsf@gnu.org> <87a8w1uge6.fsf@moondust.localdomain> <83vbenn1ad.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1434506485 9112 80.91.229.3 (17 Jun 2015 02:01:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Jun 2015 02:01:25 +0000 (UTC) Cc: 20808@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 17 04:01:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z52fB-0002Jv-Q8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Jun 2015 04:01:14 +0200 Original-Received: from localhost ([::1]:43813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z52fB-0000fn-7A for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Jun 2015 22:01:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z52f6-0000fh-Nb for bug-gnu-emacs@gnu.org; Tue, 16 Jun 2015 22:01:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z52f1-0004AE-OA for bug-gnu-emacs@gnu.org; Tue, 16 Jun 2015 22:01:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z52f1-00049v-Eh for bug-gnu-emacs@gnu.org; Tue, 16 Jun 2015 22:01:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z52f0-0004cZ-NB for bug-gnu-emacs@gnu.org; Tue, 16 Jun 2015 22:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: nljlistbox2@gmail.com (N. Jackson) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Jun 2015 02:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20808 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20808-submit@debbugs.gnu.org id=B20808.143450640717621 (code B ref 20808); Wed, 17 Jun 2015 02:01:02 +0000 Original-Received: (at 20808) by debbugs.gnu.org; 17 Jun 2015 02:00:07 +0000 Original-Received: from localhost ([127.0.0.1]:56536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z52e1-0004Zv-SE for submit@debbugs.gnu.org; Tue, 16 Jun 2015 22:00:05 -0400 Original-Received: from mail-ig0-f175.google.com ([209.85.213.175]:37990) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z52dz-0004ZK-RZ for 20808@debbugs.gnu.org; Tue, 16 Jun 2015 22:00:00 -0400 Original-Received: by igblz2 with SMTP id lz2so27165118igb.1 for <20808@debbugs.gnu.org>; Tue, 16 Jun 2015 18:59:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Th9A0It63t5o8v251NWyx6Vg007e5mpV2zF7Gm+DdG4=; b=ft4d2G0SgbiGRZ/ZBtXbwZwKq+90eDV9/XtuQN9AuE/PyBmFTJHOaxdmuyZpM3pdEi g1LIjkUd9bq6ow+O0luXmWUlSGQdU0pYV1GezBgZX1OufyGz7LdGoVeWYwv6j3Q9RS/8 E7KdvHplEbdAuxm9MVGVpZJhKFtqk5WqbvoRqL1vHtPvifOTuY/SfycI2E6eNJNpCVos 9c34KztUorHKoSVu343oGAuPmj3Zw6S4zABSgpPwKm1Izu5cb9Q1eP3jpbbHihM2tSMm Mop3dLWQ9LsxnDlGzTYQnLB0p/R1E/LT1qulQ1y9ngwfiuIjfO/aFJA4h7fYwkEqR0u3 8WBA== X-Received: by 10.42.131.202 with SMTP id a10mr6183228ict.49.1434506393767; Tue, 16 Jun 2015 18:59:53 -0700 (PDT) Original-Received: from moondust.localdomain.nodomain.none (blk-30-139-235.eastlink.ca. [96.30.139.235]) by mx.google.com with ESMTPSA id l128sm1717664iol.1.2015.06.16.18.59.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2015 18:59:52 -0700 (PDT) In-Reply-To: <83vbenn1ad.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 16 Jun 2015 18:03:22 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104006 Archived-At: At 12:03 -0300 on Tuesday 2015-06-16, Eli Zaretskii wrote: > Please try the patch below. If it solves the problem, I will install > it shortly. Please try both an optimized and a non-optimized build, if > you can afford that. > > diff --git a/src/xdisp.c b/src/xdisp.c > index 7c15330..1e2f1b26 100644 > --- a/src/xdisp.c > +++ b/src/xdisp.c > @@ -15094,7 +15094,8 @@ enum > RESTORE_IT (&it, &it, it1data); > move_it_by_lines (&it, 1); > SAVE_IT (it1, it, it1data); > - } while (line_bottom_y (&it1) - start_y < amount_to_scroll); > + } while (IT_CHARPOS (it) < ZV > + && line_bottom_y (&it1) - start_y < amount_to_scroll); > } > > /* If STARTP is unchanged, move it down another screen line. */ Short version: I am reasonably confident that the infloop does not occur with this patch. Longer version: I say "reasonably" because I still do not have an exact recipe to trigger the infloop. It seems to be some interaction with the layout of the web page, the height of the images and the height of the window. I was unsuccessful reproducing the problem with C-u 12 M-x split-window-below and then opening the web page in Eww, possibly because the height required to reproduce the problem is not exactly 11 (the way Gnus sets the window heights maybe gives a fractional size to the upper window). In any case, the infloop is not too hard to trigger by moving around the window and scrolling. With my own (unoptimised build), in four trials I was able to trigger the infloop in 5 minutes 16 seconds, 57 seconds, 48 seconds, and 58 seconds from the time I clicked the email link that opened the offending web page. (The time was less after I got more aggressive with the interface.) With the Fedora 21 build, in four trials I triggered the infloop in 2:17, 1:38, 0:49, and 0:43. With the patch, in my unoptimised build, configured with ./configure --prefix=/home/nlj/local/ --enable-checking='yes,glyphs' CFLAGS="-O0 -g3 -ggdb" , I was unable to trigger an infloop in over seven and a half minutes of aggressive interaction with the window displaying the offending web page. Also with the patch, in a build configured with the Fedora 21 build's settings: ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu CFLAGS="-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" LDFLAGS="-Wl,-z,relro" , I was unable to trigger an infloop in over ten minutes of aggressive interaction with the window displaying the offending web page.