From: Christoph <cschol2112@gmail.com>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: 18403@debbugs.gnu.org, Paul Eggert <eggert@cs.ucla.edu>
Subject: bug#18403: 24.4.50; emacsclient sometimes hangs on exit with Lucid GUI client
Date: Mon, 8 Sep 2014 15:33:22 -0600 [thread overview]
Message-ID: <CAOrdkqNQq_v6aGjDdpdGFnhyPMv0yuWN4nbQw=7=nNdRPqUt-Q@mail.gmail.com> (raw)
In-Reply-To: <540DBAB7.2040607@yandex.ru>
[-- Attachment #1: Type: text/plain, Size: 3460 bytes --]
One other thing I noticed:
after quitting the GUI frame, Ctrl-C to break the "waiting" loop and
reconnecting with a terminal emacsclient, the *Messages* buffer shows the
following error:
server-delete-client: X protocol error: BadFont (invalid Font parameter) on
protocol request 46
Not sure if that helps at all.
On Mon, Sep 8, 2014 at 8:18 AM, Dmitry Antipov <dmantipov@yandex.ru> wrote:
> On 09/08/2014 05:44 PM, Paul Eggert wrote:
>
> I cannot reproduce this new problem on Ubuntu 14.04, configuring trunk
>> bzr 117843 --with-x-toolkit=lucid.
>> x_delete_terminal calls XtCloseDisplay, and then calls emacs_close
>> (dpyinfo->connection), and
>> the 'close' returns 0.
>>
>> Perhaps you configured with some other toolkit? That might explain the
>> discrepancy.
>>
>
> No, this is Lucid but with your revert patch applied.
>
> Does it fix things for you if you add a line 'dpyinfo->connection = -1;'
>> after the existing line
>> 'dpyinfo->display = 0;' in xterm.c's x_connection_closed? Though that
>> might cause a file descriptor
>> leak; I'm not fully following what's going on here, since I can't
>> reproduce the new problem.
>>
>
> No, because x_connection_closed is not called.
>
> There is another example of a debugging session, clearly showing
> double-close problem:
>
> ;; 1) Run ./src/emacs -Q --daemon
> ;; 2) Run ./lib-src/emacsclient -c
> ;; 3) Attach gdb -p to daemon process
>
> (gdb) b close
> Breakpoint 1 at 0x3290ce6c10: close. (4 locations)
> (gdb) b x_connection_closed
> Breakpoint 2 at 0x541d10: file ../../trunk/src/xterm.c, line 8425.
> (gdb) b die
> Breakpoint 3 at 0x5f6d05: file ../../trunk/src/alloc.c, line 7116.
> (gdb) c
> Continuing.
>
> ;; 4) C-x C-c in emacsclient frame
>
> Breakpoint 1, close () at ../sysdeps/unix/syscall-template.S:81
> 81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
> (gdb) n
> close () at ../sysdeps/unix/syscall-template.S:82
> 82 ret
> (gdb)
> xcb_disconnect (c=0x13825e0) at xcb_conn.c:320
> 320 pthread_mutex_destroy(&c->iolock);
> (gdb) p c->fd ;; X
> connection fd is 8
> $1 = 8
> (gdb) c
> Continuing.
>
> Breakpoint 1, close () at ../sysdeps/unix/syscall-template.S:81
> 81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
> (gdb) n
> 83 T_PSEUDO_END (SYSCALL_SYMBOL)
> (gdb)
> posix_close (fd=8, flag=1) at ../../trunk/src/sysdep.c:2386 ;;
> We're closing X connection fd again
> 2386 }
> (gdb) c
>
> Continuing.
> Breakpoint 3, die (msg=0x717274 "errno != EBADF || fd < 0", file=0x7170e0
> "../../trunk/src/sysdep.c", line=2408)
> at ../../trunk/src/alloc.c:7116
> 7116 fprintf (stderr, "\r\n%s:%d: Emacs fatal error: assertion
> failed: %s\r\n",
> (gdb) bt 6
> #0 0x00000000005f6d05 in die (msg=0x717274 "errno != EBADF || fd < 0",
> file=0x7170e0 "../../trunk/src/sysdep.c", line=2408)
> at ../../trunk/src/alloc.c:7116
> #1 0x0000000000598480 in emacs_close (fd=8) at
> ../../trunk/src/sysdep.c:2408 ;; This is it
> #2 0x000000000054784b in x_delete_terminal (terminal=0xfa0218) at
> ../../trunk/src/xterm.c:11382
> #3 0x000000000051f8b6 in Fdelete_terminal (terminal=..., force=...) at
> ../../trunk/src/terminal.c:348
> #4 0x00000000004290ba in delete_frame (frame=..., force=...) at
> ../../trunk/src/frame.c:1691
> #5 0x0000000000429630 in Fdelete_frame (frame=..., force=...) at
> ../../trunk/src/frame.c:1801
>
> Dmitry
>
[-- Attachment #2: Type: text/html, Size: 4529 bytes --]
next prev parent reply other threads:[~2014-09-08 21:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-04 3:05 bug#18403: 24.4.50; emacsclient sometimes hangs on exit with Lucid GUI client Christoph Scholtes
2014-09-07 7:25 ` Paul Eggert
2014-09-08 1:36 ` Christoph
2014-09-08 1:40 ` Christoph
2014-09-08 2:48 ` Paul Eggert
2014-09-08 8:45 ` Dmitry Antipov
2014-09-08 13:44 ` Paul Eggert
2014-09-08 14:18 ` Dmitry Antipov
2014-09-08 21:33 ` Christoph [this message]
2014-09-13 16:21 ` Christoph
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOrdkqNQq_v6aGjDdpdGFnhyPMv0yuWN4nbQw=7=nNdRPqUt-Q@mail.gmail.com' \
--to=cschol2112@gmail.com \
--cc=18403@debbugs.gnu.org \
--cc=dmantipov@yandex.ru \
--cc=eggert@cs.ucla.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.