From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Amai Kinono Newsgroups: gmane.emacs.bugs Subject: bug#44448: Fwd: bug#44448: Date: Tue, 17 Aug 2021 02:28:45 +0800 Message-ID: References: <83y298dx56.fsf@gnu.org> <83wnoqde8d.fsf@gnu.org> <838s14bco8.fsf@gnu.org> <83lf539cnt.fsf@gnu.org> <83h7fqaj5i.fsf@gnu.org> <83zgti8sua.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bfa9ee05c9b15f47" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15214"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44448@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 16 20:30:29 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFhNU-0003j1-7A for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Aug 2021 20:30:28 +0200 Original-Received: from localhost ([::1]:59002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFhNT-0002Ce-2d for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Aug 2021 14:30:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFhN4-0002CF-Ll for bug-gnu-emacs@gnu.org; Mon, 16 Aug 2021 14:30:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFhN4-0006UE-Dr for bug-gnu-emacs@gnu.org; Mon, 16 Aug 2021 14:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mFhN4-0003HS-An for bug-gnu-emacs@gnu.org; Mon, 16 Aug 2021 14:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Amai Kinono Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Aug 2021 18:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44448 X-GNU-PR-Package: emacs Original-Received: via spool by 44448-submit@debbugs.gnu.org id=B44448.162913854412498 (code B ref 44448); Mon, 16 Aug 2021 18:30:02 +0000 Original-Received: (at 44448) by debbugs.gnu.org; 16 Aug 2021 18:29:04 +0000 Original-Received: from localhost ([127.0.0.1]:50964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFhM7-0003FV-UL for submit@debbugs.gnu.org; Mon, 16 Aug 2021 14:29:04 -0400 Original-Received: from mail-wm1-f41.google.com ([209.85.128.41]:53061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFhM6-0003Ey-1r for 44448@debbugs.gnu.org; Mon, 16 Aug 2021 14:29:02 -0400 Original-Received: by mail-wm1-f41.google.com with SMTP id f10so9012564wml.2 for <44448@debbugs.gnu.org>; Mon, 16 Aug 2021 11:29:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pqGsftJPyEZFyt+loC0WAjEEifP1kUCxncBBQOSW8+8=; b=sv7WphjE1SzynXWQ3SLDaVSE1gNcH4J2gjxLEwPeebK0HS2FaAldfNxfzn3rqufgWD N9Go2rpC1SaAo35Q/N7r7SLBnP4CXN7UxHMjv+mFl2xT22+rAVSXkmfbZjtxR2JMewak vjNmrNrubc2nGyXNvHeQca+z5w+JnegU+0jILEq3qkfRIVnSI588oTha8B21M9I7gSZ+ eLvlMjodOAA1kmxrWNaRt8mAiqytPb56Sda8jH+lUALKl9lJgq+iT34+Q7+llezhiNdB V/sUyZEmFdeJVjGlYCvDoZ5M4abgQ8gKK0IRBv6W7n4P9xuUvTqeSWlktJr0lF7tpzJ7 tyKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pqGsftJPyEZFyt+loC0WAjEEifP1kUCxncBBQOSW8+8=; b=m6h+/iWsuBtlxw1bgsi/q6zip/1ZtXrI+cl7VdOWoi5MmwpaFXAxtmR0kLDdC28OxK l9BNSZEe5TWmkszHu96QqTalhTjDhgRgsPIwmml47UCeNXlDnlrBJZbLm5eFG0iyNvwc 9iy+7mRBLsUVR2kBC12c16hdb5QOk47WCH8ZkgYrslnh1RN4ePOYrVoZv2KHi5aI6boH JPEGuNGrgbpL/07f2L6YYkI4twZ4/yXX85zf64xboGcSXsZai5Tg5Vd9VflTeekNwmTX EPRCcFC/NGK9Vj8MB7W89IS5S0MUQG2MLYF0ovwYyfM2hBnPUQq1PDJEXptlV9Dv4sqQ 8MnA== X-Gm-Message-State: AOAM530yWKTV0Jl58YpNxJe7H3LnZ9RX4ax4WVxWkAQDzS/z+mW6WXP6 OYEiB2L8FVAulX5A989QY18ZHT25Ls9f/03QKbA= X-Google-Smtp-Source: ABdhPJw6xE8TMxX3t4KKvEmttEU1wl6azPk6sLtH2UiKXJy44Crql6fOZsSSri83Hml7+N89X/LE6LiR1NAbIBmKfD4= X-Received: by 2002:a1c:7706:: with SMTP id t6mr450240wmi.30.1629138536342; Mon, 16 Aug 2021 11:28:56 -0700 (PDT) In-Reply-To: <83zgti8sua.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212056 Archived-At: --000000000000bfa9ee05c9b15f47 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for your help. I've got a backtrace when the bug happens ;) (The story is, there must be some problems of the developing toolchain on m= y distro (tested on 2 PCs running it), so I burn a new ubuntu live CD and built & debugged Emacs on it, works like a charm.) The backtrace: --- Thread 1 "emacs" hit Breakpoint 3, signal_or_quit (error_symbol=3DXIL(0x555555e9b520), data=3DXIL(0xbee0), keyboard_quit=3Dfa= lse) at eval.c:1793 1793 { #0 signal_or_quit (error_symbol=3DXIL(0x555555e9b520), data=3DXIL(0xbee0), keyboard_quit=3Dfalse) at eval.c:1793 #1 0x000055555582d7ad in quit () at eval.c:1783 #2 0x000055555582d68b in process_quit_flag () at eval.c:1730 #3 0x000055555582d6d7 in maybe_quit () at eval.c:1750 #4 0x0000555555839e4a in list_length (list=3DXIL(0)) at fns.c:150 #5 0x000055555590036e in get_logical_fringe_bitmap (w=3D0x5555567d5870, bitmap=3DXIL(0xe430), right_p=3D1, partial_p=3D0) at fringe.c:746 #6 0x0000555555903a0b in update_window_fringes (w=3D0x5555567d5870, keep_current_p=3Dtrue) at fringe.c:1248 #7 0x000055555560a033 in redisplay_window (window=3DXIL(0x5555567d5875), just_this_one_p=3Dfalse) at xdisp.c:19401 #8 0x00005555555feaea in redisplay_window_0 (window=3DXIL(0x5555567d5875)) at xdisp.c:16617 #9 0x000055555582ce52 in internal_condition_case_1 (bfun=3D0x5555555feaa4 , arg=3DXIL(0x5555567d5875), handlers=3DXIL(0x7ffff4f39aeb), hfun=3D0x5555555fea68 ) at eval.c:1502 #10 0x00005555555fea39 in redisplay_windows (window=3DXIL(0x5555567d5875)) = at xdisp.c:16597 #11 0x00005555555fe9eb in redisplay_windows (window=3DXIL(0x55555626ae75)) = at xdisp.c:16591 #12 0x00005555555fd36d in redisplay_internal () at xdisp.c:16065 #13 0x00005555555fe1af in redisplay_preserve_echo_area (from_where=3D8) at xdisp.c:16414 #14 0x000055555576221f in detect_input_pending_run_timers (do_display=3Dtru= e) at keyboard.c:10392 #15 0x00005555558a5422 in wait_reading_process_output (time_limit=3D30, nsecs=3D0, read_kbd=3D-1, do_display=3Dtrue, wait_for_cell=3DXIL(0), wait_p= roc=3D0x0, just_wait_proc=3D0) at process.c:5664 #16 0x00005555555ab5b3 in sit_for (timeout=3Dmake_fixnum(30), reading=3Dtru= e, display_option=3D1) at dispnew.c:6159 #17 0x000055555574d2e1 in read_char (commandflag=3D1, map=3DXIL(0x5555564f7463), prev_event=3DXIL(0), used_mouse_menu=3D0x7ffffff= fd9fd, end_time=3D0x0) at keyboard.c:2784 #18 0x0000555555760119 in read_key_sequence (keybuf=3D0x7fffffffdbe0, prompt=3DXIL(0), dont_downcase_last=3Dfalse, can_return_switch_frame=3Dtrue= , fix_current_buffer=3Dtrue, prevent_redisplay=3Dfalse) at keyboard.c:9569 #19 0x0000555555748958 in command_loop_1 () at keyboard.c:1376 #20 0x000055555582cd6f in internal_condition_case (bfun=3D0x5555557484ba , handlers=3DXIL(0x90), hfun=3D0x555555747906 ) = at eval.c:1478 #21 0x000055555574807b in command_loop_2 (handlers=3DXIL(0x90)) at keyboard.c:1117 #22 0x000055555582be66 in internal_catch (tag=3DXIL(0xe280), func=3D0x555555748050 , arg=3DXIL(0x90)) at eval.c:1198 #23 0x000055555574801b in command_loop () at keyboard.c:1095 #24 0x00005555557473b1 in recursive_edit_1 () at keyboard.c:720 #25 0x00005555557475cd in Frecursive_edit () at keyboard.c:792 #26 0x0000555555743179 in main (argc=3D1, argv=3D0x7fffffffe068) at emacs.c= :2310 Lisp Backtrace: "redisplay_internal (C function)" (0x0) $59 =3D 1 --- 1. I've recorded several backtraces when the bug happens. They look basically the same so I just post one here. To me the update_window_fringes looks suspicious. 2. I tested with mode-line-format being nil or the default value, the backtrace when bug happens look the same, so I believe you've fixed the modeline part. Eli Zaretskii =E4=BA=8E2021=E5=B9=B48=E6=9C=8816=E6=97=A5=E5= =91=A8=E4=B8=80 =E4=B8=8A=E5=8D=882:29=E5=86=99=E9=81=93=EF=BC=9A > > From: Amai Kinono > > Date: Mon, 16 Aug 2021 02:10:33 +0800 > > Cc: "44448@debbugs.gnu.org" <44448@debbugs.gnu.org> > > > > I tried and the bug can happen with breakpoint set. Haven't got a > backtrace though. > > > > I have several questions. > > > > 1. I am not familiar with GDB. I set the breakpoint by "b > signal_or_quit", is that right? > > Yes. > > > 2. When I reached the breakpoint, "p current_buffer" gives me "No symbo= l > "current_buffer" in current > > context." How should I get the point position in current window? > > I don't understand how this could happen. current_buffer is a global > variable, it should be visible everywhere. Is your Emacs built with > the -g3 switch (i.e. CFLAGS includes -g3)? If not, please rebuild > with CFLAGS=3D-g3. > > > 3. When the bug happens, the cursor doesn't jump before hitting the > breakpoint, but immediately after I > > continue using "c". Does this seem right? (I guess so) > > Yes. But you should define commands for the breakpoint, so that Emacs > keeps running. Like this: > > (gdb) break signal_or_quit > (gdb) commands > > backtrace > > print current_buffer->pt > > continue > > end > > > Printing the backtrace is so slow that it freezes my desktop for a long > time (and I don't know if that's > > forever). I need a way to tell if the bug happens before I print the > backtrace (I think that's the 2nd question > > above), so I can make sure I am getting the right backtrace and leave m= y > PC there for a while. > > I don't know how to tell that. In my testing, I kept typing C-g until > I saw the buffer displayed at BOB, then stopped typing C-g and looked > at the last few (2 to 4) backtraces. I think the backtraces that are > interesting are inside redisplay (under the function > redisplay_internal). > > Printing backtrace should be fast enough, it definitely shouldn't > freeze anything. It didn't freeze for me here. > --000000000000bfa9ee05c9b15f47 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for your help. I've got a backtrace when the bu= g happens ;)

