From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: don@donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#465: marked as done (pgg-gpg.el - pgg-gpg-process-region timing problem) Date: Sat, 2 Aug 2008 12:15:05 -0700 Message-ID: References: <873aln2q1d.fsf@stupidchicken.com> <2cd46e7f0806221037h6d16839bp567eb5b901313375@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1217704505-31730-0" X-Trace: ger.gmane.org 1217705359 2133 80.91.229.12 (2 Aug 2008 19:29:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Aug 2008 19:29:19 +0000 (UTC) To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 02 21:30:09 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KPMna-0004Dt-0V for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Aug 2008 21:29:54 +0200 Original-Received: from localhost ([127.0.0.1]:51794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KPMmf-00088p-1n for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Aug 2008 15:28:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KPMlJ-0006bu-PQ for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2008 15:27:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KPMlF-0006ZU-Lh for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2008 15:27:30 -0400 Original-Received: from [199.232.76.173] (port=34430 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KPMlD-0006YR-Ud for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2008 15:27:28 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:59578) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KPMlC-0003uC-DN for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2008 15:27:27 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m72JRLT9003316; Sat, 2 Aug 2008 12:27:23 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m72JF5Uf031787; Sat, 2 Aug 2008 12:15:05 -0700 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com X-Emacs-PR-Message: closed 465 X-Emacs-PR-Package: emacs X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:18973 Archived-At: This is a multi-part message in MIME format... ------------=_1217704505-31730-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Sat, 02 Aug 2008 15:08:30 -0400 with message-id <873aln2q1d.fsf@stupidchicken.com> and subject line Re: pgg-gpg.el - pgg-gpg-process-region timing problem has caused the Emacs bug report #465, regarding pgg-gpg.el - pgg-gpg-process-region timing problem to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) --=20 465: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D465 Emacs Bug Tracking System Contact don@donarmstrong.com with problems ------------=_1217704505-31730-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.9 required=4.0 tests=BAYES_00,FOURLA, MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 22 Jun 2008 17:37:26 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5MHbHNR025248 for ; Sun, 22 Jun 2008 10:37:18 -0700 Received: from mx10.gnu.org ([199.232.76.166]:45110) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KATV2-0004Pr-PB for emacs-pretest-bug@gnu.org; Sun, 22 Jun 2008 13:37:12 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KATV4-0006Od-BR for emacs-pretest-bug@gnu.org; Sun, 22 Jun 2008 13:37:16 -0400 Received: from py-out-1112.google.com ([64.233.166.179]:26199) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KATV4-0006Nr-0S for emacs-pretest-bug@gnu.org; Sun, 22 Jun 2008 13:37:14 -0400 Received: by py-out-1112.google.com with SMTP id p76so784159pyb.1 for ; Sun, 22 Jun 2008 10:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=ajiJriZKShHP8Lw8W4ZtgtxYUpANW1oMNrWt/RJS9QM=; b=w4rTvDeRrT7V+ZOjy+4uQFrx9SgwYnzXlVCunOTH0Nb/LRKFrcyKF8PZVnGRSYGDGd RHapCpYdkGJSOSUVR8zNPjwLebhHGkyGeFfWx8h2OoydxPtsAKWhnAnSiUXDp6H3XkBD z1J5C392zAL2X47YxUdrCtjPQUXAHhJtNypGY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=WyheP+zr83aTce30yJ4psH11iGtikwY0/yPlA+PkHupg3PZZTsiar1CnaNMUnglkVR xMUiHxnUhmfMqjaHiveXqUFKDUZzCnDZwGqzdDiwL0hbEVQWRAAGRx4tNFZVg8CwEzUa qFrZ/7HT7dwPLWKomBMFrs8mU208bLbxZ5urE= Received: by 10.141.164.13 with SMTP id r13mr11241814rvo.53.1214156231739; Sun, 22 Jun 2008 10:37:11 -0700 (PDT) Received: by 10.114.201.14 with HTTP; Sun, 22 Jun 2008 10:37:11 -0700 (PDT) Message-ID: <2cd46e7f0806221037h6d16839bp567eb5b901313375@mail.gmail.com> Date: Sun, 22 Jun 2008 13:37:11 -0400 From: "ken manheimer" To: emacs-devel , emacs-pretest-bug@gnu.org Subject: pgg-gpg.el - pgg-gpg-process-region timing problem MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_13397_3728181.1214156231734" X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) ------=_Part_13397_3728181.1214156231734 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline allout encryption, which depends on pgg.el &c, has been failing due to a weird timing problem i've narrowed down to the pgg-gpg-process-region function. this is in emacs 23.0.60 built from a CVS HEAD checkout of an hour or so ago, and some earlier 23.0.60 versions. i've reproduced the problem using emacs -q and regularly launched emacs, etc. the problem is that pgg-gpg-process-region often returns a nil status despite successful decryption, unless a delay (eg, (sleep-for .3) is inserted between process start and later interaction with the process. with the delay, the status is something like 207 or 208, while without it the status is nil - yet, on examination the content is sucessfully decrypted. the size of the delay needs to be increased when the machine is heavily loaded, and can be reduced (on my thinkpad t43 2 GHz laptop, 3Gb ram, running kubuntu 8.0.4 +) to no lower than (sleep-for .2). rarely, the proper status is returned without the delay, depending on the machine load and other things i can't identify. considering the real-time sensitivity of the problem, your mileage will almost certainly vary! i originally thought the problem might be in gpg, but now figure it resides either in the emacs process mechanism, pgg's use of that, or somewhere in the combination of emacs and pgg. i've created a simple .el script, pggprob.el, with minimal code and data to produce the problem, and a patch, pggprob-patch.txt, with a single-line modification to pgg-gpg-process-region to work around the problem. both are attached. since the workaround is merely a timing delay, it's clearly not a fix! i'm hoping this is enough to enable others to reproduce the problem, and investigate... -- ken http://myriadicity.net If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /home/klm/src/emacs-HEAD/etc/DEBUG for instructions. In GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2008-06-22 on twist Windowing system distributor `The X.Org Foundation', version 11.0.10400090 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x C-f l i b / e m a a l l s c r p g g p M-x e v a l - c u r M-. C-g M-> C-x C-e M-x e m a c s r e p o r t - e m Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Source file `/home/klm/src/emacs-HEAD/lisp/pgg-gpg.el' newer than byte-compiled file Quit Mark set nil ------=_Part_13397_3728181.1214156231734 Content-Type: application/octet-stream; name=pggprob.el Content-Transfer-Encoding: base64 X-Attachment-Id: f_fhrwgxd60 Content-Disposition: attachment; filename=pggprob.el OzsgZGVtb25zdHJhdGUgdGltaW5nIHByb2JsZW0gaW4gcGdnLWdwZy1wcm9jZXNzLXJlZ2lvbgoK KHNldHEgcGFzc3BocmFzZSAiYSIKICAgICAgdmVyaWZpZXIgIi0tLS0tQkVHSU4gUEdQIE1FU1NB R0UtLS0tLQpWZXJzaW9uOiBHbnVQRyB2MS40LjYgKEdOVS9MaW51eCkKCmpBMEVBd01DbzcyZk5H QjFyTnhneVN2K3J4ZGtQdjQ2blZ4UTVmZzR5VDc4bGRnVmNEc2VEN01yZTRGaGppZm4KVlRBMS9Q ZG1ldFZmRmI5Kwo9TVhGNgotLS0tLUVORCBQR1AgTUVTU0FHRS0tLS0tIgogICAgICBjb3VudCAw KQoKKGRlZnVuIGRlY3J5cHQgKHBhc3NwaHJhc2UgdGV4dCkKICAod2l0aC1jdXJyZW50LWJ1ZmZl ciAoZ2V0LWJ1ZmZlci1jcmVhdGUgIipwZ2ctdGVzdCoiKQogICAgKGVyYXNlLWJ1ZmZlcikKICAg IChpbnNlcnQgdGV4dCkKICAgIChwZ2ctZGVjcnlwdCBuaWwgbmlsIHBhc3NwaHJhc2UpKSkKCjs7 IHRoZSBmb2xsb3dpbmcgeWllbGRzIG5pbCB3L291dCB0aGUgcGF0Y2hlZCBkZWxheSwgMjA4IHdp dGggaXQuCjs7IGV4YW1pbmF0aW9uIG9mIHRoZSBhY3R1YWwgcmVzdWx0cyBidWZmZXIgc2hvd3Mg dGhhdCB0aGUgdmVyaWZpZXIgaXMKOzsgc3VjY2Vzc2Z1bGx5IGRlY3J5cHRlZCBpbiBib3RoIGNh c2VzLCBob3dldmVyLgooZGVjcnlwdCBwYXNzcGhyYXNlIHZlcmlmaWVyKQo= ------=_Part_13397_3728181.1214156231734 Content-Type: text/plain; name=pgg-patch.txt Content-Transfer-Encoding: base64 X-Attachment-Id: f_fhrwusef2 Content-Disposition: attachment; filename=pgg-patch.txt LS0tIHBnZy1ncGcuZWwufjEuMjcufgkyMDA4LTA1LTA2IDAzOjU3OjQ2LjAwMDAwMDAwMCAtMDQw MAorKysgcGdnLWdwZy5lbAkyMDA4LTA2LTIyIDEzOjI0OjE0LjAwMDAwMDAwMCAtMDQwMApAQCAt ODYsNiArODYsNyBAQAogCSAgICAoc2V0cSBwcm9jZXNzCiAJCSAgKGFwcGx5ICMnc3RhcnQtcHJv Y2VzcyAiKkdudVBHKiIgZXJyb3JzLWJ1ZmZlcgogCQkJIHByb2dyYW0gYXJncykpKQorICAgICAg ICAgIChzbGVlcC1mb3IgLjMpICAgICAgICAgICAgICAgIDsga2xtOiB0aW1pbmcgZGVsYXkKIAkg IChzZXQtcHJvY2Vzcy1zZW50aW5lbCBwcm9jZXNzICMnaWdub3JlKQogCSAgKHdoZW4gcGFzc3Bo cmFzZQogCSAgICAoc2V0cSBwYXNzcGhyYXNlLXdpdGgtbmV3bGluZSAoY29uY2F0IHBhc3NwaHJh c2UgIlxuIikpCg== ------=_Part_13397_3728181.1214156231734-- ------------=_1217704505-31730-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.1 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 465-done) by emacsbugs.donarmstrong.com; 2 Aug 2008 19:08:23 +0000 Received: from cyd (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m72J8K08030048 for <465-done@emacsbugs.donarmstrong.com>; Sat, 2 Aug 2008 12:08:21 -0700 Received: by cyd (Postfix, from userid 1000) id C100F57E337; Sat, 2 Aug 2008 15:08:30 -0400 (EDT) From: Chong Yidong To: 465-done@emacsbugs.donarmstrong.com Subject: Re: pgg-gpg.el - pgg-gpg-process-region timing problem Date: Sat, 02 Aug 2008 15:08:30 -0400 Message-ID: <873aln2q1d.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I've checked in a fix for this (verified by Ken Manheimer via private email). This fix is in pgg-gpg.el, which I think was calling accept-process-output in a slightly incorrect way. ------------=_1217704505-31730-0--