unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Vincent Bernat <bernat@luffy.cx>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16737@debbugs.gnu.org, Oleh Krehel <o.krehel@tue.nl>
Subject: bug#16737: Timed out waiting for reply from selection owner
Date: Sat, 17 Jan 2015 22:43:21 +0100	[thread overview]
Message-ID: <m3h9vp6q2u.fsf@neo.luffy.cx> (raw)
In-Reply-To: <83ppadz3g4.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Jan 2015 20:07:07 +0200")

 ❦ 17 janvier 2015 20:07 +0200, Eli Zaretskii <eliz@gnu.org> :

>> The thing is, I don't know how to get a backtrace - I'm only a novice
>> with GDB.  I was hoping someone would post a sequence of commands to
>> get a proper backtrace for this problem.
>
> During those 5 seconds, attach GDB to the Emacs process:
>
>   $ gdb -p PID
>
> where PID is the numeric process ID of Emacs; you can find that out
> in advance, before you start the reproducing sequence, and prepare the
> above command line, so that all you need to do is hit RET.
>
> Then, when GDB displays its prompt "(gdb)", type this:
>
>   thread apply all bt
>
> This will show a backtrace of every thread in the Emacs process.

I also have the same problem. It happens randomly when I try to paste or
when I try to kill something. Once it happens, it happens often. I
usually restart emacs after cursing it a lot. The backtrace is always
the same:

#0  0x00007fdbf286d009 in __pselect (nfds=nfds@entry=27,
 readfds=readfds@entry=0x7fff9569f510, writefds=writefds@entry=0x0,
 exceptfds=exceptfds@entry=0x0, timeout=<optimized out>,
 timeout@entry=0x7fff9569faf0, sigmask=sigmask@entry=0x0) at
 ../sysdeps/unix/sysv/linux/pselect.c:77
#1  0x00000000005d4ac2 in xg_select (fds_lim=27,
 rfds=rfds@entry=0x7fff9569fb10, wfds=wfds@entry=0x0,
 efds=efds@entry=0x0, timeout=timeout@entry=0x7fff9569faf0,
 sigmask=sigmask@entry=0x0) at xgselect.c:105
#2  0x0000000000599b66 in wait_reading_process_output
 (time_limit=<optimized out>, nsecs=0, read_kbd=0, do_display=false,
 wait_for_cell=12579542, wait_proc=0x0, just_wait_proc=0) at
 process.c:4606
#3  0x00000000004d2239 in x_get_foreign_selection (selection_symbol=27,
 target_type=12623842, time_stamp=12315698, frame=-1) at xselect.c:1237

When pasting, the source can be either "xsel -i -b" or the browser. So,
I don't think this is related to some advanced paste mode.

I am using:

#+begin_src lisp
(setq x-select-enable-primary t         ; Yank use the primary selection if available
      save-interprogram-paste-before-kill t ; Put clipboard/selection into kill ring
      mouse-1-click-follows-link nil)	; Don't follow links with left click
#+end_src

The use of "save-interprogram-paste-before-kill" should explain why I
get problems when killing too.

I am running Emacs 24.4 from Debian unstable.

Here is the "thread apply all bt" (I have to paste in a frame running in
tty mode to be able to complete this bug report):

(gdb) thread apply all bt

