From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34138: 27.0.50; Delayed display of PDF file images Date: Sun, 20 Jan 2019 19:42:58 +0200 Message-ID: <83zhrv9qe5.fsf@gnu.org> References: <871s58e4gh.fsf@gmx.net> <5C443CB1.3050208@gmx.at> <87h8e3h90z.fsf@gmx.net> <5C4483B7.1060604@gmx.at> <87d0orgz0a.fsf@gmx.net> <837eezbazk.fsf@gnu.org> <878szfgwdu.fsf@gmx.net> <8336pnb9cq.fsf@gnu.org> <874la3gujy.fsf@gmx.net> <831s57b7ev.fsf@gnu.org> <87zhrvfdzu.fsf@gmx.net> NNTP-Posting-Host: ciao.gmane.org X-Trace: ciao.gmane.org 1548006256 72083 195.159.176.228 (20 Jan 2019 17:44:16 GMT) X-Complaints-To: usenet@ciao.gmane.org NNTP-Posting-Date: Sun, 20 Jan 2019 17:44:16 +0000 (UTC) Cc: 34138@debbugs.gnu.org, politza@hochschule-trier.de, tsdh@gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 20 18:44:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1glH8h-000Ibc-IG for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Jan 2019 18:44:07 +0100 Original-Received: from localhost ([127.0.0.1]:42451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glH8q-0005be-GG for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Jan 2019 12:44:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glH8e-0005Zy-0n for bug-gnu-emacs@gnu.org; Sun, 20 Jan 2019 12:44:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glH8c-0002FL-Tf for bug-gnu-emacs@gnu.org; Sun, 20 Jan 2019 12:44:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39867) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1glH8c-0002F6-Qf for bug-gnu-emacs@gnu.org; Sun, 20 Jan 2019 12:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1glH8c-00083i-HU for bug-gnu-emacs@gnu.org; Sun, 20 Jan 2019 12:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Jan 2019 17:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34138 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 34138-submit@debbugs.gnu.org id=B34138.154800620430915 (code B ref 34138); Sun, 20 Jan 2019 17:44:02 +0000 Original-Received: (at 34138) by debbugs.gnu.org; 20 Jan 2019 17:43:24 +0000 Original-Received: from localhost ([127.0.0.1]:39148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glH80-00082Z-93 for submit@debbugs.gnu.org; Sun, 20 Jan 2019 12:43:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glH7y-00082J-2r for 34138@debbugs.gnu.org; Sun, 20 Jan 2019 12:43:22 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glH7s-0001u5-7d; Sun, 20 Jan 2019 12:43:16 -0500 Original-Received: from [176.228.60.248] (port=1348 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1glH7r-0001NB-4W; Sun, 20 Jan 2019 12:43:16 -0500 In-reply-to: <87zhrvfdzu.fsf@gmx.net> (message from Stephen Berman on Sun, 20 Jan 2019 18:14:13 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:154622 Archived-At: > From: Stephen Berman > Cc: rudalics@gmx.at, 34138@debbugs.gnu.org, politza@hochschule-trier.de, tsdh@gnu.org > Date: Sun, 20 Jan 2019 18:14:13 +0100 > > > It means, during the time of the delay, type from the shell prompt: > > > > $ gdb -p PID > > > > where PID is the numeric process-id of the Emacs process; you should > > find that in advance, e.g. by running "ps". Once GDB starts and shows > > its prompt, "(gdb)", type: > > > > (gdb) thread apply all bt > > > > This should show the C-level backtrace. Then: > > > > (gdb) source /path/to/emacs/src/.gdbinit > > (gdb) xbacktrace > > > > The last command should show the Lisp-level backtrace. > > Ah, thanks. I started gdb from the path of the emacs executable and the > Lisp backtrace was shown after typing "thread apply all bt"; Please start GDB from a directory other that the Emacs src directory, I'd like to see the C backtrace that way. > FWIW, while the backtrace was being shown in the shell, the raw PDF > changed to the image display in Emacs. I don't understand how could Emacs be running while GDB was showing the backtrace. It shouldn't happen, because the executable to which GDB is attached is supposed to be stopped in its tracks. What does this show, after you attach GDB and GDB shows its prompt? (gdb) show non-stop It should say that non-stop mode is OFF. > Lisp Backtrace: > "image-size" (0x70824720) > 0x354bf60 PVEC_COMPILED > "gethash" (0x70820b38) > "pdf-cache--data-get" (0x70820d40) > "pdf-cache-number-of-pages" (0x70820f10) > ---Type to continue, or q to quit--- > "terminal-live-p" (0x70820ea8) > "framep-on-display" (0x708210b8) > "overlayp" (0x70824718) > 0x92591e8 PVEC_COMPILED > "overlayp" (0x70824a48) > 0x92591e8 PVEC_COMPILED > "redisplay--update-region-highlight" (0x70824fd0) > "run-hook-with-args" (0x70824fc8) > "ignore" (0x70825310) > "apply" (0x70825308) > 0x9420638 PVEC_COMPILED > "redisplay_internal (C function)" (0x0) This Lisp backtrace contradicts the C backtrace of the main thread: > Thread 1 (Thread 0x7f9109a29bc0 (LWP 5077)): > #0 0x00007f910c590291 in __pselect (nfds=16, readfds=0x7ffc70826670, writefds=0x7ffc708265f0, exceptfds=0x0, timeout=, sigmask=) > at ../sysdeps/unix/sysv/linux/pselect.c:69 > #1 0x00000000005bca5d in really_call_select (arg=arg@entry=0x7ffc70826130) > at /mnt/data/steve/git/emacs-master/src/thread.c:580 > #2 0x0000000000542d88 in flush_stack_call_func (func=func@entry=0x5bca12 , arg=arg@entry=0x7ffc70826130) > at /mnt/data/steve/git/emacs-master/src/alloc.c:5229 > #3 0x00000000005bd24f in thread_select (func=, max_fds=max_fds@entry=16, rfds=rfds@entry=0x7ffc70826670, wfds=, efds=efds@entry=0x0, timeout=timeout@entry=0x7ffc708268c0, sigmask=0x0) > at /mnt/data/steve/git/emacs-master/src/thread.c:610 > #4 0x00000000005d7c64 in xg_select (fds_lim=16, rfds=rfds@entry=0x7ffc70826960,---Type to continue, or q to quit--- > wfds=0x7ffc708268e0, efds=efds@entry=0x0, timeout=timeout@entry=0x7ffc708268c0, sigmask=sigmask@entry=0x0) > at /mnt/data/steve/git/emacs-master/src/xgselect.c:117 > #5 0x000000000059daf3 in wait_reading_process_output (time_limit=time_limit@entry=97, nsecs=nsecs@entry=0, read_kbd=-1, do_display=do_display@entry=true, wait_for_cell=wait_for_cell@entry=XIL(0), wait_proc=wait_proc@entry=0x0, just_wait_proc=0) at /mnt/data/steve/git/emacs-master/src/process.c:5405 > #6 0x0000000000424e63 in sit_for (timeout=timeout@entry=make_number(97), reading=reading@entry=true, display_option=display_option@entry=1) > at /mnt/data/steve/git/emacs-master/src/lisp.h:1056 > #7 0x00000000004f769e in read_char (commandflag=1, map=map@entry=XIL(0x35f3093), prev_event=XIL(0), used_mouse_menu=used_mouse_menu@entry=0x7ffc70826d4b, end_time=end_time@entry=0x0) at /mnt/data/steve/git/emacs-master/src/lisp.h:751 > #8 0x00000000004f81ec in read_key_sequence (keybuf=keybuf@entry=0x7ffc70826e10, prompt=prompt@entry=XIL(0), dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false) > at /mnt/data/steve/git/emacs-master/src/lisp.h:1386 > #9 0x00000000004f9730 in command_loop_1 () > at /mnt/data/steve/git/emacs-master/src/lisp.h:1056 The C backtrace says we are idling, waiting for some input inside pselect, while the Lisp backtrace says we are in the image-size function, which was somehow invoked from pre-redisplay-function. I'm confused... Thanks.