Subject: Re: bug#16737: Timed out waiting for reply from selection owner

From: "Alan D. Salewski" <[email-masked]>
Date: Fri, 05 Jun 2015 10:36:04 -0400

On 2015-06-04 09:42:19, Alan D. Salewski spake thus:
[...]
> I didn't capture timestamp information with this run, so I'm not sure
> where, if anywhere, the first occurrance of the problem is visible above
> the output supplied above.
[...]

This time I launched emacs with this (to timestamp stderr messages):

------------------------------------8<---------------------------------------
    #!/bin/bash -

    # emacs-log-stderr: launch emacs with stderr redirected to a log file in a
    # well-known location.

    PROG='emacs-log-stderr'

    emacs "$@" \
        2> >( while read line; do
                  printf '%s (emacs stderr): %s\n' "$(date "+%F %T")" "$line" >> "${HOME}/var/log/emacs/emacs.stderr";
              done
            )
------------------------------------8<---------------------------------------

Here's the stdout output coming up on the problem; fat arrows show the output
when the problem occurred this time:

    2015-06-05 10:01:00 (emacs stderr): 5156: Sending all 84 bytes
    2015-06-05 10:01:00 (emacs stderr): 5156: Sent SelectionNotify: CLIPBOARD, target TARGETS (19634)
    2015-06-05 10:01:00 (emacs stderr): 5156: x_stop_queuing_selection_requests 1
    2015-06-05 10:01:01 (emacs stderr): 5156: x_handle_selection_event
    2015-06-05 10:01:01 (emacs stderr): 5156: x_start_queuing_selection_requests 1
    2015-06-05 10:01:01 (emacs stderr): 5156: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS
    2015-06-05 10:01:01 (emacs stderr): 5156:  XInternAtom LENGTH
    2015-06-05 10:01:01 (emacs stderr): 5156:  XInternAtom FILE_NAME
    2015-06-05 10:01:01 (emacs stderr): 5156:  XInternAtom CHARACTER_POSITION
    2015-06-05 10:01:01 (emacs stderr): 5156:  XInternAtom LINE_NUMBER
    2015-06-05 10:01:01 (emacs stderr): 5156:  XInternAtom COLUMN_NUMBER
    2015-06-05 10:01:01 (emacs stderr): 5156:  XInternAtom OWNER_OS
    2015-06-05 10:01:01 (emacs stderr): 5156:  XInternAtom HOST_NAME
    2015-06-05 10:01:01 (emacs stderr): 5156:  XInternAtom USER
    2015-06-05 10:01:01 (emacs stderr): 5156:  XInternAtom CLASS
    2015-06-05 10:01:01 (emacs stderr): 5156:  XInternAtom NAME
    2015-06-05 10:01:01 (emacs stderr): 5156:  XInternAtom SAVE_TARGETS
    2015-06-05 10:01:01 (emacs stderr): 5156: Sending all 84 bytes
    2015-06-05 10:01:01 (emacs stderr): 5156: Sent SelectionNotify: CLIPBOARD, target TARGETS (19635)
    2015-06-05 10:01:01 (emacs stderr): 5156: x_stop_queuing_selection_requests 1
    2015-06-05 10:01:02 (emacs stderr): 5156: x_handle_selection_event
    2015-06-05 10:01:02 (emacs stderr): 5156: x_start_queuing_selection_requests 1
    2015-06-05 10:01:02 (emacs stderr): 5156: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS
    2015-06-05 10:01:02 (emacs stderr): 5156:  XInternAtom LENGTH
    2015-06-05 10:01:02 (emacs stderr): 5156:  XInternAtom FILE_NAME
    2015-06-05 10:01:02 (emacs stderr): 5156:  XInternAtom CHARACTER_POSITION
    2015-06-05 10:01:02 (emacs stderr): 5156:  XInternAtom LINE_NUMBER
    2015-06-05 10:01:02 (emacs stderr): 5156:  XInternAtom COLUMN_NUMBER
    2015-06-05 10:01:02 (emacs stderr): 5156:  XInternAtom OWNER_OS
    2015-06-05 10:01:02 (emacs stderr): 5156:  XInternAtom HOST_NAME
    2015-06-05 10:01:02 (emacs stderr): 5156:  XInternAtom USER
    2015-06-05 10:01:02 (emacs stderr): 5156:  XInternAtom CLASS
    2015-06-05 10:01:02 (emacs stderr): 5156:  XInternAtom NAME
    2015-06-05 10:01:02 (emacs stderr): 5156:  XInternAtom SAVE_TARGETS
    2015-06-05 10:01:02 (emacs stderr): 5156: Sending all 84 bytes
    2015-06-05 10:01:02 (emacs stderr): 5156: Sent SelectionNotify: CLIPBOARD, target TARGETS (19636)
    2015-06-05 10:01:02 (emacs stderr): 5156: x_stop_queuing_selection_requests 1
    2015-06-05 10:01:03 (emacs stderr): 5156: x_handle_selection_event
    2015-06-05 10:01:03 (emacs stderr): 5156: x_start_queuing_selection_requests 1
    2015-06-05 10:01:03 (emacs stderr): 5156: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS
    2015-06-05 10:01:03 (emacs stderr): 5156:  XInternAtom LENGTH
    2015-06-05 10:01:03 (emacs stderr): 5156:  XInternAtom FILE_NAME
    2015-06-05 10:01:03 (emacs stderr): 5156:  XInternAtom CHARACTER_POSITION
    2015-06-05 10:01:03 (emacs stderr): 5156:  XInternAtom LINE_NUMBER
    2015-06-05 10:01:03 (emacs stderr): 5156:  XInternAtom COLUMN_NUMBER
    2015-06-05 10:01:03 (emacs stderr): 5156:  XInternAtom OWNER_OS
    2015-06-05 10:01:03 (emacs stderr): 5156:  XInternAtom HOST_NAME
    2015-06-05 10:01:03 (emacs stderr): 5156:  XInternAtom USER
    2015-06-05 10:01:03 (emacs stderr): 5156:  XInternAtom CLASS
    2015-06-05 10:01:03 (emacs stderr): 5156:  XInternAtom NAME
    2015-06-05 10:01:03 (emacs stderr): 5156:  XInternAtom SAVE_TARGETS
    2015-06-05 10:01:03 (emacs stderr): 5156: Sending all 84 bytes
    2015-06-05 10:01:03 (emacs stderr): 5156: Sent SelectionNotify: CLIPBOARD, target TARGETS (19637)
    2015-06-05 10:01:03 (emacs stderr): 5156: x_stop_queuing_selection_requests 1
