unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17337: epg-wait-for-status hangs forever
@ 2014-04-25  1:33 Richard Stallman
  2014-05-13 17:23 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Richard Stallman @ 2014-04-25  1:33 UTC (permalink / raw)
  To: 17337

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Yesterday I updated from the trunk and rebuilt.
epa-mail-encrypt and rmail-epa-decrypt now do not terminate.
I got the backtrace below from typing C-g at the latter.

I verified that the call to epg-wait-for-status never returns.
It displays `Decrypting...done', but seems to keep waiting.

I went back to the old Emacs executable from March 19, made from the
trunk fetched on March 18, and aliased function-put to put.  It worked
ok: with the same compiled Lisp files, the hang does not happen.

======================================================================
  accept-process-output(#<process epg<12>> 1)
  epg-wait-for-status((epg-context . [OpenPGP "/usr/bin/X11/gpg" nil nil nil nil nil nil nil (epa-passphrase-callback-function) (epa-progress-callback-function . "Decrypting...") nil nil #<process epg<12>> "/tmp/epg-output127242zO" ((decryption-okay . t) (encrypted-to ("879A7C37B1B10ED6" 16 0))) decrypt nil]) ("BEGIN_DECRYPTION"))
  (if (eq (epg-context-protocol context) (quote CMS)) nil (epg-wait-for-status context (quote ("BEGIN_DECRYPTION"))))
  epg-start-decrypt((epg-context . [OpenPGP "/usr/bin/X11/gpg" nil nil nil nil nil nil nil (epa-passphrase-callback-function) (epa-progress-callback-function . "Decrypting...") nil nil #<process epg<12>> "/tmp/epg-output127242zO" ((decryption-okay . t) (encrypted-to ("879A7C37B1B10ED6" 16 0))) decrypt nil]) (epg-data . ["/tmp/epg-input12724ppI" nil]))
  (progn (write-region cipher nil input-file nil (quote quiet)) (epg-context-set-output-file context (epg--make-temp-file "epg-output")) (epg-start-decrypt context (epg-make-data-from-file input-file)) (epg-wait-for-completion context) (epg--check-error-for-decrypt context) (epg-read-output context))
  (unwind-protect (progn (write-region cipher nil input-file nil (quote quiet)) (epg-context-set-output-file context (epg--make-temp-file "epg-output")) (epg-start-decrypt context (epg-make-data-from-file input-file)) (epg-wait-for-completion context) (epg--check-error-for-decrypt context) (epg-read-output context)) (epg-delete-output-file context) (if (file-exists-p input-file) (delete-file input-file)) (epg-reset context))
  (let ((input-file (epg--make-temp-file "epg-input")) (coding-system-for-write (quote binary))) (unwind-protect (progn (write-region cipher nil input-file nil (quote quiet)) (epg-context-set-output-file context (epg--make-temp-file "epg-output")) (epg-start-decrypt context (epg-make-data-from-file input-file)) (epg-wait-for-completion context) (epg--check-error-for-decrypt context) (epg-read-output context)) (epg-delete-output-file context) (if (file-exists-p input-file) (delete-file input-file)) (epg-reset context)))
  epg-decrypt-string((epg-context . [OpenPGP "/usr/bin/X11/gpg" nil nil nil nil nil nil nil (epa-passphrase-callback-function) (epa-progress-callback-function . "Decrypting...") nil nil #<process epg<12>> "/tmp/epg-output127242zO" ((decryption-okay . t) (encrypted-to ("879A7C37B1B10ED6" 16 0))) decrypt nil]) "-----BEGIN PGP MESSAGE-----\nVersion: GnuPG v1.4.10 (GNU/Linux)\n\nhQEOA4eafDexsQ7WEAQAj/IzHzG41Xl04P9d3aykxHKE4S4AUmCyybhymnVmWdKf\n/22JX7iVIShGB5eyPpiHMkR+l0F6NqclnlDsFyJDfNW++NbL0LY3/Ot86o6KF5Gq\nUP4h1yi6f5VwQI84eMBCM9sst5ZQtyXJXo4+CwovysJEhVz4NbfL+FK3VAlGkzYD\n/37qCj1Ms0M2n8ogCnH4JejW5Qg39dRfWpNd9Noq5JxyH1rKboaTJF+P2GpA60xx\noQJgq1itOoLfgOf8AQhd5JEj4KmwliWbjmZxlN0GMh8xo8+fTIxeOOj0cVLrycW0\nt4Q1fyLG5iThcmWMaGv7wr+chhJCAn3I0quyQ4W5EC2X0ukBUgXKWJzKaRHxU5qG\nMw25QyAbgcYGqrmgKJy2IFkrKA
 zDZ4qc9OtQB1xJt/0x/LdlrvfNsDvjHaQPNl2u\nkmVE2tzKZVwlkogjlsuFZnn30WSBvlMNRxFSgHJiOHE7Bq98d7VAk111Vw/7LZn6\nPvNZVu61rUSw9KE79nt19lwv4nxFNLr4RDd69jxCaJANvONzFcSxzGcJ1sqjSL4J\nsTNMflaCT/f8QfNzO4PRvV6svPDm2aJOELoY9qQ7sRdGGcSngLTEbjVyLMCTtVgI\nAxtOKqfs4KNIKbBmfkEfxR3ePp5RWDQjKN0dn7JdCKIplMuca1vQurtOo/me9+Xg\nXnHW3lWfneuye03gK907I9G5mTqyf2qWSsQ6yBCEYNoFOLLtr/kOX9x2UB7hNpxs\n9tyEbngYavyQNIQZ7pucTAYwa/eUEzbfONyxPr7PM8fJkI4oY5hK20qJ5zqW8zH6\nhlMhFgO6FSrqViO/YjObD7pTQkj1iKesZB3tlaLx/AqbkKuU7dS0NpcAsj14jwxi\nkLnuv098ZYBZ6YCykz01rk7yCx2qYoV6azcO/Y8Qe2xpk3l+CLVyaiViTQc3JryE\nXtaTUldkJZHvMAQ0RuJa6C4Xk26EFxNPC0esGt6yCJqErkuhY/Gjo3yc+MfOKbB7\n6V/ZBQecgOYBAevzX07fkcfqCnUuUZnapGLSAdm6HQWXhiqVDuhBF6ssyrDv0j5J\nCk3lpoE5kZfHRjAAeIbBEzNH3rn6uCwREVc5ZGe3gcMEEsq94/RGm/EziDSgSdOR\nVhPGEmeRUVfic5pf+Z5NzoJe4aeAVpTl
 3zPjHUNFjFVu2Hr+ev7lFps=\n=ORAS\n-----END PGP MESSAGE-----")
  (setq plain (epg-decrypt-string context (buffer-substring start end)))
  (let ((context (epg-make-context epa-protocol)) plain) (epg-context-set-passphrase-callback context (function epa-passphrase-callback-function)) (epg-context-set-progress-callback context (cons (function epa-progress-callback-function) "Decrypting...")) (message "Step 2") (sit-for 1) (message "Decrypting...") (setq plain (epg-decrypt-string context (buffer-substring start end))) (message "Step 3") (sit-for 1) (message "Decrypting...done") (debug t) (setq plain (epa--decode-coding-string plain (or coding-system-for-read (get-text-property start (quote epa-coding-system-used)) (quote undecided)))) (message "Decoding done") (if make-buffer-function (save-current-buffer (set-buffer (funcall make-buffer-function)) (let ((inhibit-read-only t)) (insert plain))) (if (y-or-n-p "Replace the origin
 al text? ") (let ((inhibit-read-only t)) (delete-region start end) (goto-char start) (insert plain)) (let* ((old-dir default-directory) (buf (save-current-buffer (set-buffer ...) (prog1 ... ... ... ... ... ... ...))) (standard-output buf)) (prog1 (progn (set-buffer standard-output) (insert plain) (epa-info-mode)) (internal-temp-output-buffer-show buf))))) (if (epg-context-result-for context (quote verify)) (epa-display-info (epg-verify-result-to-string (epg-context-result-for context (quote verify))))))
  (save-excursion (let ((context (epg-make-context epa-protocol)) plain) (epg-context-set-passphrase-callback context (function epa-passphrase-callback-function)) (epg-context-set-progress-callback context (cons (function epa-progress-callback-function) "Decrypting...")) (message "Step 2") (sit-for 1) (message "Decrypting...") (setq plain (epg-decrypt-string context (buffer-substring start end))) (message "Step 3") (sit-for 1) (message "Decrypting...done") (debug t) (setq plain (epa--decode-coding-string plain (or coding-system-for-read (get-text-property start (quote epa-coding-system-used)) (quote undecided)))) (message "Decoding done") (if make-buffer-function (save-current-buffer (set-buffer (funcall make-buffer-function)) (let ((inhibit-read-only t)) (insert plain))) (if (y-or-n-p "Re
 place the original text? ") (let ((inhibit-read-only t)) (delete-region start end) (goto-char start) (insert plain)) (let* ((old-dir default-directory) (buf (save-current-buffer ... ...)) (standard-output buf)) (prog1 (progn (set-buffer standard-output) (insert plain) (epa-info-mode)) (internal-temp-output-buffer-show buf))))) (if (epg-context-result-for context (quote verify)) (epa-display-info (epg-verify-result-to-string (epg-context-result-for context (quote verify)))))))
  epa-decrypt-region(1 1323 (lambda nil (let ((inhibit-read-only t)) (delete-region armor-start armor-end) (goto-char armor-start) (current-buffer))))
  (let ((coding-system-for-read coding-system-for-read) armor-start armor-end after-end) (setq armor-start (match-beginning 0) armor-end (re-search-forward "^-----END PGP MESSAGE-----$" nil t)) (if armor-end nil (error "Encryption armor beginning has no matching end")) (goto-char armor-start) (require (quote epa)) (if coding-system-for-read nil (if (re-search-forward "^Charset: \\(.*\\)" armor-end t) (setq coding-system-for-read (epa--find-coding-system-for-mime-charset (intern (downcase (match-string 1))))))) (goto-char armor-end) (setq after-end (- (point-max) armor-end)) (epa-decrypt-region armor-start armor-end (function (lambda nil (let ((inhibit-read-only t)) (delete-region armor-start armor-end) (goto-char armor-start) (current-buffer))))) (setq decrypts (cons (list armor-start (- (
 point-max) after-end)) decrypts)))
  (while (re-search-forward "-----BEGIN PGP MESSAGE-----$" nil t) (let ((coding-system-for-read coding-system-for-read) armor-start armor-end after-end) (setq armor-start (match-beginning 0) armor-end (re-search-forward "^-----END PGP MESSAGE-----$" nil t)) (if armor-end nil (error "Encryption armor beginning has no matching end")) (goto-char armor-start) (require (quote epa)) (if coding-system-for-read nil (if (re-search-forward "^Charset: \\(.*\\)" armor-end t) (setq coding-system-for-read (epa--find-coding-system-for-mime-charset (intern (downcase ...)))))) (goto-char armor-end) (setq after-end (- (point-max) armor-end)) (epa-decrypt-region armor-start armor-end (function (lambda nil (let ((inhibit-read-only t)) (delete-region armor-start armor-end) (goto-char armor-start) (current-buff
 er))))) (setq decrypts (cons (list armor-start (- (point-max) after-end)) decrypts))))
  (let (decrypts) (goto-char (point-min)) (if (and (rmail-mime-message-p) (not (get-text-property (point-min) (quote rmail-mime-hidden)))) (progn (rmail-mime))) (goto-char (point-min)) (while (re-search-forward "-----BEGIN PGP MESSAGE-----$" nil t) (let ((coding-system-for-read coding-system-for-read) armor-start armor-end after-end) (setq armor-start (match-beginning 0) armor-end (re-search-forward "^-----END PGP MESSAGE-----$" nil t)) (if armor-end nil (error "Encryption armor beginning has no matching end")) (goto-char armor-start) (require (quote epa)) (if coding-system-for-read nil (if (re-search-forward "^Charset: \\(.*\\)" armor-end t) (setq coding-system-for-read (epa--find-coding-system-for-mime-charset (intern ...))))) (goto-char armor-end) (setq after-end (- (point-max) armor-en
 d)) (epa-decrypt-region armor-start armor-end (function (lambda nil (let (...) (delete-region armor-start armor-end) (goto-char armor-start) (current-buffer))))) (setq decrypts (cons (list armor-start (- (point-max) after-end)) decrypts)))) (if (and decrypts (rmail-buffers-swapped-p)) (progn (if (y-or-n-p "Replace the original message? ") (progn (setq decrypts (nreverse decrypts)) (let ((beg ...) (end ...) (from-buffer ...)) (save-current-buffer (set-buffer rmail-view-buffer) (narrow-to-region beg end) (goto-char ...) (let ... ...))))))))
  (save-excursion (let (decrypts) (goto-char (point-min)) (if (and (rmail-mime-message-p) (not (get-text-property (point-min) (quote rmail-mime-hidden)))) (progn (rmail-mime))) (goto-char (point-min)) (while (re-search-forward "-----BEGIN PGP MESSAGE-----$" nil t) (let ((coding-system-for-read coding-system-for-read) armor-start armor-end after-end) (setq armor-start (match-beginning 0) armor-end (re-search-forward "^-----END PGP MESSAGE-----$" nil t)) (if armor-end nil (error "Encryption armor beginning has no matching end")) (goto-char armor-start) (require (quote epa)) (if coding-system-for-read nil (if (re-search-forward "^Charset: \\(.*\\)" armor-end t) (setq coding-system-for-read (epa--find-coding-system-for-mime-charset ...)))) (goto-char armor-end) (setq after-end (- (point-max) a
 rmor-end)) (epa-decrypt-region armor-start armor-end (function (lambda nil (let ... ... ... ...)))) (setq decrypts (cons (list armor-start (- ... after-end)) decrypts)))) (if (and decrypts (rmail-buffers-swapped-p)) (progn (if (y-or-n-p "Replace the original message? ") (progn (setq decrypts (nreverse decrypts)) (let (... ... ...) (save-current-buffer ... ... ... ...))))))))
  rmail-epa-decrypt()


-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#17337: epg-wait-for-status hangs forever
  2014-04-25  1:33 bug#17337: epg-wait-for-status hangs forever Richard Stallman
@ 2014-05-13 17:23 ` Eli Zaretskii
  2014-05-14 11:51   ` Richard Stallman
  2014-05-18 11:26 ` bug#17337: EPG bug seems to have gone away Richard Stallman
  2014-05-19  9:35 ` bug#17337: epa problem has returned Richard Stallman
  2 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2014-05-13 17:23 UTC (permalink / raw)
  To: rms; +Cc: 17337

> Date: Thu, 24 Apr 2014 21:33:25 -0400
> From: Richard Stallman <rms@gnu.org>
> 
> Yesterday I updated from the trunk and rebuilt.
> epa-mail-encrypt and rmail-epa-decrypt now do not terminate.
> I got the backtrace below from typing C-g at the latter.
> 
> I verified that the call to epg-wait-for-status never returns.
> It displays `Decrypting...done', but seems to keep waiting.
> 
> I went back to the old Emacs executable from March 19, made from the
> trunk fetched on March 18, and aliased function-put to put.  It worked
> ok: with the same compiled Lisp files, the hang does not happen.

