FS#32423 - [emacs] emacsclient consistently crashes emacs

Attached to Project: Arch Linux
Opened by Kasi (popsch) - Saturday, 03 November 2012, 13:58 GMT
Last edited by Eric Belanger (Snowman) - Wednesday, 28 August 2013, 00:03 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Jürgen Hötzel (juergen)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

1) emacs -q -f server-start &
2) touch bla.txt
3) emacsclient -nqc bla.txt
4) C-x C-c in the new frame

Now all emacs frames close instead of just the opened one. The emacs process hangs or crashes.

I can also consistently reproduce with with emacs in daemon mode.

The problem doesn't occur with the emacs-24.1-2 package. It happens with all available emacs-24.2-X packages.
This task depends upon

Closed by  Eric Belanger (Snowman)
Wednesday, 28 August 2013, 00:03 GMT
Reason for closing:  Fixed
Comment by Kasi (popsch) - Sunday, 04 November 2012, 01:09 GMT
I confirmed that this bug also exists when I use AUR/emacs-git

I am unable to determine whether it's a problem with arch or with emacs upstream, though.
Comment by Greg (dolby) - Sunday, 04 November 2012, 01:34 GMT
Are you using emacs-git with gtk3 by any chance? That is the most common source of crashes lately.
Anything useful in .xsession-errors?
Comment by Kasi (popsch) - Sunday, 04 November 2012, 01:40 GMT
I am using the standard emacs-21.2 package from extra. I just wanted to check whether the problem also exists in emacs-git.

I have no .xsession-errors file.

These are the libraries used by emacs-21.2 from extra. It has the problem:

linux-vdso.so.1 (0x00007fff701ff000)
libgtk-3.so.0 => /usr/lib/libgtk-3.so.0 (0x00007f7ba7b46000)
libgdk-3.so.0 => /usr/lib/libgdk-3.so.0 (0x00007f7ba78c6000)
libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007f7ba7573000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f7ba7351000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f7ba7053000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f7ba6e05000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f7ba6b0f000)
libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f7ba6907000)
libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f7ba66eb000)
libtiff.so.5 => /usr/lib/libtiff.so.5 (0x00007f7ba6478000)
libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007f7ba6227000)
libpng15.so.15 => /usr/lib/libpng15.so.15 (0x00007f7ba5ffa000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f7ba5cff000)
libgif.so.4 => /usr/lib/libgif.so.4 (0x00007f7ba5af5000)
libXpm.so.4 => /usr/lib/libXpm.so.4 (0x00007f7ba58e3000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f7ba55aa000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f7ba539f000)
libXft.so.2 => /usr/lib/libXft.so.2 (0x00007f7ba518a000)
libasound.so.2 => /usr/lib/libasound.so.2 (0x00007f7ba4e99000)
librsvg-2.so.2 => /usr/lib/librsvg-2.so.2 (0x00007f7ba4c64000)
libMagickWand.so.5 => /usr/lib/libMagickWand.so.5 (0x00007f7ba494d000)
libMagickCore.so.5 => /usr/lib/libMagickCore.so.5 (0x00007f7ba44c5000)
libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x00007f7ba427f000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f7ba3f23000)
libgpm.so.2 => /usr/lib/libgpm.so.2 (0x00007f7ba3d1c000)
libncursesw.so.5 => /usr/lib/libncursesw.so.5 (0x00007f7ba3abf000)
libgconf-2.so.4 => /usr/lib/libgconf-2.so.4 (0x00007f7ba388f000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f7ba35f1000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f7ba33b7000)
libotf.so.0 => /usr/lib/libotf.so.0 (0x00007f7ba31a1000)
libm17n-flt.so.0 => /usr/lib/libm17n-flt.so.0 (0x00007f7ba2f96000)
libm17n-core.so.0 => /usr/lib/libm17n-core.so.0 (0x00007f7ba2d69000)
libgnutls.so.28 => /usr/lib/libgnutls.so.28 (0x00007f7ba2a63000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f7ba2847000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f7ba24a0000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007f7ba229c000)
libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f7ba208f000)
libXi.so.6 => /usr/lib/libXi.so.6 (0x00007f7ba1e80000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f7ba1c79000)
libcairo-gobject.so.2 => /usr/lib/libcairo-gobject.so.2 (0x00007f7ba83d9000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00007f7ba1a56000)
libatk-bridge-2.0.so.0 => /usr/lib/libatk-bridge-2.0.so.0 (0x00007f7ba182c000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f7ba1617000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f7ba13cb000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007f7ba11c8000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007f7ba0fbe000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00007f7ba0db4000)
libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x00007f7ba0bb1000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f7ba09ae000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f7ba079b000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007f7ba0599000)
libffi.so.6 => /usr/lib/libffi.so.6 (0x00007f7ba0391000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f7ba018d000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f7b9ff2f000)
librt.so.1 => /usr/lib/librt.so.1 (0x00007f7b9fd27000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f7b9fb11000)
libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f7b9f8fa000)
libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f7b9f674000)
libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f7b9f471000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f7b9f267000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f7b9f048000)
libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f7b9ee43000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f7b9ec1f000)
libcroco-0.6.so.3 => /usr/lib/libcroco-0.6.so.3 (0x00007f7b9e9e4000)
liblcms2.so.2 => /usr/lib/liblcms2.so.2 (0x00007f7b9e790000)
liblqr-1.so.0 => /usr/lib/liblqr-1.so.0 (0x00007f7b9e57c000)
libXt.so.6 => /usr/lib/libXt.so.6 (0x00007f7b9e316000)
libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f7b9e106000)
libltdl.so.7 => /usr/lib/libltdl.so.7 (0x00007f7b9defc000)
libdbus-glib-1.so.2 => /usr/lib/libdbus-glib-1.so.2 (0x00007f7b9dcd5000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f7b9daab000)
libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x00007f7b9d897000)
libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x00007f7b9d686000)
libnettle.so.4 => /usr/lib/libnettle.so.4 (0x00007f7b9d460000)
libhogweed.so.2 => /usr/lib/libhogweed.so.2 (0x00007f7b9d24d000)
libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007f7b9cfde000)
/lib/ld-linux-x86-64.so.2 (0x00007f7ba81f9000)
libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f7b9cd55000)
libatspi.so.0 => /usr/lib/libatspi.so.0 (0x00007f7b9cb30000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f7b9c92c000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f7b9c726000)
libicule.so.49 => /usr/lib/libicule.so.49 (0x00007f7b9c4e4000)
libicuuc.so.49 => /usr/lib/libicuuc.so.49 (0x00007f7b9c16d000)
libicudata.so.49 => /usr/lib/libicudata.so.49 (0x00007f7b9ae4d000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f7b9ab4a000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f7b9a935000)

