all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pieter van Oostrum <pieter-l@vanoostrum.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 39075@debbugs.gnu.org
Subject: bug#39075: 28.0.50; Emacs hangs on 100% CPU and grows beyond bounds in shell-mode
Date: Sun, 12 Jan 2020 18:11:22 +0100	[thread overview]
Message-ID: <lxa76sk3b9.fsf@cochabamba.vanoostrum.org> (raw)
In-Reply-To: <83y2ue71py.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 11 Jan 2020 11:59:37 +0200")

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Fri, 10 Jan 2020 22:16:58 +0100
>> From: Pieter van Oostrum <pieter@vanoostrum.org>
>> 
>> 1) Emacs -Q
>> 2) M-x shell
>> 3) type some command, and use some filename completions on the way
>> (using TAB).
>> 4) Type a semicolon (;)
>> 
>> Now Emacs hangs, the ; does not appear, and it doesn't react to a C-g typed.
>> It uses 100% CPU and memory grows beyond bounds, eventually just making
>> my whole computer unresponsive.
>
> I cannot reproduce this on GNU/Linux, so it's probably macOS-specific.

It's not so clear what could be MacOS-specific.

I ran it under gdb, and interrupted it several times with C-z in gdb. Most of the stack traces were in the garbage collector, suggesting that it is collecting like crazy. This doesn't surprise me, as it is constantly allocating new memory. The rest of this stack trace doesn't have useful information.

I managed to get a stack trace where it is processing. I haven't analysed these yet, but I include both here.


[-- Attachment #2: stack traces --]
[-- Type: application/octet-stream, Size: 12646 bytes --]

^Z
Thread 3 received signal SIGTSTP, Stopped (user).
0x000000010029c66c in PSEUDOVECTORP (a=XIL(0x1061000bd), code=26)
    at ./lisp.h:1723
1723	}
(gdb) bt
#0  0x000000010029c66c in PSEUDOVECTORP (a=XIL(0x1061000bd), code=26)
    at ./lisp.h:1723
#1  0x000000010029c57a in SUB_CHAR_TABLE_P (a=XIL(0x1061000bd))
    at ./lisp.h:2018
#2  0x000000010029c41b in CHAR_TABLE_REF_ASCII (ct=XIL(0x1060f4b9d), idx=59)
    at ./lisp.h:2036
#3  0x000000010029c275 in CHAR_TABLE_REF (ct=XIL(0x1060f4b9d), idx=59)
    at ./lisp.h:2052
#4  0x00000001002893a4 in char_table_translate (obj=XIL(0x1060f4b9d), ch=59)
    at ./character.h:701
#5  0x000000010028a510 in re_match_2_internal (bufp=0x100a07e28, 
    string1=0x10705f200 "bash-3.2$ (cd ~/TEST/LATEX/FANCYHDR/;", size1=37, 
    string2=0x10705f9e0 "latex", size2=5, pos=36, regs=0x100991098, stop=42)
    at regex-emacs.c:4226
#6  0x0000000100290966 in rpl_re_match_2 (bufp=0x100a07e28, 
    string1=0x10705f200 "bash-3.2$ (cd ~/TEST/LATEX/FANCYHDR/;", size1=37, 
    string2=0x10705f9e0 "latex", size2=5, pos=36, regs=0x100991098, stop=42)
    at regex-emacs.c:3850
#7  0x0000000100277960 in looking_at_1 (string=XIL(0x10ba43fc4), posix=false)
    at search.c:316
#8  0x00000001002774d7 in Flooking_at (regexp=XIL(0x10ba43fc4)) at search.c:352
#9  0x0000000100316094 in funcall_subr (subr=0x100556578, numargs=1, 
    args=0x7ffeefbf7348) at eval.c:2867
#10 0x000000010031469e in Ffuncall (nargs=2, args=0x7ffeefbf7340)
    at eval.c:2794
#11 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x10ba43f84), 
    vector=XIL(0x105978755), maxdepth=make_fixnum(10), 
    args_template=make_fixnum(0), nargs=0, args=0x7ffeefbf8398)
    at bytecode.c:633