AFAIU, you are saying that Lisp files from Apr 23 trunk work fine with
the Emacs binary built from C sources fetched on Mar 18, is that
right?

If so, I don't think I see changes to C sources during that period
which could explain such a bug.  May I suggest to take a look at the
changes done during this period, and perhaps experiment with reverting
changes that look suspicious?  Below are some bzr commands which will
allow you to review the changes at several levels of granularity:

This command will show a list of all the files that were changed
between these two dates:

  bzr st -r date:2014-03-18..date:2014-04-24

This command will show the changes made in a single file between these
2 dates (src/process.c as an example):

  bzr diff -r date:2014-03-18..date:2014-04-24 src/process.c

This command will show all the changes made in the C sources between
these 2 dates:

  bzr diff -r date:2014-03-18..date:2014-04-24 src

If you try changing some file, and later want to undo those changes,
you can do that by saying "bzr revert FILE".  Just "bzr revert" will
undo changes in all the files.

Or maybe the problem is triggered by one of the pre-loaded Lisp files?
In that case, another thing to try is use C sources from Mar 18, but
pre-loaded Lisp files from Apr 24.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#17337: epg-wait-for-status hangs forever
  2014-05-13 17:23 ` Eli Zaretskii
@ 2014-05-14 11:51   ` Richard Stallman
  2014-05-14 15:34     ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2014-05-14 11:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 17337

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    AFAIU, you are saying that Lisp files from Apr 23 trunk work fine with
    the Emacs binary built from C sources fetched on Mar 18, is that
    right?