=>  2015-06-05 10:01:04 (emacs stderr): 5156: Get selection UTF8_STRING, type _EMACS_TMP_
=>  2015-06-05 10:01:04 (emacs stderr): 5156:   Start waiting 5 secs for SelectionNotify
=>  2015-06-05 10:01:09 (emacs stderr): 5156:   Got event = 0
=>  2015-06-05 10:01:09 (emacs stderr): 5156: Get selection COMPOUND_TEXT, type _EMACS_TMP_
=>  2015-06-05 10:01:09 (emacs stderr): 5156:   Start waiting 5 secs for SelectionNotify
=>  2015-06-05 10:01:14 (emacs stderr): 5156:   Got event = 0
=>  2015-06-05 10:01:14 (emacs stderr): 5156: Get selection STRING, type _EMACS_TMP_
=>  2015-06-05 10:01:14 (emacs stderr): 5156:   Start waiting 5 secs for SelectionNotify
=>  2015-06-05 10:01:19 (emacs stderr): 5156:   Got event = 0
=>  2015-06-05 10:01:19 (emacs stderr): 5156: Get selection STRING, type _EMACS_TMP_
=>  2015-06-05 10:01:19 (emacs stderr): 5156:   Start waiting 5 secs for SelectionNotify
=>  2015-06-05 10:01:24 (emacs stderr): 5156:   Got event = 0
=>  2015-06-05 10:01:24 (emacs stderr): 5156: Received SelectionNotify
=>  2015-06-05 10:01:24 (emacs stderr): 5156: Received SelectionNotify
=>  2015-06-05 10:01:24 (emacs stderr): 5156: Received SelectionNotify
=>  2015-06-05 10:01:24 (emacs stderr): 5156: Received SelectionNotify
    2015-06-05 10:01:24 (emacs stderr): 5156: x_handle_selection_event
    2015-06-05 10:01:24 (emacs stderr): 5156: x_start_queuing_selection_requests 1
    2015-06-05 10:01:24 (emacs stderr): 5156: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS
    2015-06-05 10:01:24 (emacs stderr): 5156:  XInternAtom LENGTH
    2015-06-05 10:01:24 (emacs stderr): 5156:  XInternAtom FILE_NAME