These are the libraries from emacs-24.1 from extra. It doesn't have the problem:

linux-vdso.so.1 (0x00007fff5e5ff000)
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x00007f6464700000)
libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x00007f646444e000)
libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007f64640fb000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f6463ed9000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f6463c3b000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f6463a01000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f64637b3000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f64634bd000)
libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f64632b5000)
libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f6463098000)
libtiff.so.5 => /usr/lib/libtiff.so.5 (0x00007f6462e25000)
libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007f6462bd4000)
libpng15.so.15 => /usr/lib/libpng15.so.15 (0x00007f64629a7000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f64626ad000)
libgif.so.4 => /usr/lib/libgif.so.4 (0x00007f64624a3000)
libXpm.so.4 => /usr/lib/libXpm.so.4 (0x00007f6462291000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f6461f58000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f6461d4d000)
libXft.so.2 => /usr/lib/libXft.so.2 (0x00007f6461b38000)
libasound.so.2 => /usr/lib/libasound.so.2 (0x00007f6461847000)
librsvg-2.so.2 => /usr/lib/librsvg-2.so.2 (0x00007f6461612000)
libMagickWand.so.5 => /usr/lib/libMagickWand.so.5 (0x00007f64612fb000)
libMagickCore.so.5 => /usr/lib/libMagickCore.so.5 (0x00007f6460e73000)
libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x00007f6460c2d000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f6460a11000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f64606b5000)
libgpm.so.2 => /usr/lib/libgpm.so.2 (0x00007f64604ae000)
libncursesw.so.5 => /usr/lib/libncursesw.so.5 (0x00007f6460251000)
libgconf-2.so.4 => /usr/lib/libgconf-2.so.4 (0x00007f6460021000)
libgnutls.so.28 => /usr/lib/libgnutls.so.28 (0x00007f645fd1b000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f645f974000)
libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f645f767000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f645f560000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00007f645f33d000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f645f03f000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f645ee2a000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f645ebde000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f645e9cb000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007f645e7c8000)
libXi.so.6 => /usr/lib/libXi.so.6 (0x00007f645e5b8000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007f645e3ae000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00007f645e1a4000)
libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x00007f645dfa0000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f645dd9d000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007f645db9b000)
libffi.so.6 => /usr/lib/libffi.so.6 (0x00007f645d992000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007f645d78e000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f645d58a000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f645d32b000)
librt.so.1 => /usr/lib/librt.so.1 (0x00007f645d123000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f645cf0d000)
libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f645ccf6000)
libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f645cae6000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f645c8bb000)
libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f645c6b6000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f645c493000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f645c274000)
libcroco-0.6.so.3 => /usr/lib/libcroco-0.6.so.3 (0x00007f645c039000)
liblcms2.so.2 => /usr/lib/liblcms2.so.2 (0x00007f645bde5000)
liblqr-1.so.0 => /usr/lib/liblqr-1.so.0 (0x00007f645bbd1000)
libXt.so.6 => /usr/lib/libXt.so.6 (0x00007f645b96b000)
libltdl.so.7 => /usr/lib/libltdl.so.7 (0x00007f645b761000)
/lib/ld-linux-x86-64.so.2 (0x00007f6464d2d000)
libdbus-glib-1.so.2 => /usr/lib/libdbus-glib-1.so.2 (0x00007f645b53a000)
libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x00007f645b326000)
libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x00007f645b115000)
libnettle.so.4 => /usr/lib/libnettle.so.4 (0x00007f645aeef000)
libhogweed.so.2 => /usr/lib/libhogweed.so.2 (0x00007f645acdc000)
libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007f645aa6d000)
libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f645a7e4000)
libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f645a55e000)
libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f645a35b000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f645a151000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f6459f4d000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f6459d47000)
libicule.so.49 => /usr/lib/libicule.so.49 (0x00007f6459b05000)
libicuuc.so.49 => /usr/lib/libicuuc.so.49 (0x00007f645978e000)
libicudata.so.49 => /usr/lib/libicudata.so.49 (0x00007f645846e000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f645816b000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f6457f55000)
Comment by Greg (dolby) - Sunday, 04 November 2012, 01:50 GMT
Yes, i was asking because the emacs-git script is supposed to build against gtk2 by default.
Build against gtk3 is obvious in the ldd output above. Also m17n-lib was added.
Even if you dont have an .xsession-errors the output from the gui applications you run should be outputed somewhere, even the console. try running emacs from an xterm (or any other terminal of your choice).
Comment by Kasi (popsch) - Sunday, 04 November 2012, 14:18 GMT
I also don't get an error on the console or anything. It just hangs.