Yes.

    Or maybe the problem is triggered by one of the pre-loaded Lisp files?
    In that case, another thing to try is use C sources from Mar 18, but
    pre-loaded Lisp files from Apr 24.

It is not feasible for me to do things like that.
It takes hours to recompile on this machine.

      Below are some bzr commands which will
    allow you to review the changes at several levels of granularity:

This is probably a lot of work.  I can't spend hours on this.
I have work leading the free software movement, speaking, etc.

The Emacs developers are the ones who need to fix this.

Have you been able to reproduce the bug?

Does anyone else here M-x rmail-epa-decrypt?
Or epa at all?

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#17337: epg-wait-for-status hangs forever
  2014-05-14 11:51   ` Richard Stallman
@ 2014-05-14 15:34     ` Eli Zaretskii
  2014-05-14 17:01       ` Stefan Monnier
                         ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Eli Zaretskii @ 2014-05-14 15:34 UTC (permalink / raw)
  To: rms; +Cc: 17337

> Date: Wed, 14 May 2014 07:51:27 -0400
> From: Richard Stallman <rms@gnu.org>
> CC: bug-gnu-emacs@gnu.org
> 
>     Or maybe the problem is triggered by one of the pre-loaded Lisp files?
>     In that case, another thing to try is use C sources from Mar 18, but
>     pre-loaded Lisp files from Apr 24.
> 
> It is not feasible for me to do things like that.
> It takes hours to recompile on this machine.

I didn't mean to recompile.  I meant to copy temacs from the Mar 18
build (which I believe you have built already, since you say you tried
it) into the Apr 24 tree, and then do "temacs -l loadup dump" there to
dump Emacs.  This should be easy and fast enough (assuming you do have
the temacs binary from Mar 18).  You could then use the resulting
dumped Emacs with Lisp files from Apr 24, and see if the problem
persists.  This will allow us to conclude whether changes done in the
pre-loaded Lisp files between Mar 18 and Apr 24 could have any
relevance to the issue at hand.

> Have you been able to reproduce the bug?

I can't: I don't have EasyPG installed and set up.

> Does anyone else here M-x rmail-epa-decrypt?
> Or epa at all?

If no one responds or reports they reproduced the problem, perhaps you
could find a few moments to shed more light on how it hangs.  AFAIU,
you saw it stuck in this loop (in epg-wait-for-status):

    (while (and (eq (process-status (epg-context-process context)) 'run)
		epg-pending-status-list)
      (accept-process-output (epg-context-process context) 1))

This means that either (1) epg does not exit when it should, or
(2) epg-pending-status-list doesn't become nil, which AFAIU means
that no output is ever received from epg, or (3) accept-process-output
gets stuck, even though it is called with a 1-sec time-out.

Can you tell what is the correct behavior (the one you see in the
older binary) that causes this loop to terminate, and which one of the
above 3 alternatives causes epg-wait-for-status to never return?

Thanks.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#17337: epg-wait-for-status hangs forever
  2014-05-14 15:34     ` Eli Zaretskii