(The story is, there must be some problems of the devel= oping toolchain on my
distro (tested on 2 PCs running it), so I burn a n= ew ubuntu live CD and built &
debugged Emacs on it, works like a cha= rm.)

The backtrace:

---

Thread 1 "emacs" hit= Breakpoint 3, signal_or_quit (error_symbol=3DXIL(0x555555e9b520), data=3DX= IL(0xbee0), keyboard_quit=3Dfalse) at eval.c:1793
1793 {
#0 =C2=A0sig= nal_or_quit (error_symbol=3DXIL(0x555555e9b520), data=3DXIL(0xbee0), keyboa= rd_quit=3Dfalse) at eval.c:1793
#1 =C2=A00x000055555582d7ad in quit () a= t eval.c:1783
#2 =C2=A00x000055555582d68b in process_quit_flag () at eva= l.c:1730
#3 =C2=A00x000055555582d6d7 in maybe_quit () at eval.c:1750
= #4 =C2=A00x0000555555839e4a in list_length (list=3DXIL(0)) at fns.c:150
= #5 =C2=A00x000055555590036e in get_logical_fringe_bitmap (w=3D0x5555567d587= 0, bitmap=3DXIL(0xe430), right_p=3D1, partial_p=3D0) at fringe.c:746
#6 = =C2=A00x0000555555903a0b in update_window_fringes (w=3D0x5555567d5870, keep= _current_p=3Dtrue) at fringe.c:1248
#7 =C2=A00x000055555560a033 in redis= play_window (window=3DXIL(0x5555567d5875), just_this_one_p=3Dfalse) at xdis= p.c:19401
#8 =C2=A00x00005555555feaea in redisplay_window_0 (window=3DXI= L(0x5555567d5875)) at xdisp.c:16617
#9 =C2=A00x000055555582ce52 in inter= nal_condition_case_1 (bfun=3D0x5555555feaa4 <redisplay_window_0>, arg= =3DXIL(0x5555567d5875), handlers=3DXIL(0x7ffff4f39aeb), hfun=3D0x5555555fea= 68 <redisplay_window_error>) at eval.c:1502
#10 0x00005555555fea39= in redisplay_windows (window=3DXIL(0x5555567d5875)) at xdisp.c:16597
#1= 1 0x00005555555fe9eb in redisplay_windows (window=3DXIL(0x55555626ae75)) at= xdisp.c:16591
#12 0x00005555555fd36d in redisplay_internal () at xdisp.= c:16065
#13 0x00005555555fe1af in redisplay_preserve_echo_area (from_whe= re=3D8) at xdisp.c:16414
#14 0x000055555576221f in detect_input_pending_= run_timers (do_display=3Dtrue) at keyboard.c:10392
#15 0x00005555558a542= 2 in wait_reading_process_output (time_limit=3D30, nsecs=3D0, read_kbd=3D-1= , do_display=3Dtrue, wait_for_cell=3DXIL(0), wait_proc=3D0x0, just_wait_pro= c=3D0) at process.c:5664
#16 0x00005555555ab5b3 in sit_for (timeout=3Dma= ke_fixnum(30), reading=3Dtrue, display_option=3D1) at dispnew.c:6159
#17= 0x000055555574d2e1 in read_char (commandflag=3D1, map=3DXIL(0x5555564f7463= ), prev_event=3DXIL(0), used_mouse_menu=3D0x7fffffffd9fd, end_time=3D0x0) a= t keyboard.c:2784
#18 0x0000555555760119 in read_key_sequence (keybuf=3D= 0x7fffffffdbe0, prompt=3DXIL(0), dont_downcase_last=3Dfalse, can_return_swi= tch_frame=3Dtrue, fix_current_buffer=3Dtrue, prevent_redisplay=3Dfalse) at = keyboard.c:9569
#19 0x0000555555748958 in command_loop_1 () at keyboard.= c:1376
#20 0x000055555582cd6f in internal_condition_case (bfun=3D0x55555= 57484ba <command_loop_1>, handlers=3DXIL(0x90), hfun=3D0x555555747906= <cmd_error>) at eval.c:1478
#21 0x000055555574807b in command_loo= p_2 (handlers=3DXIL(0x90)) at keyboard.c:1117
#22 0x000055555582be66 in = internal_catch (tag=3DXIL(0xe280), func=3D0x555555748050 <command_loop_2= >, arg=3DXIL(0x90)) at eval.c:1198
#23 0x000055555574801b in command_= loop () at keyboard.c:1095
#24 0x00005555557473b1 in recursive_edit_1 ()= at keyboard.c:720
#25 0x00005555557475cd in Frecursive_edit () at keybo= ard.c:792
#26 0x0000555555743179 in main (argc=3D1, argv=3D0x7fffffffe06= 8) at emacs.c:2310

Lisp Backtrace:
"redisplay_internal (C fu= nction)" (0x0)
$59 =3D 1

---

1. I've recorded sev= eral backtraces when the bug happens. They look basically
=C2=A0 =C2=A0t= he same so I just post one here. To me the update_window_fringes looks
= =C2=A0 =C2=A0suspicious.

2. I tested with mode-line-format being nil= or the default value, the backtrace
=C2=A0 =C2=A0when bug happens look = the same, so I believe you've fixed the modeline part.

Eli Zaretskii= <eliz@gnu.org> =E4=BA=8E2021=E5= =B9=B48=E6=9C=8816=E6=97=A5=E5=91=A8=E4=B8=80 =E4=B8=8A=E5=8D=882:29=E5=86= =99=E9=81=93=EF=BC=9A
> From: Amai Kinono <amaikinono@gmail.com>
> Date: Mon, 16 Aug 2021 02:10:33 +0800
> Cc: "4= 4448@debbugs.gnu.org" <44448@debbugs.gnu.org>
>
> I tried and the bug can happen with breakpoint set. Haven't got a = backtrace though.
>
> I have several questions.
>
> 1. I am not familiar with GDB. I set the breakpoint by "b signal_= or_quit", is that right?

Yes.

> 2. When I reached the breakpoint, "p current_buffer" gives m= e "No symbol "current_buffer" in current
> context." How should I get the point position in current window?<= br>
I don't understand how this could happen.=C2=A0 current_buffer is a glo= bal
variable, it should be visible everywhere.=C2=A0 Is your Emacs built with the -g3 switch (i.e. CFLAGS includes -g3)?=C2=A0 If not, please rebuild
with CFLAGS=3D-g3.

> 3. When the bug happens, the cursor doesn't jump before hitting th= e breakpoint, but immediately after I
> continue using "c". Does this seem right? (I guess so)

Yes.=C2=A0 But you should define commands for the breakpoint, so that Emacs=
keeps running.=C2=A0 Like this:

=C2=A0 (gdb) break signal_or_quit
=C2=A0 (gdb) commands
=C2=A0 =C2=A0 > backtrace
=C2=A0 =C2=A0 > print current_buffer->pt
=C2=A0 =C2=A0 > continue
=C2=A0 =C2=A0 > end

> Printing the backtrace is so slow that it freezes my desktop for a lon= g time (and I don't know if that's
> forever). I need a way to tell if the bug happens before I print the b= acktrace (I think that's the 2nd question
> above), so I can make sure I am getting the right backtrace and leave = my PC there for a while.

I don't know how to tell that.=C2=A0 In my testing, I kept typing C-g u= ntil
I saw the buffer displayed at BOB, then stopped typing C-g and looked
at the last few (2 to 4) backtraces.=C2=A0 I think the backtraces that are<= br> interesting are inside redisplay (under the function
redisplay_internal).

Printing backtrace should be fast enough, it definitely shouldn't
freeze anything.=C2=A0 It didn't freeze for me here.
--000000000000bfa9ee05c9b15f47--