all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#17014: 24.3; Emacsclient freezes if mutt attaches a signature
@ 2014-03-14 17:20 Walter Garcia-Fontes
  2014-03-16  1:17 ` Glenn Morris
  2021-07-14 15:29 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Walter Garcia-Fontes @ 2014-03-14 17:20 UTC (permalink / raw)
  To: 17014

[-- Attachment #1: Type: text/plain, Size: 7311 bytes --]

I use emacs in mutt. For some of my mails I have a hook in mutt that
attaches a signature to the mail:

send-hook bulmages-main@lists.berlios.de "set signature=/home/wgarcia/.signature.bulma"

I call emacs from mutt with the following command:

set editor="emacsclient -a \"\" -t"

If I have an emacs daemon running and I have an attached emacsclient
running, the emacsclient opened by mutt freezes, and it also makes 
all other emacsclient opened freeze too. If I open emacsclient but mutt
does not try to attach a signature it does not freeze. 

I attach a stacktrace that I produced the following way:

1) I opened the daemon and attached an emacsclient.
2) I opened mutt, and produced the freeze
3) I opened gdb and "add-inferior" emacsclient
4) I runned emacsclient in gdb and produced the trace.

In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7)
 of 2014-03-07 on lamiak, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11500000
System Description:	Ubuntu Trusty Tahr (development branch)

Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars'
 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_COLLATE: en_US.UTF-8
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  auto-fill-function: do-auto-fill
  transient-mark-mode: t

Recent input:
<down-mouse-1> <mouse-1> <escape> x r e p o r t - e 
m <tab> <return>

Recent messages:
Warning: adict-mode defined alguns twice
Warning: adict-mode defined com twice
Warning: adict-mode defined sempre twice
Loading /home/wgarcia/.mutt.post.el (source)...
`flet' is an obsolete macro (as of 24.3); use either `cl-flet' or `cl-letf'.
Loading /home/wgarcia/.mutt.post.el (source)...done
Loading `/home/wgarcia/.mutt.post': old-style backquotes detected!
Loading iso-transl...done
Starting Emacs daemon.
When done with a buffer, type C-x #

Load-path shadows:
/usr/share/emacs/24.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs24/site-lisp/flim/hex-util hides /usr/share/emacs/24.3/lisp/hex-util
/usr/share/emacs24/site-lisp/flim/md4 hides /usr/share/emacs/24.3/lisp/md4
/usr/share/emacs24/site-lisp/flim/sasl hides /usr/share/emacs/24.3/lisp/net/sasl
/usr/share/emacs24/site-lisp/flim/hmac-md5 hides /usr/share/emacs/24.3/lisp/net/hmac-md5
/usr/share/emacs24/site-lisp/flim/hmac-def hides /usr/share/emacs/24.3/lisp/net/hmac-def
/usr/share/emacs24/site-lisp/flim/ntlm hides /usr/share/emacs/24.3/lisp/net/ntlm
/usr/share/emacs24/site-lisp/flim/sasl-digest hides /usr/share/emacs/24.3/lisp/net/sasl-digest
/usr/share/emacs24/site-lisp/flim/sasl-cram hides /usr/share/emacs/24.3/lisp/net/sasl-cram
/usr/share/emacs24/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/24.3/lisp/net/sasl-ntlm
/usr/share/emacs24/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/24.3/lisp/language/thai-word
/usr/share/emacs24/site-lisp/auctex/prv-emacs hides /usr/share/emacs/site-lisp/auctex/prv-emacs
/usr/share/emacs24/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex
/usr/share/emacs24/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex
/usr/share/emacs24/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info
/usr/share/emacs24/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf
/usr/share/emacs24/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl
/usr/share/emacs24/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt
/usr/share/emacs24/site-lisp/auctex/preview hides /usr/share/emacs/site-lisp/auctex/preview
/usr/share/emacs24/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite
/usr/share/emacs24/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex
/usr/share/emacs24/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font
/usr/share/emacs24/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x
/usr/share/emacs24/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context
/usr/share/emacs24/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style
/usr/share/emacs24/site-lisp/auctex/plain-tex hides /usr/share/emacs/site-lisp/auctex/plain-tex
/usr/share/emacs24/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold
/usr/share/emacs24/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp
/usr/share/emacs24/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar
/usr/share/emacs24/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik
/usr/share/emacs24/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en
/usr/share/emacs24/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils server iso-transl jka-compr time-date paren post
cl-macs gv easymenu derived cl advice help-fns cl-lib advice-preload
auto-dictionary flyspell ispell devhelp preview-latex tex-site
auto-loads tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win
x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

--
Walter Garcia-Fontes