@ 2014-05-14 17:01       ` Stefan Monnier
  2014-05-15 15:03         ` Richard Stallman
  2014-05-15 15:03       ` Richard Stallman
                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2014-05-14 17:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 17337, rms

>     (while (and (eq (process-status (epg-context-process context)) 'run)
> 		epg-pending-status-list)
>       (accept-process-output (epg-context-process context) 1))

> This means that either (1) epg does not exit when it should, or
> (2) epg-pending-status-list doesn't become nil, which AFAIU means
> that no output is ever received from epg, or (3) accept-process-output
> gets stuck, even though it is called with a 1-sec time-out.

FWIW, I recently saw a hang when opening a foo.gpg file (it hung before
asking me for the passphrase).  I was in a hurry and had no time to dig
much further into the Elisp code to track down the problem, so I swiftly
switched to an xterm and did "gpg --use-agent foo.gpg" to decrypt the
file, and that hung as well.  Apparently it was some kind of
communication with the agent.


        Stefan





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#17337: epg-wait-for-status hangs forever
  2014-05-14 15:34     ` Eli Zaretskii
  2014-05-14 17:01       ` Stefan Monnier
@ 2014-05-15 15:03       ` Richard Stallman
  2014-05-15 15:03       ` Richard Stallman
  2014-05-19  9:37       ` Richard Stallman
  3 siblings, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2014-05-15 15:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 17337

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    I didn't mean to recompile.  I meant to copy temacs from the Mar 18
    build (which I believe you have built already, since you say you tried
    it) into the Apr 24 tree, and then do "temacs -l loadup dump" there to
    dump Emacs.

