Subject: bug#49682: 27.2.50; accept-process-output within accept-process-output hangs emacs

From: Robert Pluim <[email-masked]>
Date: Fri, 06 Aug 2021 18:55:19 +0200

>>>>> On Wed, 28 Jul 2021 19:12:58 +0300, Eli Zaretskii <[email-masked]> said:

    >> Disposition-Notification-To: [email-masked]
    >> From: Rajeev N <[email-masked]>
    >> Cc: [email-masked],  [email-masked],  [email-masked]
    >> Date: Tue, 27 Jul 2021 17:40:27 -0400
    >> 
    >> It seems to be a bug-  a similar bug was fixed recently.

    Eli> It might be a bug, but we need a more detailed understanding of how
    Eli> this happens.

    Eli> I also very much wonder why many people are unable to reproduce this
    Eli> problem on very similar if not identical systems.  Could this be a
    Eli> kernel or a library bug specific to your system?

I can reproduce it from 'emacs -Q -nw' on my Debian bullseye system,
but not from 'emacs -Q'

SIGUSR2 backtrace:

Debugger entered--Lisp error: (quit)
  accept-process-output(#<process testing> 0.05)
  network-stream-get-response(#<process testing> 250 "^[0-9]+ .*\15\n")
  network-stream-command(#<process testing> "EHLO www.gnu.org\15\n" "^[0-9]+ .*\15\n")
  network-stream-open-starttls("testing" #<buffer  *debug> "smtp.gmail.com" 587 (:type starttls :return-list t :warn-unless-encrypted t :capability-command "EHLO www.gnu.org\15\n" :end-of-command "^[0-9]+ .*\15\n" :success "^2.*\n" :always-query-capabilities t :starttls-function (lambda (capabilities) (and (string-match "[ -]STARTTLS" capabilities) "STARTTLS\15\n")) :client-certificate t :use-starttls-if-possible t))
  open-network-stream("testing" #<buffer  *debug> "smtp.gmail.com" 587 :type starttls :return-list t :warn-unless-encrypted t :capability-command "EHLO www.gnu.org\15\n" :end-of-command "^[0-9]+ .*\15\n" :success "^2.*\n" :always-query-capabilities t :starttls-function (lambda (capabilities) (and (string-match "[ -]STARTTLS" capabilities) "STARTTLS\15\n")) :client-certificate t :use-starttls-if-possible t)
  apply(open-network-stream ("testing" #<buffer  *debug> "smtp.gmail.com" 587 :type starttls :return-list t :warn-unless-encrypted t :capability-command "EHLO www.gnu.org\15\n" :end-of-command "^[0-9]+ .*\15\n" :success "^2.*\n" :always-query-capabilities t :starttls-function (lambda (capabilities) (and (string-match "[ -]STARTTLS" capabilities) "STARTTLS\15\n")) :client-certificate t :use-starttls-if-possible t))
  timer-event-handler([t 24845 26710 703698 nil open-network-stream ("testing" #<buffer  *debug> "smtp.gmail.com" 587 :type starttls :return-list t :warn-unless-encrypted t :capability-command "EHLO www.gnu.org\15\n" :end-of-command "^[0-9]+ .*\15\n" :success "^2.*\n" :always-query-capabilities t :starttls-function (lambda (capabilities) (and (string-match "[ -]STARTTLS" capabilities) "STARTTLS\15\n")) :client-certificate t :use-starttls-if-possible t) nil 536000])

Iʼd debug further, but I have other Emacs plans this weekend

Robert
--