#12 0x0000000100316785 in funcall_lambda (fun=XIL(0x1059787f5), nargs=0, 
    arg_vector=0x7ffeefbf8398) at eval.c:2989
#13 0x00000001003146ee in Ffuncall (nargs=1, args=0x7ffeefbf8390)
    at eval.c:2796
#14 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x10ba42df4), 
    vector=XIL(0x10497d6d5), maxdepth=make_fixnum(13), 
    args_template=make_fixnum(256), nargs=1, args=0x7ffeefbf9448)
    at bytecode.c:633
#15 0x0000000100316785 in funcall_lambda (fun=XIL(0x10497d7a5), nargs=1, 
    arg_vector=0x7ffeefbf9440) at eval.c:2989
#16 0x00000001003146ee in Ffuncall (nargs=2, args=0x7ffeefbf9438)
    at eval.c:2796
#17 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x10ba43264), 
    vector=XIL(0x10497dd15), maxdepth=make_fixnum(5), 
    args_template=make_fixnum(0), nargs=0, args=0x7ffeefbfa420)
    at bytecode.c:633
#18 0x0000000100316785 in funcall_lambda (fun=XIL(0x10497dda5), nargs=0, 
    arg_vector=0x7ffeefbfa420) at eval.c:2989
#19 0x00000001003146ee in Ffuncall (nargs=1, args=0x7ffeefbfa418)
--Type <RET> for more, q to quit, c to continue without paging--
    at eval.c:2796
#20 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x10ba42244), 
    vector=XIL(0x10599d7d5), maxdepth=make_fixnum(15), 
    args_template=make_fixnum(0), nargs=0, args=0x7ffeefbfb898)
    at bytecode.c:633
#21 0x0000000100316785 in funcall_lambda (fun=XIL(0x10599d905), nargs=0, 
    arg_vector=0x7ffeefbfb898) at eval.c:2989
#22 0x00000001003146ee in Ffuncall (nargs=1, args=0x7ffeefbfb890)
    at eval.c:2796
#23 0x0000000100315046 in run_hook_with_args (nargs=1, args=0x7ffeefbfb890, 
    funcall=0x1003144b0 <Ffuncall>) at eval.c:2612
#24 0x0000000100315134 in Frun_hook_with_args_until_success (nargs=1, 
    args=0x7ffeefbfb890) at eval.c:2498
#25 0x0000000100315f76 in funcall_subr (subr=0x1005596c8, numargs=1, 
    args=0x7ffeefbfb890) at eval.c:2847
#26 0x000000010031469e in Ffuncall (nargs=2, args=0x7ffeefbfb888)
    at eval.c:2794
#27 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x10ba2c794), 
    vector=XIL(0x1059a2965), maxdepth=make_fixnum(2), 
    args_template=make_fixnum(0), nargs=0, args=0x7ffeefbfc820)
    at bytecode.c:633
#28 0x0000000100316785 in funcall_lambda (fun=XIL(0x1059a2985), nargs=0, 
    arg_vector=0x7ffeefbfc820) at eval.c:2989
#29 0x00000001003146ee in Ffuncall (nargs=1, args=0x7ffeefbfc818)
    at eval.c:2796
#30 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x106228994), 
    vector=XIL(0x104be1815), maxdepth=make_fixnum(3), 
    args_template=make_fixnum(0), nargs=0, args=0x7ffeefbfd7c0)
    at bytecode.c:633
#31 0x0000000100316785 in funcall_lambda (fun=XIL(0x104be1835), nargs=0, 
    arg_vector=0x7ffeefbfd7c0) at eval.c:2989
#32 0x00000001003146ee in Ffuncall (nargs=1, args=0x7ffeefbfd7b8)
    at eval.c:2796
#33 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x1061948b4), 
    vector=XIL(0x1061947b5), maxdepth=make_fixnum(2), 
    args_template=make_fixnum(0), nargs=0, args=0x7ffeefbfe778)
    at bytecode.c:633
#34 0x0000000100316785 in funcall_lambda (fun=XIL(0x10619478d), nargs=0, 
    arg_vector=0x7ffeefbfe778) at eval.c:2989
