From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Clemente Newsgroups: gmane.emacs.bugs Subject: bug#71289: 30.0.50; cmcheckmagic aborts when tty_write_glyphs writes "Garbage collecting..." in some cases Date: Fri, 31 May 2024 17:07:45 +0000 Message-ID: References: <86o78mp6wg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22925"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71289@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 31 19:10:29 2024 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 1sD5lt-0005od-6g for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 May 2024 19:10:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD5lI-0007En-BR; Fri, 31 May 2024 13:09:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD5lH-0007ET-Bu for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 13:09:51 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD5lH-0001BO-1H for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 13:09:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sD5lR-00024B-S4 for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 13:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Clemente Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 May 2024 17:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71289 X-GNU-PR-Package: emacs Original-Received: via spool by 71289-submit@debbugs.gnu.org id=B71289.17171753767898 (code B ref 71289); Fri, 31 May 2024 17:10:01 +0000 Original-Received: (at 71289) by debbugs.gnu.org; 31 May 2024 17:09:36 +0000 Original-Received: from localhost ([127.0.0.1]:55282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD5l2-00023K-9A for submit@debbugs.gnu.org; Fri, 31 May 2024 13:09:36 -0400 Original-Received: from mail-ot1-f46.google.com ([209.85.210.46]:48619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD5kx-000233-0H for 71289@debbugs.gnu.org; Fri, 31 May 2024 13:09:35 -0400 Original-Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-6f8e012e51dso1442643a34.1 for <71289@debbugs.gnu.org>; Fri, 31 May 2024 10:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717175294; x=1717780094; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9me6RDJBB83/is7wgieZuBs4VBqM7N0vrd4tHNbLpco=; b=mNTlSIGOSehoDgdjMnjWZWj4dGodzgZV6FlMIjNKD2LK33bipUjJnFOgCHnpy6vY2F sUgH5giNFatVOavQVzQVstX6W5G+hm4BBSSsOpOcIiE4kmtWsWONZo/+8ddvLZy5fNw5 vlHCHNsz7hMPxz9/dtaKfL4LTEy5zjSGdbiOcgZf6oQ/TSF70PkDHBPYA5cQPwsjkuSt VYx1Ut7+X11JoF3WQ3/x5/CpzqHe+6acobKNJtyjPsY7mqknxI1B3hswHKCk+JwhdM2Q CZK5+yon6vrj6kGiZY8IOC28tK+8/dZGbpPOcR6vLTh9YpbV3j/IT9tCM9f+Cph6Smcq FwWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717175294; x=1717780094; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9me6RDJBB83/is7wgieZuBs4VBqM7N0vrd4tHNbLpco=; b=wqwMl3urAgxEZXKYjNOU2iQReyq3z9E7aHMKiU2DPSzu+cYdbipPahbKhPT1VAxCTv 8bjSRu6pCOiDq/+P/Ny5l2JBF+hRKXoy9jIO4HQLf29DmfYHGjEgPLTSsKmxcwcOVgTH GDldOuOyqHtwIh1wLPSSz+gufBGdQHrjzSs/YAPRFTiTiLOizhgDnf9zX2Z8sY/zviSl ueVuDVn/eXMo+FtfFntiVDgHxDoqbjwVyEERIH6TYpe0L9AaYbBsslYxq96/6v/P2M8U Zm+M2GIad4BhSB/Py9Gg0qBEqgPdhD3V7ql83aUBmxt+UOIErXxjvxTNh5CHmCBEUnBd pZ1g== X-Gm-Message-State: AOJu0YyzElz0MiXOKme0qErtic5TjrhXp3RPEPJ/4/n/v90zgyiIT7BD IYqNgFIKs8py1dAnUxw9M7yG5ysRWQt0lSCqTMPW/P75Tx0Vj2RKQLsMyiSljF171C23yS6tujX GLdha+zPy9NnEnrYn9h+arxOqu9F9Mg== X-Google-Smtp-Source: AGHT+IEvbbOx8sBn+6gkjHd903Ce6v59Hw/Kb0Guv0cP6FnvzxdgHrlgWKnxZOzii498PPEeJRP74KMZzpU7vdpZyd8= X-Received: by 2002:a05:6871:2894:b0:24f:e9e5:c5d9 with SMTP id 586e51a60fabf-2508bddc00emr2745894fac.29.1717175293642; Fri, 31 May 2024 10:08:13 -0700 (PDT) In-Reply-To: <86o78mp6wg.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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286288 Archived-At: > Thanks, but these backtraces are not enough, because they don't > explain why was emacs_abort called. We need to see all the values > involved in this condition: > > if (curX (tty) =3D=3D FrameCols (tty)) > { > if (!MagicWrap (tty) || curY (tty) >=3D FrameRows (tty) - 1) <<<<<<<= <<<< > emacs_abort (); These were the variables just before emacs_abort, and (abort=3D=3D1) when a= borting. At point cmcheckmagic, =C2=BFabort? 0. MagicWrap 1, curY 0, vs. 3 - 1. Now tty has 3 rows, 14 cols At point cmcheckmagic, =C2=BFabort? 0. MagicWrap 1, curY 1, vs. 3 - 1. Now tty has 3 rows, 14 cols At point cmcheckmagic, =C2=BFabort? 1. MagicWrap 1, curY 3, vs. 3 - 1. Now tty has 3 rows, 14 cols I got them by adding: fprintf(stderr, "At point cmcheckmagic, =C2=BFabort? %d. MagicWrap %d, curY %d, vs. %d - 1. Now tty has %d rows, %d cols\n", (!MagicWrap (tty) || curY (tty) >=3D FrameRows (tty) - 1), MagicWrap(tty), curY(tty), FrameRows(tty), FrameRows(tty), FrameCols(tty)); I forgot curX, which is: (gdb) p curX(tty) $1 =3D 14 To reproduce this I had to try many random operations. The last thing I did was increasing the size of an X window showing dired, from very small (1 line, ~10 cols to 3x14); this works well most of the time but this time this happened. Backtrace. (gdb) bt full #0 terminate_due_to_signal (sig=3D6, backtrace_limit=3D40) at emacs.c:443 No locals. #1 0x00005555556bdab0 in emacs_abort () at sysdep.c:2391 No locals. #2 0x000055555566995d in cmcheckmagic (tty=3D0x5555572c4c90) at cm.c:124 No locals. #3 0x000055555566de6f in tty_write_glyphs (f=3D0x555561525f60, string=3D0x5555610141c0, len=3D14) at term.c:819 conversion_buffer =3D 0x55555f7e9160 "x \\ 3 dc dc) (Dired by name Helm Projectile yas) 7:39PM 0.41", ' ' , "`UU" coding =3D 0x555559956cf0 n =3D 14 stringlen =3D 0 tty =3D 0x5555572c4c90 #4 0x0000555555678203 in write_glyphs (f=3D0x555561525f60, string=3D0x555561013f20, len=3D14) at terminal.c:163 No locals. #5 0x000055555559194a in update_frame_line (f=3D0x555561525f60, vpos=3D3, updating_menu_p=3Dfalse) at dispnew.c:5321 obody =3D 0x0 nbody =3D 0x555561013f20 op1 =3D 0x300000011 op2 =3D 0x7fffffff78e0 np1 =3D 0x7ffff549ed90 <__GI___fflush_unlocked+48> nend =3D 0x5555610141c0 tem =3D 0 osp =3D 32767 nsp =3D -34592 begmatch =3D 32767 endmatch =3D -178330144 olen =3D 0 nlen =3D 14 current_matrix =3D 0x555560cad240 desired_matrix =3D 0x5555603cf860 current_row =3D 0x555560c681c8 desired_row =3D 0x55556045e7b8 must_write_whole_line_p =3D true write_spaces_p =3D true colored_spaces_p =3D true #6 0x0000555555590b8d in update_frame_1 (f=3D0x555561525f60, force_p=3Dtrue, inhibit_id_p=3Dfalse, set_cursor_p=3Dtrue, updating_menu_p=3Dfalse) at dispnew.c:5008 current_matrix =3D 0x555560cad240 desired_matrix =3D 0x5555603cf860 i =3D 3 pause_p =3D 85 preempt_count =3D 17 #7 0x000055555558cf9f in update_frame (f=3D0x555561525f60, force_p=3Dtrue, inhibit_hairy_id_p=3Dfalse) at dispnew.c:3346 paused_p =3D false root_window =3D 0x555560baa508 #8 0x00005555555cf876 in redisplay_internal () at xdisp.c:17478 gcscrollbars =3D true f_redisplay_flag =3D true f =3D 0x555561525f60 w =3D 0x555561526388 sw =3D 0x555561526388 fr =3D 0x555561525f60 pending =3D false must_finish =3D false match_p =3D false tlbufpos =3D { charpos =3D 0, bytepos =3D 116 } --Type for more, q to quit, c to continue without paging-- tlendpos =3D { charpos =3D 29241, bytepos =3D 29273 } number_of_visible_frames =3D 7 sf =3D 0x555561525f60 polling_stopped_here =3D true tail =3D XIL(0x5555614f3903) frame =3D XIL(0x555561525f65) MAX_HSCROLL_RETRIES =3D MAX_HSCROLL_RETRIES hscroll_retries =3D 0 MAX_GARBAGED_FRAME_RETRIES =3D MAX_GARBAGED_FRAME_RETRIES garbaged_frame_retries =3D 0 consider_all_windows_p =3D true update_miniwindow_p =3D false count =3D { bytes =3D 2304 } #9 0x00005555555d01aa in redisplay_preserve_echo_area (from_where=3D11) at xdisp.c:17761 count =3D { bytes =3D 2272 } #10 0x00005555557ee631 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_proc=3D0) at process.c:5585 process_skipped =3D false wrapped =3D false channel_start =3D 0 child_fd =3D 6 last_read_channel =3D 13 channel =3D 1024 nfds =3D -1 Available =3D { fds_bits =3D {8768089968, 0 } } Writeok =3D { fds_bits =3D {0 } } check_write =3D true check_delay =3D 1 no_avail =3D true xerrno =3D 4 proc =3D XIL(0xa00000fff) timeout =3D { tv_sec =3D 28, tv_nsec =3D 503054580 } end_time =3D { tv_sec =3D 1717173578, tv_nsec =3D 474082259 } timer_delay =3D { tv_sec =3D 0, tv_nsec =3D 502843472 } got_output_end_time =3D { tv_sec =3D 1717173578, tv_nsec =3D 474082259 } MINIMUM =3D MINIMUM TIMEOUT =3D TIMEOUT FOREVER =3D FOREVER wait =3D TIMEOUT --Type for more, q to quit, c to continue without paging-- got_some_output =3D -1 prev_wait_proc_nbytes_read =3D 0 retry_for_async =3D false count =3D { bytes =3D 2240 } now =3D { tv_sec =3D 1717173549, tv_nsec =3D 971027679 } #11 0x0000555555594f26 in sit_for (timeout=3Dmake_fixnum(30), reading=3Dtrue, display_option=3D1) at dispnew.c:6321 sec =3D 30 nsec =3D 0 do_display =3D true curbuf_eq_winbuf =3D false nbytes =3D 21845 #12 0x0000555555695ae5 in read_char (commandflag=3D1, map=3DXIL(0x555560278023), prev_event=3DXIL(0), used_mouse_menu=3D0x7fffffff966f, end_time=3D0x0) at keyboard.c:2923 tem0 =3D XIL(0x555555770001) timeout =3D 30 count1 =3D { bytes =3D 2208 } delay_level =3D 4 buffer_size =3D 50 c =3D XIL(0) local_getcjmp =3D {{ __jmpbuf =3D {0, -8236620451292018264, 0, 140737168851264, 93825052522836, 0, -8236620451436721752, -2817863054631007832}, __mask_was_saved =3D 0, __saved_mask =3D { __val =3D {93464216335616, 139753184, 140737245531531, 93825002663168, 0, 0, 140737488327872, 93824993653913, 40800, 140737488327952, 93824993660639, 1, 0, 93464225410400, 96, 93825002663168} } }} save_jump =3D {{ __jmpbuf =3D {0, 0, 0, 0, 0, 0, 0, 0}, __mask_was_saved =3D 0, __saved_mask =3D { __val =3D {0 } } }} tem =3D XIL(0x5555557806e9) save =3D XIL(0x67e0) previous_echo_area_message =3D XIL(0) also_record =3D XIL(0) reread =3D false recorded =3D false polling_stopped_here =3D false orig_kboard =3D 0x555560b58160 jmpcount =3D { bytes =3D 2208 }