I don't have the old temacs any more.  All I have from the March sources
is the dumped emacs.  It has the preloaded files from March
but loads compiled Lisp files that exist now, and those are from the
later sources.

I could try loading some current versions of the preloaded Lisp files
into it.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#17337: epg-wait-for-status hangs forever
  2014-05-14 15:34     ` Eli Zaretskii
  2014-05-14 17:01       ` Stefan Monnier
  2014-05-15 15:03       ` Richard Stallman
@ 2014-05-15 15:03       ` Richard Stallman
  2014-05-19  9:37       ` Richard Stallman
  3 siblings, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2014-05-15 15:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 17337

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    If no one responds or reports they reproduced the problem, perhaps you
    could find a few moments to shed more light on how it hangs.  AFAIU,
    you saw it stuck in this loop (in epg-wait-for-status):

	(while (and (eq (process-status (epg-context-process context)) 'run)
		    epg-pending-status-list)
	  (accept-process-output (epg-context-process context) 1))

    This means that either (1) epg does not exit when it should, or
    (2) epg-pending-status-list doesn't become nil, which AFAIU means
    that no output is ever received from epg, or (3) accept-process-output
    gets stuck, even though it is called with a 1-sec time-out.

I don't know a way to get it into the debugger at that time.  Now that
you have shown me where it is looping, I can try editing that code.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#17337: epg-wait-for-status hangs forever
  2014-05-14 17:01       ` Stefan Monnier