For comparison, here's what the output looked like when successfully pasting
into an emacs buffer earlier in the same emacs session:

    2015-06-05 05:37:52 (emacs stderr): 5156: x_start_queuing_selection_requests 1
    2015-06-05 05:37:52 (emacs stderr): 5156: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS
    2015-06-05 05:37:52 (emacs stderr): 5156:  XInternAtom LENGTH
    2015-06-05 05:37:52 (emacs stderr): 5156:  XInternAtom FILE_NAME
    2015-06-05 05:37:52 (emacs stderr): 5156:  XInternAtom CHARACTER_POSITION
    2015-06-05 05:37:52 (emacs stderr): 5156:  XInternAtom LINE_NUMBER
    2015-06-05 05:37:52 (emacs stderr): 5156:  XInternAtom COLUMN_NUMBER
    2015-06-05 05:37:52 (emacs stderr): 5156:  XInternAtom OWNER_OS
    2015-06-05 05:37:52 (emacs stderr): 5156:  XInternAtom HOST_NAME
    2015-06-05 05:37:52 (emacs stderr): 5156:  XInternAtom USER
    2015-06-05 05:37:52 (emacs stderr): 5156:  XInternAtom CLASS
    2015-06-05 05:37:52 (emacs stderr): 5156:  XInternAtom NAME
    2015-06-05 05:37:52 (emacs stderr): 5156:  XInternAtom SAVE_TARGETS
    2015-06-05 05:37:52 (emacs stderr): 5156: Sending all 84 bytes
    2015-06-05 05:37:52 (emacs stderr): 5156: Sent SelectionNotify: CLIPBOARD, target TARGETS (12471)
    2015-06-05 05:37:52 (emacs stderr): 5156: x_stop_queuing_selection_requests 1
=>  2015-06-05 05:37:52 (emacs stderr): 5156: Get selection UTF8_STRING, type _EMACS_TMP_
=>  2015-06-05 05:37:52 (emacs stderr): 5156: Received SelectionNotify
=>  2015-06-05 05:37:52 (emacs stderr): 5156:   Start waiting 5 secs for SelectionNotify
=>  2015-06-05 05:37:52 (emacs stderr): 5156:   Got event = 1
=>  2015-06-05 05:37:52 (emacs stderr): 5156: Reading selection data
=>  2015-06-05 05:37:52 (emacs stderr): 5156: Read 52 bytes from property _EMACS_TMP_
=>  2015-06-05 05:37:52 (emacs stderr): 5156:   Delete property _EMACS_TMP_
    2015-06-05 05:37:53 (emacs stderr): 5156: x_handle_selection_event
    2015-06-05 05:37:53 (emacs stderr): 5156: x_start_queuing_selection_requests 1
    2015-06-05 05:37:53 (emacs stderr): 5156: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS
    2015-06-05 05:37:53 (emacs stderr): 5156:  XInternAtom LENGTH
    2015-06-05 05:37:53 (emacs stderr): 5156:  XInternAtom FILE_NAME
    2015-06-05 05:37:53 (emacs stderr): 5156:  XInternAtom CHARACTER_POSITION
    2015-06-05 05:37:53 (emacs stderr): 5156:  XInternAtom LINE_NUMBER
    2015-06-05 05:37:53 (emacs stderr): 5156:  XInternAtom COLUMN_NUMBER
    2015-06-05 05:37:53 (emacs stderr): 5156:  XInternAtom OWNER_OS
    2015-06-05 05:37:53 (emacs stderr): 5156:  XInternAtom HOST_NAME
    2015-06-05 05:37:53 (emacs stderr): 5156:  XInternAtom USER
    2015-06-05 05:37:53 (emacs stderr): 5156:  XInternAtom CLASS
    2015-06-05 05:37:53 (emacs stderr): 5156:  XInternAtom NAME
    2015-06-05 05:37:53 (emacs stderr): 5156:  XInternAtom SAVE_TARGETS
    2015-06-05 05:37:53 (emacs stderr): 5156: Sending all 84 bytes

-Al

-- 
-----------------------------------------------------------------
a l a n   d.   s a l e w s k i                   [email-masked]
1024D/FA2C3588 EDFA 195F EDF1 0933 1002  6396 7C92 5CB3 FA2C 3588
-----------------------------------------------------------------