Thread 5 (Thread 0x7fdbebb6d700 (LWP 4358)):
#0  0x00007fdbf286b18d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fdbf6d57ee4 in g_main_context_poll (priority=2147483647, n_fds=2, fds=0x7fdbe40008e0, timeout=-1, context=0x13b8c00) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:4076
#2  g_main_context_iterate (context=context@entry=0x13b8c00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3776
#3  0x00007fdbf6d57ffc in g_main_context_iteration (context=0x13b8c00, may_block=may_block@entry=1) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3842
#4  0x00007fdbf6d58039 in glib_worker_main (data=<optimized out>) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:5589
#5  0x00007fdbf6d7e935 in g_thread_proxy (data=0x13b9000) at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c:764
#6  0x00007fdbf2d550a4 in start_thread (arg=0x7fdbebb6d700) at pthread_create.c:309
#7  0x00007fdbf2873ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7fdbea801700 (LWP 4359)):
#0  0x00007fdbf286b18d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fdbf6d57ee4 in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7fdbdc0010c0, timeout=-1, context=0x18f11d0) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:4076
#2  g_main_context_iterate (context=context@entry=0x18f11d0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3776
#3  0x00007fdbf6d57ffc in g_main_context_iteration (context=0x18f11d0, may_block=1) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3842
#4  0x00007fdbea80927d in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#5  0x00007fdbf6d7e935 in g_thread_proxy (data=0x1896050) at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c:764
#6  0x00007fdbf2d550a4 in start_thread (arg=0x7fdbea801700) at pthread_create.c:309
#7  0x00007fdbf2873ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7fdbea000700 (LWP 4360)):
#0  0x00007fdbf286b18d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fdbf6d57ee4 in g_main_context_poll (priority=2147483647, n_fds=2, fds=0x7fdbe00010c0, timeout=-1, context=0x7fdbdc00d2d0) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:4076
#2  g_main_context_iterate (context=0x7fdbdc00d2d0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3776
#3  0x00007fdbf6d58272 in g_main_loop_run (loop=0x7fdbdc00d1f0) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3975
#4  0x00007fdbf7349f76 in gdbus_shared_thread_func (user_data=0x7fdbdc00d2a0) at /tmp/buildd/glib2.0-2.42.1/./gio/gdbusprivate.c:273
#5  0x00007fdbf6d7e935 in g_thread_proxy (data=0x1896190) at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c:764
#6  0x00007fdbf2d550a4 in start_thread (arg=0x7fdbea000700) at pthread_create.c:309
#7  0x00007fdbf2873ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7fdbdb895700 (LWP 31847)):
#0  0x00007fdbf2b46c9e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fdbf2b446f0 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fdbf2d550a4 in start_thread (arg=0x7fdbdb895700) at pthread_create.c:309
#3  0x00007fdbf2873ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7fdbfa101a40 (LWP 4357)):
#0  0x00007fdbf286d009 in __pselect (nfds=nfds@entry=27, readfds=readfds@entry=0x7fff9569f510, writefds=writefds@entry=0x0, exceptfds=exceptfds@entry=0x0, timeout=<optimized out>, timeout@entry=0x7fff9569faf0, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/pselect.c:77
#1  0x00000000005d4ac2 in xg_select (fds_lim=27, rfds=rfds@entry=0x7fff9569fb10, wfds=wfds@entry=0x0, efds=efds@entry=0x0, timeout=timeout@entry=0x7fff9569faf0, sigmask=sigmask@entry=0x0) at xgselect.c:105
#2  0x0000000000599b66 in wait_reading_process_output (time_limit=<optimized out>, nsecs=0, read_kbd=0, do_display=false, wait_for_cell=12579542, wait_proc=0x0, just_wait_proc=0) at process.c:4606
#3  0x00000000004d2239 in x_get_foreign_selection (selection_symbol=27, target_type=12623842, time_stamp=12315698, frame=-1) at xselect.c:1237
#4  0x000000000055c7fa in Ffuncall (nargs=<optimized out>, args=args@entry=0x7fff9569fe68) at eval.c:2823
#5  0x0000000000591b13 in exec_byte_code (bytestr=<optimized out>, vector=10040525, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0) at bytecode.c:916
#6  0x000000000055c2cf in funcall_lambda (fun=10040397, nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x7fff956a0040) at eval.c:3045
#7  0x000000000055c643 in Ffuncall (nargs=3, args=args@entry=0x7fff956a0038) at eval.c:2873
#8  0x0000000000591b13 in exec_byte_code (bytestr=<optimized out>, vector=10432997, maxdepth=<optimized out>, args_template=<optimized out>, nargs=<optimized out>, args=<optimized out>) at bytecode.c:916
#9  0x000000000055bc0b in eval_sub (form=form@entry=10432918) at eval.c:2188
#10 0x000000000055eac1 in internal_lisp_condition_case (var=<optimized out>, bodyform=10432918, handlers=<optimized out>) at eval.c:1317
#11 0x0000000000592e57 in exec_byte_code (bytestr=<optimized out>, vector=10432781, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0) at bytecode.c:1162
#12 0x000000000055c2cf in funcall_lambda (fun=10432709, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x7fff956a0440) at eval.c:3045
#13 0x000000000055c643 in Ffuncall (nargs=2, args=args@entry=0x7fff956a0438) at eval.c:2873
#14 0x0000000000591b13 in exec_byte_code (bytestr=<optimized out>, vector=10433253, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0) at bytecode.c:916
#15 0x000000000055c2cf in funcall_lambda (fun=10433181, nargs=nargs@entry=0, arg_vector=arg_vector@entry=0x7fff956a0600) at eval.c:3045
#16 0x000000000055c643 in Ffuncall (nargs=1, args=args@entry=0x7fff956a05f8) at eval.c:2873
#17 0x0000000000591b13 in exec_byte_code (bytestr=<optimized out>, vector=9638461, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=2, args=<optimized out>, args@entry=0x931219 <pure+939865>) at bytecode.c:916
#18 0x000000000055c367 in funcall_lambda (fun=140735700142032, nargs=nargs@entry=2, arg_vector=0x931219 <pure+939865>, arg_vector@entry=0x7fff956a0768) at eval.c:2979
#19 0x000000000055c643 in Ffuncall (nargs=3, args=args@entry=0x7fff956a0760) at eval.c:2873
#20 0x0000000000591b13 in exec_byte_code (bytestr=<optimized out>, vector=85013877, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x9316e1 <pure+941089>) at bytecode.c:916
#21 0x000000000055c367 in funcall_lambda (fun=140735700142816, nargs=nargs@entry=0, arg_vector=0x9316e1 <pure+941089>, arg_vector@entry=0x7fff956a08a8) at eval.c:2979
#22 0x000000000055c643 in Ffuncall (nargs=1, args=0x7fff956a08a0) at eval.c:2873
#23 0x000000000055bdf4 in eval_sub (form=form@entry=187158758) at eval.c:2155
#24 0x000000000055eac1 in internal_lisp_condition_case (var=<optimized out>, bodyform=187158758, handlers=<optimized out>) at eval.c:1317
#25 0x0000000000592e57 in exec_byte_code (bytestr=<optimized out>, vector=9639509, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=3, args=<optimized out>, args@entry=0x931631 <pure+940913>) at bytecode.c:1162
#26 0x000000000055c367 in funcall_lambda (fun=140735700143792, nargs=nargs@entry=3, arg_vector=0x931631 <pure+940913>, arg_vector@entry=0x7fff956a0bb8) at eval.c:2979
#27 0x000000000055c643 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x7fff956a0bb0) at eval.c:2873
#28 0x000000000055d574 in Fapply (nargs=nargs@entry=2, args=args@entry=0x7fff956a0c70) at eval.c:2351
#29 0x000000000055d7e0 in apply1 (fn=fn@entry=15660018, arg=arg@entry=187158790) at eval.c:2585
#30 0x0000000000558521 in Fcall_interactively (function=15660018, record_flag=12315698, keys=12350653) at callint.c:378
#31 0x000000000055c80d in Ffuncall (nargs=<optimized out>, args=args@entry=0x7fff956a0e28) at eval.c:2819
#32 0x0000000000591b13 in exec_byte_code (bytestr=<optimized out>, vector=9616805, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=1, args=<optimized out>, args@entry=0x92bd81 <pure+918209>) at bytecode.c:916
#33 0x000000000055c367 in funcall_lambda (fun=0, nargs=nargs@entry=1, arg_vector=0x92bd81 <pure+918209>, arg_vector@entry=0x7fff956a0f88) at eval.c:2979
#34 0x000000000055c643 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x7fff956a0f80) at eval.c:2873
#35 0x000000000055cafa in call1 (fn=<optimized out>, arg1=<optimized out>) at eval.c:2611
#36 0x00000000004f80cd in command_loop_1 () at keyboard.c:1559
#37 0x000000000055ab07 in internal_condition_case (bfun=bfun@entry=0x4f7d30 <command_loop_1>, handlers=<optimized out>, hfun=hfun@entry=0x4eee40 <cmd_error>) at eval.c:1348
#38 0x00000000004ea43e in command_loop_2 (ignore=ignore@entry=12315698) at keyboard.c:1177
#39 0x000000000055a9eb in internal_catch (tag=12363170, func=func@entry=0x4ea420 <command_loop_2>, arg=12315698) at eval.c:1112
#40 0x00000000004eea57 in command_loop () at keyboard.c:1156
#41 recursive_edit_1 () at keyboard.c:777
#42 0x00000000004eed70 in Frecursive_edit () at keyboard.c:848
#43 0x0000000000418579 in main (argc=0, argv=0x7fff956a1348) at emacs.c:1646
-- 
Make sure input cannot violate the limits of the program.
            - The Elements of Programming Style (Kernighan & Plauger)





  reply	other threads:[~2015-01-17 21:43 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13  3:40 bug#16737: 24.3.50; Yank causes hang Sujith Manoharan
2014-02-13  5:22 ` Dmitry Antipov
2014-02-19 16:04   ` Sujith Manoharan
2014-03-04 12:47   ` Nicolas Richard
2014-03-04 16:59     ` Eli Zaretskii
2014-03-05 11:01       ` Nicolas Richard
2014-03-05 17:08         ` Eli Zaretskii
2014-03-21  6:19           ` Nicolas Richard
2014-03-21  6:28             ` Nicolas Richard
2014-03-21  6:42               ` Nicolas Richard
2014-03-21  8:18               ` Eli Zaretskii
2014-03-21  8:17             ` Eli Zaretskii
2014-03-27  9:34               ` Nicolas Richard
2014-02-13 10:23 ` Nicolas Richard
2014-06-25 16:04 ` bug#16737: Timed out waiting for reply from selection owner Stefan Monnier
2014-06-25 18:07   ` Alex Bennée
2015-06-03 15:18     ` Tassilo Horn
2015-06-03 15:35       ` Alex Bennée
2015-06-03 15:39         ` bug#20283: " Oleh Krehel
2015-06-05  9:26           ` Alex Bennée
2014-06-25 18:28   ` Jan Djärv
2014-06-25 19:56     ` Stefan Monnier
2014-07-21 15:02     ` Alex Bennée
2014-11-21 10:53     ` Tom Tromey
2014-06-25 19:58   ` Nicolas Richard
2014-09-25 20:43 ` bug#16737: Autoloading `safe-local-variable' properties Stefan Monnier
2014-11-11 12:37 ` bug#16737: Yank causes hang in v24.4.1 Mike Crowe
2014-11-11 13:26   ` Mike Crowe
2015-01-17 14:38 ` bug#16737: Timed out waiting for reply from selection owner Oleh Krehel
2015-01-17 14:56   ` Eli Zaretskii
2015-01-17 15:34     ` Oleh Krehel
2015-01-17 18:07       ` Eli Zaretskii
2015-01-17 21:43         ` Vincent Bernat [this message]
2015-01-17 21:45           ` Vincent Bernat
2015-01-19 17:46           ` Eli Zaretskii
2015-01-27 16:43             ` Vincent Bernat
2015-01-27 17:42               ` Eli Zaretskii
2015-01-27 18:16                 ` Vincent Bernat
2015-01-28  9:54                   ` Nicolas Richard
2015-01-28 10:16                     ` Vincent Bernat
2015-01-28 14:14                       ` Vincent Bernat
2015-01-28 14:23               ` Oleh Krehel
2015-01-27 10:43         ` Oleh Krehel
2015-01-27 17:43           ` Eli Zaretskii
2015-01-27 18:05             ` Oleh Krehel
2015-01-27 19:10               ` Eli Zaretskii
2015-04-04 14:12 ` bug#16737: 24.3.50; Yank causes hang Jan Djärv
2015-06-04 13:42 ` bug#16737: Timed out waiting for reply from selection owner Alan D. Salewski
2015-06-05 14:36   ` Alan D. Salewski
2015-06-15  3:00     ` Alan D. Salewski
2015-06-16 11:10       ` Oleh Krehel
2015-06-23 23:45       ` Stefan Monnier
2015-07-08 20:54 ` bug#16737: A bit of digging Mike Crowe
2015-07-09 12:44   ` bug#16737: Possible patch Mike Crowe
2015-07-15 18:36     ` bug#16737: Emacs bug #16737: " Mike Crowe
2015-07-16  8:32       ` Tassilo Horn
2015-07-17 19:58         ` Martin Renold
2015-07-17 19:08 ` bug#16737: Patch for "Yank causes hang" bug in Emacs Paul Eggert
2015-07-18  5:16   ` Sujith Manoharan
2015-09-26  4:39   ` bug#19320: " Mitchel Humpherys

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3h9vp6q2u.fsf@neo.luffy.cx \
    --to=bernat@luffy.cx \
    --cc=16737@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=o.krehel@tue.nl \
    /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 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).