[-- Attachment #2: gdb-emacs.txt --]
[-- Type: text/plain, Size: 5223 bytes --]

GNU gdb (Ubuntu 7.7-0ubuntu3) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from emacs...Reading symbols from /usr/lib/debug/.build-id/03/327e010f548b8c61532289d810e812ceae5172.debug...done.
done.
(gdb) info inferiors
  Num  Description       Executable        
* 1    <null>            /usr/bin/emacs    
(gdb) add-inv\b^[[Kferior -excec em\b^[[K\b^[[K\b^[[K\b^[[K\b^[[K\b^[[Kec emacsclient
Added inferior 2
Reading symbols from emacsclient...(no debugging symbols found)...done.
(gdb) handle SIG33 pass nostop noprint
Signal        Stop	Print	Pass to program	Description
SIG33         No	No	Yes		Real-time event 33
(gdb) set pagination 0
(gdb) inferior \b^[[K \b^[[K\b^[[K\b^[[K\b^[[K\b^[[K\b^[[K\b^[[K\b^[[K\b^[[K\a\a\a\a\a\a\ainfo inferiors
  Num  Description       Executable        
  2    <null>            /usr/bin/emacsclient 
* 1    <null>            /usr/bin/emacs    
(gdb) infeio\b^[[K\b^[[Krior 2
[Switching to inferior 2 [<null>] (/usr/bin/emacsclient)]
(gdb) run try.txt
Starting program: /usr/bin/emacsclient try.txt
Waiting for Emacs...
Program received signal SIGINT, Interrupt.
0x00007ffff7b1003d in __libc_recv (fd=3, buf=0x7fffffffbaf0, n=8192, flags=-1) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:29
29	../sysdeps/unix/sysv/linux/x86_64/recv.c: No such file or directory.
(gdb) backtrace full
#0  0x00007ffff7b1003d in __libc_recv (fd=3, buf=0x7fffffffbaf0, n=8192, flags=-1) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:29
        resultvar = 18446744073709551104
        oldtype = -17663
#1  0x0000000000401caa in ?? ()
No symbol table info available.
#2  0x00007ffff7a35ec5 in __libc_start_main (main=0x401690, argc=2, argv=0x7fffffffdc18, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdc08) at libc-start.c:285
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, 1256261073157481417, 4203315, 140737488346128, 0, 0, -1256261072236321847, -1256278290590997559}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x403200, 0x7fffffffdc18}, data = {prev = 0x0, cleanup = 0x0, canceltype = 4207104}}}
        not_first_call = <optimized out>
#3  0x000000000040235c in ?? ()
No symbol table info available.
(gdb) info registers
rax            0xfffffffffffffe00	-512
rbx            0x7fffffffbb01	140737488337665
rcx            0xffffffffffffffff	-1
rdx            0x2000	8192
rsi            0x7fffffffbaf0	140737488337648
rdi            0x3	3
rbp            0x7fffffffbb01	0x7fffffffbb01
rsp            0x7fffffffba98	0x7fffffffba98
r8             0x0	0
r9             0x0	0
r10            0x0	0
r11            0x246	582
r12            0x7ffff7fbf6a0	140737353873056
r13            0x11	17
r14            0x2	2
r15            0x7fffffffdc18	140737488346136
rip            0x7ffff7b1003d	0x7ffff7b1003d <__libc_recv+29>
eflags         0x246	[ PF ZF IF ]
cs             0x33	51
ss             0x2b	43
ds             0x0	0
es             0x0	0
fs             0x0	0
gs             0x0	0
(gdb) x/16i $pc
=> 0x7ffff7b1003d <__libc_recv+29>:	cmp    $0xfffffffffffff000,%rax
   0x7ffff7b10043 <__libc_recv+35>:	ja     0x7ffff7b10046 <__libc_recv+38>
   0x7ffff7b10045 <__libc_recv+37>:	retq   
   0x7ffff7b10046 <__libc_recv+38>:	mov    0x2c2e1b(%rip),%rdx        # 0x7ffff7dd2e68
   0x7ffff7b1004d <__libc_recv+45>:	neg    %eax
   0x7ffff7b1004f <__libc_recv+47>:	mov    %eax,%fs:(%rdx)
   0x7ffff7b10052 <__libc_recv+50>:	or     $0xffffffffffffffff,%rax
   0x7ffff7b10056 <__libc_recv+54>:	retq   
   0x7ffff7b10057 <__libc_recv+55>:	push   %rbp
   0x7ffff7b10058 <__libc_recv+56>:	push   %rbx
   0x7ffff7b10059 <__libc_recv+57>:	mov    $0x2d,%ebx
   0x7ffff7b1005e <__libc_recv+62>:	sub    $0x28,%rsp
   0x7ffff7b10062 <__libc_recv+66>:	mov    %ecx,0x1c(%rsp)
   0x7ffff7b10066 <__libc_recv+70>:	mov    %rdx,0x10(%rsp)
   0x7ffff7b1006b <__libc_recv+75>:	mov    %rsi,0x8(%rsp)
   0x7ffff7b10070 <__libc_recv+80>:	mov    %edi,0x18(%rsp)
(gdb) thread apply all backtrace

Thread 1 (process 5977):
#0  0x00007ffff7b1003d in __libc_recv (fd=3, buf=0x7fffffffbaf0, n=8192, flags=-1) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:29
#1  0x0000000000401caa in ?? ()
#2  0x00007ffff7a35ec5 in __libc_start_main (main=0x401690, argc=2, argv=0x7fffffffdc18, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdc08) at libc-start.c:285
#3  0x000000000040235c in ?? ()
(gdb) quit
A debugging session is active.

	Inferior 2 [process 5977] will be killed.

Quit anyway? (y or n) 

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

* bug#17014: 24.3; Emacsclient freezes if mutt attaches a signature
  2014-03-14 17:20 bug#17014: 24.3; Emacsclient freezes if mutt attaches a signature Walter Garcia-Fontes
@ 2014-03-16  1:17 ` Glenn Morris
  2014-03-17  9:07   ` Walter Garcia-Fontes
  2021-07-14 15:29 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2014-03-16  1:17 UTC (permalink / raw)
  To: walter.garcia; +Cc: 17014


Thanks, but I don't think there's any useful information in that backtrace.

Can you take emacsclient out of the equation?
Ie, just have mutt spawn a stand-alone, isolated Emacs instance.
Does that still hang?
Is it interruptible with ctrl-g?
If so, set debug-on-quit.
Or try and get a gdb backtrace from emacs.

What does the signature attachment hook actually do?





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

* bug#17014: 24.3; Emacsclient freezes if mutt attaches a signature
  2014-03-16  1:17 ` Glenn Morris
@ 2014-03-17  9:07   ` Walter Garcia-Fontes
  0 siblings, 0 replies; 5+ messages in thread
From: Walter Garcia-Fontes @ 2014-03-17  9:07 UTC (permalink / raw)
  To: 17014

Thanks for your attention:

* Glenn Morris, rgm@gnu.org [16/03/14 02:17]:
> Thanks, but I don't think there's any useful information in that
> backtrace.

Yes, I don't know how to produce the backtrace. If I start the emacs
daemon directly with emacsclient I can't reproduce the freeze, instead
if a deamon is already running, and I attach a client with emacsclient
I can produce the freeze 100% of the times.

> Can you take emacsclient out of the equation?
> Ie, just have mutt spawn a stand-alone, isolated Emacs instance.

As I said in this case i cannot produce the freeze.

> Does that still hang?
> Is it interruptible with ctrl-g?

Yes, it is interruptible via ctrl-g, but I have to press it twice I
don't know why

> If so, set debug-on-quit.

I've set it putting this in my emacs startup commands:

     (defun triangle-bugged (number)
       "Return sum of numbers 1 through NUMBER inclusive."
       (let ((total 0))
         (while (> number 0)
           (setq total (+ total number))
           (debug)                         ; Start debugger.
           (setq number (1= number)))      ; Error here.
         total))

But when I interrupt the frozen session nothing happens.

> Or try and get a gdb backtrace from emacs.

As I said the problem is that I don't know how to produce this
trace. I start gdb and I start there the emacs daemon, with "run
--daemon". Then I open mutt outside gdb, I produce the freeze, but
then I can't get anything from the emacs daemon being debugged in gdb.


> What does the signature attachment hook actually do?

It's just a text file, with the following two lines:

Walter Garcia-Fontes               
L'Hospitalet de Llobregat

-- 
Walter Garcia-Fontes







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

* bug#17014: 24.3; Emacsclient freezes if mutt attaches a signature
  2014-03-14 17:20 bug#17014: 24.3; Emacsclient freezes if mutt attaches a signature Walter Garcia-Fontes
  2014-03-16  1:17 ` Glenn Morris
@ 2021-07-14 15:29 ` Lars Ingebrigtsen
       [not found]   ` <YO8D4pufd0RqAl8R@upf.edu>
  1 sibling, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-14 15:29 UTC (permalink / raw)
  To: Walter Garcia-Fontes; +Cc: 17014

Walter Garcia-Fontes <walter.garcia@upf.edu> writes:

> I attach a stacktrace that I produced the following way:
>
> 1) I opened the daemon and attached an emacsclient.
> 2) I opened mutt, and produced the freeze
> 3) I opened gdb and "add-inferior" emacsclient
> 4) I runned emacsclient in gdb and produced the trace.

(I'm going through old bug reports that unfortunately got little
response at the time.)

Are you still seeing this issue in more recent versions of Emacs?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#17014: 24.3; Emacsclient freezes if mutt attaches a signature
       [not found]   ` <YO8D4pufd0RqAl8R@upf.edu>
@ 2021-07-14 16:01     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-14 16:01 UTC (permalink / raw)
  To: Walter Garcia-Fontes; +Cc: 17014

Walter Garcia-Fontes <walter.garcia@upf.edu> writes:

> No, I don't see this bug with current versions of emacs and mutt,

Thanks; closing this bug report, then.







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

end of thread, other threads:[~2021-07-14 16:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-14 17:20 bug#17014: 24.3; Emacsclient freezes if mutt attaches a signature Walter Garcia-Fontes
2014-03-16  1:17 ` Glenn Morris
2014-03-17  9:07   ` Walter Garcia-Fontes
2021-07-14 15:29 ` Lars Ingebrigtsen
     [not found]   ` <YO8D4pufd0RqAl8R@upf.edu>
2021-07-14 16:01     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.