#35 0x00000001003146ee in Ffuncall (nargs=1, args=0x7ffeefbfe770)
    at eval.c:2796
#36 0x000000010031574f in call0 (fn=XIL(0x575b7d8)) at eval.c:2647
#37 0x00000001001e9fa5 in safe_run_hooks_1 (nargs=2, args=0x7ffeefbfe858)
    at keyboard.c:1775
#38 0x000000010030d3ca in internal_condition_case_n (
    bfun=0x1001e9f50 <safe_run_hooks_1>, nargs=2, args=0x7ffeefbfe858, 
    handlers=XIL(0x30), hfun=0x1001e9fc0 <safe_run_hooks_error>) at eval.c:1435
#39 0x00000001001ccd35 in safe_run_hook_funcall (nargs=2, args=0x7ffeefbfe9f8)
--Type <RET> for more, q to quit, c to continue without paging--
    at keyboard.c:1822
#40 0x0000000100315046 in run_hook_with_args (nargs=2, args=0x7ffeefbfe9f8, 
    funcall=0x1001ccc90 <safe_run_hook_funcall>) at eval.c:2612
#41 0x00000001001c7ba3 in safe_run_hooks (hook=XIL(0xa170)) at keyboard.c:1838
#42 0x00000001001c71b6 in command_loop_1 () at keyboard.c:1477
#43 0x000000010030d0af in internal_condition_case (
    bfun=0x1001c63a0 <command_loop_1>, handlers=XIL(0x90), 
    hfun=0x1001e9a40 <cmd_error>) at eval.c:1355
#44 0x00000001001e9921 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1091
#45 0x000000010030c1e8 in internal_catch (tag=XIL(0xc480), 
    func=0x1001e98f0 <command_loop_2>, arg=XIL(0)) at eval.c:1116
#46 0x00000001001c5415 in command_loop () at keyboard.c:1070
#47 0x00000001001c51e7 in recursive_edit_1 () at keyboard.c:714
#48 0x00000001001c5696 in Frecursive_edit () at keyboard.c:786
#49 0x00000001001c21fe in main (argc=2, argv=0x7ffeefbff648) at emacs.c:2054

Lisp Backtrace:
Cannot access memory at address 0x56e7998
(gdb) 


========================================================================

^Z
Thread 3 received signal SIGTSTP, Stopped (user).
0x00000001002b062d in mem_find (start=0x19533c6c0) at alloc.c:4025
4025	  while (start < p->start || start >= p->end)
(gdb) bt
#0  0x00000001002b062d in mem_find (start=0x19533c6c0) at alloc.c:4025
#1  0x00000001002b353f in mark_object (arg=XIL(0x19b11b7a3)) at alloc.c:6685
#2  0x00000001002b004c in mark_maybe_object (obj=XIL(0x19b11b7a3))
    at alloc.c:4642
#3  0x00000001002b0153 in mark_memory (start=0x7ffeefbf7030, 
    end=0x7ffeefbff608) at alloc.c:4788
#4  0x00000001002b009d in mark_stack (bottom=0x7ffeefbff608 "", 
    end=0x7ffeefbf7030 "@p\277\357\376\177") at alloc.c:4995
#5  0x0000000100421f61 in mark_one_thread (thread=0x100991000) at thread.c:630
#6  0x0000000100420763 in mark_threads_callback (ignore=0x0) at thread.c:661
#7  0x00000001002b01b4 in flush_stack_call_func (
    func=0x1004206c0 <mark_threads_callback>, arg=0x0) at alloc.c:5022
#8  0x00000001004206b4 in mark_threads () at thread.c:668
#9  0x00000001002b20a6 in garbage_collect () at alloc.c:6012
#10 0x00000001002b1d3d in maybe_garbage_collect () at alloc.c:5918
#11 0x000000010030f0ca in maybe_gc () at ./lisp.h:5066
#12 0x000000010031458b in Ffuncall (nargs=2, args=0x7ffeefbf7340)
    at eval.c:2778