However, I dug deeper and it might really be a toolkit issue, because when I start the server from emacs started in a terminal ('emacs -nw -q -f server-start') everything works fine. When I start the daemon in a background GUI-less session, it's also working well. Only when I start the server from a gtk3 window, then it will consistently crash.
Comment by Greg (dolby) - Sunday, 04 November 2012, 15:48 GMT
Thats why i asked earlier if you built emacs-git with gtk3 instead of gtk2 which is the default build option.
Comment by Kasi (popsch) - Sunday, 04 November 2012, 17:01 GMT
Ok. Got some kind of trace when making it crash with the -nw option:

--

X protocol error: BadWindow (invalid Window parameter) on protocol request 42
When compiled with GTK, Emacs cannot recover from X disconnects.
This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715
For details, see etc/PROBLEMS.
Fatal error 6: Aborted
Backtrace:
emacs[0x4f964b]
emacs[0x4de850]
emacs[0x4f9693]
emacs[0x4b3aeb]
emacs[0x4b5b02]
emacs[0x4b5b55]
/usr/lib/libX11.so.6(_XError+0x126)[0x7f9b1f129956]
/usr/lib/libX11.so.6(+0x41ba1)[0x7f9b1f126ba1]
/usr/lib/libX11.so.6(+0x41be5)[0x7f9b1f126be5]
/usr/lib/libX11.so.6(_XReply+0x1e8)[0x7f9b1f1277d8]
/usr/lib/libX11.so.6(XSync+0x3d)[0x7f9b1f12318d]
...
Aborted

--

It apparently is a known problem with gtk and it occurs with gtk2 as well. I compiled emacs-git and it uses gtk2, still the problem occurs.

Is there a possibility to compile emacs with a different toolkit until this bug is resolved? It makes emacs completely unusable with emacsclient in the arch releases.
Comment by Kasi (popsch) - Sunday, 04 November 2012, 17:17 GMT
I wonder though, why it wasn't a problem with the emacs-24.1 package.
Comment by Kasi (popsch) - Sunday, 04 November 2012, 17:36 GMT
I tried the emacs-lucid package from AUR and it doesn't cause the described problem. For me this is resolved (=> I won't use the extra/emacs package), however, you might want to decide what to do with the package, since it's in arch's stable branch and has a known annoying bug.
Comment by Eric Belanger (Snowman) - Sunday, 18 November 2012, 07:09 GMT
I can't reproduce the error. I don't know why it works for me.
Comment by Eric Belanger (Snowman) - Tuesday, 06 August 2013, 22:00 GMT
Is the bug still present in emacs 24.3-3 ?
Comment by Kasi (popsch) - Tuesday, 27 August 2013, 22:58 GMT
Doesn't happen anymore.

Loading...