@ 2014-05-15 15:03         ` Richard Stallman
  0 siblings, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2014-05-15 15:03 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 17337

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

I am using gpg-agent, but the communication between gpg and gpg-agent
does not hang.  I have not changed either of them, and they both
still work with the older Emacs version.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#17337: EPG bug seems to have gone away
  2014-04-25  1:33 bug#17337: epg-wait-for-status hangs forever Richard Stallman
  2014-05-13 17:23 ` Eli Zaretskii
@ 2014-05-18 11:26 ` Richard Stallman
  2014-05-19  9:35 ` bug#17337: epa problem has returned Richard Stallman
  2 siblings, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2014-05-18 11:26 UTC (permalink / raw)
  To: 17337

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

I tried to load newer Lisp files into the older Emacs to see if that
would make the epa bug happen.  It did not happen.  So I tried
in the newer Emacs, and it did not happen.  So I updated the sources
and rebuilt, and it did not happen.

I guess that's good.  Maybe the problem won't come back.

Anyway, now I can use the latest version so I will see
if the GC bug is gone.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#17337: epa problem has returned
  2014-04-25  1:33 bug#17337: epg-wait-for-status hangs forever Richard Stallman
  2014-05-13 17:23 ` Eli Zaretskii
  2014-05-18 11:26 ` bug#17337: EPG bug seems to have gone away Richard Stallman
@ 2014-05-19  9:35 ` Richard Stallman
  2 siblings, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2014-05-19  9:35 UTC (permalink / raw)
  To: 17337

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

The epa problem is not gone.  It was never gone.

I tested for it with a few messages, and they worked -- but they
were all short.  Now it appears that sufficiently short messages work
but longer ones cause the problem.

I tried the idea of loading the latest versions
of the preloaded Lisp files into the old dumped Emacs.
I loaded all except loaddefs.el, macroexp.el, leim-list.el
and the language/* files.

The problem does NOT occur when I do that.

So it appears the problem is in the C code.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#17337: epg-wait-for-status hangs forever
  2014-05-14 15:34     ` Eli Zaretskii
                         ` (2 preceding siblings ...)
  2014-05-15 15:03       ` Richard Stallman
@ 2014-05-19  9:37       ` Richard Stallman
  3 siblings, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2014-05-19  9:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 17337

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

	(while (and (eq (process-status (epg-context-process context)) 'run)
		    epg-pending-status-list)
	  (accept-process-output (epg-context-process context) 1))

    This means that either (1) epg does not exit when it should, or
    (2) epg-pending-status-list doesn't become nil, which AFAIU means
    that no output is ever received from epg, or (3) accept-process-output
    gets stuck, even though it is called with a 1-sec time-out.

I think accept-process-output fails to return.

I put a call to `message' in that loop, and it did output just 3
times, for previous operations I think.  The call did not run during
the time it was hanging.


-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.






^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-05-19  9:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-25  1:33 bug#17337: epg-wait-for-status hangs forever Richard Stallman
2014-05-13 17:23 ` Eli Zaretskii
2014-05-14 11:51   ` Richard Stallman
2014-05-14 15:34     ` Eli Zaretskii
2014-05-14 17:01       ` Stefan Monnier
2014-05-15 15:03         ` Richard Stallman
2014-05-15 15:03       ` Richard Stallman
2014-05-15 15:03       ` Richard Stallman
2014-05-19  9:37       ` Richard Stallman
2014-05-18 11:26 ` bug#17337: EPG bug seems to have gone away Richard Stallman
2014-05-19  9:35 ` bug#17337: epa problem has returned Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).