#13 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x10ba43f84), 
    vector=XIL(0x105978755), maxdepth=make_fixnum(10), 
    args_template=make_fixnum(0), nargs=0, args=0x7ffeefbf8398)
    at bytecode.c:633
#14 0x0000000100316785 in funcall_lambda (fun=XIL(0x1059787f5), nargs=0, 
    arg_vector=0x7ffeefbf8398) at eval.c:2989
#15 0x00000001003146ee in Ffuncall (nargs=1, args=0x7ffeefbf8390)
    at eval.c:2796
#16 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x10ba42df4), 
    vector=XIL(0x10497d6d5), maxdepth=make_fixnum(13), 
    args_template=make_fixnum(256), nargs=1, args=0x7ffeefbf9448)
    at bytecode.c:633
#17 0x0000000100316785 in funcall_lambda (fun=XIL(0x10497d7a5), nargs=1, 
    arg_vector=0x7ffeefbf9440) at eval.c:2989
#18 0x00000001003146ee in Ffuncall (nargs=2, args=0x7ffeefbf9438)
    at eval.c:2796
#19 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x10ba43264), 
    vector=XIL(0x10497dd15), maxdepth=make_fixnum(5), 
    args_template=make_fixnum(0), nargs=0, args=0x7ffeefbfa420)
    at bytecode.c:633
#20 0x0000000100316785 in funcall_lambda (fun=XIL(0x10497dda5), nargs=0, 
    arg_vector=0x7ffeefbfa420) at eval.c:2989
#21 0x00000001003146ee in Ffuncall (nargs=1, args=0x7ffeefbfa418)
    at eval.c:2796
#22 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x10ba42244), 
    vector=XIL(0x10599d7d5), maxdepth=make_fixnum(15), 
    args_template=make_fixnum(0), nargs=0, args=0x7ffeefbfb898)
    at bytecode.c:633
#23 0x0000000100316785 in funcall_lambda (fun=XIL(0x10599d905), nargs=0, 
    arg_vector=0x7ffeefbfb898) at eval.c:2989
--Type <RET> for more, q to quit, c to continue without paging--
#24 0x00000001003146ee in Ffuncall (nargs=1, args=0x7ffeefbfb890)
    at eval.c:2796
#25 0x0000000100315046 in run_hook_with_args (nargs=1, args=0x7ffeefbfb890, 
    funcall=0x1003144b0 <Ffuncall>) at eval.c:2612
#26 0x0000000100315134 in Frun_hook_with_args_until_success (nargs=1, 
    args=0x7ffeefbfb890) at eval.c:2498
#27 0x0000000100315f76 in funcall_subr (subr=0x1005596c8, numargs=1, 
    args=0x7ffeefbfb890) at eval.c:2847
#28 0x000000010031469e in Ffuncall (nargs=2, args=0x7ffeefbfb888)
    at eval.c:2794
#29 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x10ba2c794), 
    vector=XIL(0x1059a2965), maxdepth=make_fixnum(2), 
    args_template=make_fixnum(0), nargs=0, args=0x7ffeefbfc820)
    at bytecode.c:633
#30 0x0000000100316785 in funcall_lambda (fun=XIL(0x1059a2985), nargs=0, 
    arg_vector=0x7ffeefbfc820) at eval.c:2989
#31 0x00000001003146ee in Ffuncall (nargs=1, args=0x7ffeefbfc818)
    at eval.c:2796
#32 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x106228994), 
    vector=XIL(0x104be1815), maxdepth=make_fixnum(3), 
    args_template=make_fixnum(0), nargs=0, args=0x7ffeefbfd7c0)
    at bytecode.c:633
#33 0x0000000100316785 in funcall_lambda (fun=XIL(0x104be1835), nargs=0, 
    arg_vector=0x7ffeefbfd7c0) at eval.c:2989
#34 0x00000001003146ee in Ffuncall (nargs=1, args=0x7ffeefbfd7b8)
    at eval.c:2796
#35 0x00000001003a50bf in exec_byte_code (bytestr=XIL(0x1061948b4), 
    vector=XIL(0x1061947b5), maxdepth=make_fixnum(2), 
    args_template=make_fixnum(0), nargs=0, args=0x7ffeefbfe778)
    at bytecode.c:633
#36 0x0000000100316785 in funcall_lambda (fun=XIL(0x10619478d), nargs=0, 
    arg_vector=0x7ffeefbfe778) at eval.c:2989
#37 0x00000001003146ee in Ffuncall (nargs=1, args=0x7ffeefbfe770)
    at eval.c:2796
#38 0x000000010031574f in call0 (fn=XIL(0x575b7d8)) at eval.c:2647
#39 0x00000001001e9fa5 in safe_run_hooks_1 (nargs=2, args=0x7ffeefbfe858)
    at keyboard.c:1775
#40 0x000000010030d3ca in internal_condition_case_n (
    bfun=0x1001e9f50 <safe_run_hooks_1>, nargs=2, args=0x7ffeefbfe858, 
    handlers=XIL(0x30), hfun=0x1001e9fc0 <safe_run_hooks_error>) at eval.c:1435
#41 0x00000001001ccd35 in safe_run_hook_funcall (nargs=2, args=0x7ffeefbfe9f8)
    at keyboard.c:1822
#42 0x0000000100315046 in run_hook_with_args (nargs=2, args=0x7ffeefbfe9f8, 
    funcall=0x1001ccc90 <safe_run_hook_funcall>) at eval.c:2612
#43 0x00000001001c7ba3 in safe_run_hooks (hook=XIL(0xa170)) at keyboard.c:1838
#44 0x00000001001c71b6 in command_loop_1 () at keyboard.c:1477
#45 0x000000010030d0af in internal_condition_case (
    bfun=0x1001c63a0 <command_loop_1>, handlers=XIL(0x90), 
--Type <RET> for more, q to quit, c to continue without paging--
    hfun=0x1001e9a40 <cmd_error>) at eval.c:1355
#46 0x00000001001e9921 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1091
#47 0x000000010030c1e8 in internal_catch (tag=XIL(0xc480), 
    func=0x1001e98f0 <command_loop_2>, arg=XIL(0)) at eval.c:1116
#48 0x00000001001c5415 in command_loop () at keyboard.c:1070
#49 0x00000001001c51e7 in recursive_edit_1 () at keyboard.c:714
#50 0x00000001001c5696 in Frecursive_edit () at keyboard.c:786
#51 0x00000001001c21fe in main (argc=2, argv=0x7ffeefbff648) at emacs.c:2054

Lisp Backtrace:
Cannot access memory at address 0x291
(gdb) 

[-- Attachment #3: Type: text/plain, Size: 87 bytes --]


-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]

  reply	other threads:[~2020-01-12 17:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 21:16 bug#39075: 28.0.50; Emacs hangs on 100% CPU and grows beyond bounds in shell-mode Pieter van Oostrum
2020-01-11  9:59 ` Eli Zaretskii
2020-01-12 17:11   ` Pieter van Oostrum [this message]
2020-01-12 17:43     ` Eli Zaretskii
2020-01-13 13:58       ` Pieter van Oostrum
2020-01-15  3:17         ` Michael Welsh Duggan
2020-01-15 19:15           ` Pieter van Oostrum
2020-01-16 19:21             ` Pieter van Oostrum
2020-01-18  9:57               ` Eli Zaretskii
2020-01-19 18:08                 ` Glenn Morris
2020-01-20  0:29                   ` Pieter van Oostrum
2020-01-17 10:57         ` Pieter van Oostrum
2020-01-19 18:11           ` Glenn Morris
2020-01-19 21:41             ` Pieter van Oostrum
2020-01-20  7:47               ` Michael Albinus
2020-01-20 13:12                 ` Pieter van Oostrum
2020-01-20 13:33                   ` Michael Albinus
2020-01-20 14:57 ` Mattias Engdegård

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

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

  git send-email \
    --in-reply-to=lxa76sk3b9.fsf@cochabamba.vanoostrum.org \
    --to=pieter-l@vanoostrum.org \
    --cc=39075@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.