all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
@ 2021-08-15  2:46 Matt Beshara
  2021-08-15  7:36 ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Matt Beshara @ 2021-08-15  2:46 UTC (permalink / raw)
  To: 50061

From emacs -Q:
 1. M-x eww RET
 2. mfa.pw/brave-new-world.xml RET
 3. C-x h
 4. M-w
 5. C-x b *scratch* RET
 6. (require 'savehist) C-j
 7. (setq savehist-additional-variables '(kill-ring)) C-j
 8. (savehist-save) C-j
    At this point ‘savehist-save’ will work as intended, even with 
    the
    large amount of XML in the kill ring.
 9. C-x b *eww* RET
10. M-x nxml-mode RET
11. C-x h
12. M-w
13. C-x b *scratch* RET
14. (savehist-save) C-j
    Here is where Emacs hangs.  The Emacs process’s CPU usage goes 
    to
    100%, and it starts consuming greater and greater amounts of
    memory.

Here is the output I get from ‘bt all’ after attaching lldb to the
process while it is in this state:

* thread #1, queue = 'com.apple.main-thread', stop reason = signal 
  SIGSTOP
  * frame #0: 0x000000010b933725 
  Emacs`print_object(obj=0x0000000002f9a7f0, 
  printcharfun=0x0000000000000000, escapeflag=true) at 
  print.c:1901:37 [opt]
    frame #1: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa4ed93, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #2: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa4ed53, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #3: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa4f4f3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #4: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caaaa823, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #5: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caaaa7d3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #6: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caaaa8f3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #7: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caaaa663, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #8: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa89333, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #9: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caaaa6a3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #10: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caaaa443, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #11: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa70603, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #12: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caaaa473, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #13: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa59273, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #14: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1ca942f63, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #15: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1ca942ef3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #16: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1ca942c43, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #17: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa12723, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #18: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa12313, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #19: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa12183, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #20: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa11653, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #21: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa181f3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #22: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa18153, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #23: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa14423, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #24: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa53053, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #25: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa9b8b3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #26: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caab7e93, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #27: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caab7ac3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #28: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caab7aa3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #29: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caab9103, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #30: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1cc1e7fb3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #31: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1cc1e7f83, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #32: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1cc1e8ae3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #33: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1cb8abd63, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #34: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1cc1df053, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #35: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1ca8da613, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #36: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa5da93, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #37: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa98253, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #38: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caa9b913, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #39: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caab7d63, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #40: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caab7c13, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #41: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caab7bd3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #42: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caaa74f3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #43: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caaa7003, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #44: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #45: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc4ac14d, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #46: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caabaac3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #47: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #48: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc42d8c5, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #49: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #50: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc437135, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #51: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #52: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc4933f5, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #53: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #54: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc493465, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #55: 0x000000010b9344a3 
    Emacs`print_object(obj=<unavailable>, 
    printcharfun=0x0000000000000000, escapeflag=true) at print.c:0 
    [opt]
    frame #56: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caac45e3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #57: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #58: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc4371a5, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #59: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #60: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc437215, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #61: 0x000000010b9344a3 
    Emacs`print_object(obj=<unavailable>, 
    printcharfun=0x0000000000000000, escapeflag=true) at print.c:0 
    [opt]
    frame #62: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caaca233, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #63: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #64: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc4f93c5, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #65: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caac2063, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #66: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #67: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc42f57d, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #68: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #69: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc42f5ed, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #70: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caac70f3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #71: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #72: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc49629d, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #73: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #74: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc4963ed, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #75: 0x000000010b9344a3 
    Emacs`print_object(obj=<unavailable>, 
    printcharfun=0x0000000000000000, escapeflag=true) at print.c:0 
    [opt]
    frame #76: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caacdc13, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #77: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #78: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc4357d5, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #79: 0x000000010b9359e4 
    Emacs`print_vectorlike(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>, 
    buf=<unavailable>) at print.c:1807:6 [opt]
    frame #80: 0x000000010b933900 
    Emacs`print_object(obj=0x00007fe1cc4969ed, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2218:11 [opt]
    frame #81: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caaccee3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #82: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1cc46f443, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #83: 0x000000010b97a9b4 
    Emacs`traverse_intervals(tree=0x00007fe1ca85dad8, 
    position=2115, function=(Emacs`print_interval at 
    print.c:2247), arg=0x0000000000000000) at intervals.c:257:7 
    [opt]
    frame #84: 0x000000010b97a987 
    Emacs`traverse_intervals(tree=0x00007fe1ca85d9f8, 
    position=2063, function=(Emacs`print_interval at 
    print.c:2247), arg=0x0000000000000000) at intervals.c:254:7 
    [opt]
    frame #85: 0x000000010b97a987 
    Emacs`traverse_intervals(tree=0x00007fe1ca8ab780, 
    position=2063, function=(Emacs`print_interval at 
    print.c:2247), arg=0x0000000000000000) at intervals.c:254:7 
    [opt]
    frame #86: 0x000000010b97a987 
    Emacs`traverse_intervals(tree=0x00007fe1ca8ab4e0, position=0, 
    function=(Emacs`print_interval at print.c:2247), 
    arg=0x0000000000000000) at intervals.c:254:7 [opt]
    frame #87: 0x000000010b97a987 
    Emacs`traverse_intervals(tree=0x00007fe1ca961270, position=0, 
    function=(Emacs`print_interval at print.c:2247), 
    arg=0x0000000000000000) at intervals.c:254:7 [opt]
    frame #88: 0x000000010b97a987 
    Emacs`traverse_intervals(tree=0x00007fe1ca961030, position=0, 
    function=(Emacs`print_interval at print.c:2247), 
    arg=0x0000000000000000) at intervals.c:254:7 [opt]
    frame #89: 0x000000010b97a987 
    Emacs`traverse_intervals(tree=0x00007fe1ca960ee0, position=0, 
    function=(Emacs`print_interval at print.c:2247), 
    arg=0x0000000000000000) at intervals.c:254:7 [opt]
    frame #90: 0x000000010b97a987 
    Emacs`traverse_intervals(tree=0x00007fe1caa552a0, position=0, 
    function=(Emacs`print_interval at print.c:2247), 
    arg=0x0000000000000000) at intervals.c:254:7 [opt]
    frame #91: 0x000000010b97a987 
    Emacs`traverse_intervals(tree=0x00007fe1caa54dc0, position=0, 
    function=(Emacs`print_interval at print.c:2247), 
    arg=0x0000000000000000) at intervals.c:254:7 [opt]
    frame #92: 0x000000010b97a987 
    Emacs`traverse_intervals(tree=0x00007fe1caa61e30, position=0, 
    function=(Emacs`print_interval at print.c:2247), 
    arg=0x0000000000000000) at intervals.c:254:7 [opt]
    frame #93: 0x000000010b97a987 
    Emacs`traverse_intervals(tree=0x00007fe1ca8fde00, position=0, 
    function=(Emacs`print_interval at print.c:2247), 
    arg=0x0000000000000000) at intervals.c:254:7 [opt]
    frame #94: 0x000000010b97a987 
    Emacs`traverse_intervals(tree=0x00007fe1cabb8600, position=0, 
    function=(Emacs`print_interval at print.c:2247), 
    arg=0x0000000000000000) at intervals.c:254:7 [opt]
    frame #95: 0x000000010b97a987 
    Emacs`traverse_intervals(tree=0x00007fe1ca8e7b50, position=0, 
    function=(Emacs`print_interval at print.c:2247), 
    arg=0x0000000000000000) at intervals.c:254:7 [opt]
    frame #96: 0x000000010b9343f2 
    Emacs`print_object(obj=<unavailable>, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2063:8 [opt]
    frame #97: 0x000000010b933c63 
    Emacs`print_object(obj=0x00007fe1caac65f3, 
    printcharfun=0x0000000000000000, escapeflag=true) at 
    print.c:2192:8 [opt]
    frame #98: 0x000000010b9309e0 Emacs`print(obj=<unavailable>, 
    printcharfun=<unavailable>, escapeflag=<unavailable>) at 
    print.c:650:3 [opt] [artificial]
    frame #99: 0x000000010b93073b 
    Emacs`Fprin1(object=0x00007fe1caac65f3, 
    printcharfun=<unavailable>) at print.c:651:3 [opt]
    frame #100: 0x000000010b911871 
    Emacs`funcall_subr(subr=0x000000010ba4a018, numargs=2, 
    args=<unavailable>) at eval.c:3128:19 [opt]
    frame #101: 0x000000010b910e5f 
    Emacs`Ffuncall(nargs=<unavailable>, args=<unavailable>) at 
    eval.c:3051:11 [opt]
    frame #102: 0x000000015543b2ab 
    savehist-b722b772-6be6c4f8.eln`F73617665686973742d7072696e7461626c65_savehist_printable_0 
    + 603
    frame #103: 0x000000010b91187d 
    Emacs`funcall_subr(subr=0x00007fe1cc4bb288, numargs=1, 
    args=<unavailable>) at eval.c:3126:19 [opt]
    frame #104: 0x000000010b910e5f 
    Emacs`Ffuncall(nargs=<unavailable>, args=<unavailable>) at 
    eval.c:3051:11 [opt]
    frame #105: 0x000000015543a5fb 
    savehist-b722b772-6be6c4f8.eln`F73617665686973742d73617665_savehist_save_0 
    + 987
    frame #106: 0x000000010b90c59b 
    Emacs`eval_sub(form=<unavailable>) at eval.c:0 [opt]
    frame #107: 0x000000010b90ca0d 
    Emacs`Fprogn(body=0x0000000000000000) at eval.c:471:13 [opt]
    frame #108: 0x000000010b90c5b2 
    Emacs`eval_sub(form=<unavailable>) at eval.c:0 [opt]
    frame #109: 0x000000010b9103ca 
    Emacs`Feval(form=0x00007fe1cb9a0283, lexical=<unavailable>) at 
    eval.c:2355:28 [opt]
    frame #110: 0x000000010b911871 
    Emacs`funcall_subr(subr=0x000000010ba46b98, numargs=2, 
    args=<unavailable>) at eval.c:3128:19 [opt]
    frame #111: 0x000000010b910e5f 
    Emacs`Ffuncall(nargs=<unavailable>, args=<unavailable>) at 
    eval.c:3051:11 [opt]
    frame #112: 0x000000010b9571e2 
    Emacs`exec_byte_code(bytestr=<unavailable>, 
    vector=0x000000010eb5299d, maxdepth=<unavailable>, 
    args_template=<unavailable>, nargs=1, args=<unavailable>) at 
    bytecode.c:632:12 [opt]
    frame #113: 0x000000010b910def 
    Emacs`Ffuncall(nargs=<unavailable>, args=<unavailable>) at 
    eval.c:0:4 [opt]
    frame #114: 0x000000010b9571e2 
    Emacs`exec_byte_code(bytestr=<unavailable>, 
    vector=0x000000010eb5290d, maxdepth=<unavailable>, 
    args_template=<unavailable>, nargs=1, args=<unavailable>) at 
    bytecode.c:632:12 [opt]
    frame #115: 0x000000010b910def 
    Emacs`Ffuncall(nargs=<unavailable>, args=<unavailable>) at 
    eval.c:0:4 [opt]
    frame #116: 0x000000010b9571e2 
    Emacs`exec_byte_code(bytestr=<unavailable>, 
    vector=0x000000010eb5287d, maxdepth=<unavailable>, 
    args_template=<unavailable>, nargs=1, args=<unavailable>) at 
    bytecode.c:632:12 [opt]
    frame #117: 0x000000010b910def 
    Emacs`Ffuncall(nargs=<unavailable>, args=<unavailable>) at 
    eval.c:0:4 [opt]
    frame #118: 0x000000010b9099b9 
    Emacs`Ffuncall_interactively(nargs=<unavailable>, 
    args=<unavailable>) at callint.c:260:32 [opt]
    frame #119: 0x000000010b910e5f 
    Emacs`Ffuncall(nargs=<unavailable>, args=<unavailable>) at 
    eval.c:3051:11 [opt]
    frame #120: 0x000000010b90afa3 
    Emacs`Fcall_interactively(function=0x0000000002ced1b0, 
    record_flag=0x0000000000000000, keys=0x00007fe1cc498895) at 
    callint.c:791:21 [opt]
    frame #121: 0x000000010b911891 
    Emacs`funcall_subr(subr=0x000000010ba461e8, numargs=3, 
    args=<unavailable>) at eval.c:3131:19 [opt]
    frame #122: 0x000000010b910e5f 
    Emacs`Ffuncall(nargs=<unavailable>, args=<unavailable>) at 
    eval.c:3051:11 [opt]
    frame #123: 0x000000010b9571e2 
    Emacs`exec_byte_code(bytestr=<unavailable>, 
    vector=0x000000010e964cfd, maxdepth=<unavailable>, 
    args_template=<unavailable>, nargs=1, args=<unavailable>) at 
    bytecode.c:632:12 [opt]
    frame #124: 0x000000010b910def 
    Emacs`Ffuncall(nargs=<unavailable>, args=<unavailable>) at 
    eval.c:0:4 [opt]
    frame #125: 0x000000010b9114cc Emacs`call1(fn=<unavailable>, 
    arg1=<unavailable>) at eval.c:2911:10 [opt]
    frame #126: 0x000000010b88506e Emacs`command_loop_1 at 
    keyboard.c:1489:13 [opt]
    frame #127: 0x000000010b90ede7 
    Emacs`internal_condition_case(bfun=(Emacs`command_loop_1 at 
    keyboard.c:1262), handlers=0x0000000000000090, 
    hfun=(Emacs`cmd_error at keyboard.c:925)) at eval.c:1478:25 
    [opt]
    frame #128: 0x000000010b88489e 
    Emacs`command_loop_2(handlers=0x0000000000000090) at 
    keyboard.c:1117:11 [opt]
    frame #129: 0x000000010b90e3fe 
    Emacs`internal_catch(tag=0x000000000000de60, 
    func=<unavailable>, arg=<unavailable>) at eval.c:1198:25 [opt]
    frame #130: 0x000000010b9e0b78 Emacs`command_loop.cold.1 + 72
    frame #131: 0x000000010b884166 Emacs`command_loop at 
    keyboard.c:1092:5 [opt]
    frame #132: 0x000000010b884076 Emacs`recursive_edit_1 at 
    keyboard.c:720:9 [opt]
    frame #133: 0x000000010b8842eb Emacs`Frecursive_edit at 
    keyboard.c:792:3 [opt]
    frame #134: 0x000000010b882e7c Emacs`main(argc=<unavailable>, 
    argv=0x00007ffee4451928) at emacs.c:2310:3 [opt]
    frame #135: 0x00007fff5efd43d5 libdyld.dylib`start + 1
    frame #136: 0x00007fff5efd43d5 libdyld.dylib`start + 1
  thread #3, name = 'gmain'
    frame #0: 0x00007fff5f11136a libsystem_kernel.dylib`poll + 10
    frame #1: 0x000000010d84c9f6 
    libglib-2.0.0.dylib`g_main_context_iterate + 422
    frame #2: 0x000000010d84cb06 
    libglib-2.0.0.dylib`g_main_context_iteration + 102
    frame #3: 0x000000010d84eb86 
    libglib-2.0.0.dylib`glib_worker_main + 54
    frame #4: 0x000000010d87aec2 
    libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #5: 0x00007fff5f1c82eb 
    libsystem_pthread.dylib`_pthread_body + 126
    frame #6: 0x00007fff5f1cb249 
    libsystem_pthread.dylib`_pthread_start + 66
    frame #7: 0x00007fff5f1c740d 
    libsystem_pthread.dylib`thread_start + 13
  thread #5
    frame #0: 0x00007fff5f110616 libsystem_kernel.dylib`__select + 
    10
    frame #1: 0x000000010b9a74c2 Emacs`-[EmacsApp 
    fd_handler:](self=<unavailable>, _cmd=<unavailable>, 
    unused=<unavailable>) at nsterm.m:5872:20 [opt]
    frame #2: 0x00007fff3524d9a2 Foundation`__NSThread__start__ + 
    1194
    frame #3: 0x00007fff5f1c82eb 
    libsystem_pthread.dylib`_pthread_body + 126
    frame #4: 0x00007fff5f1cb249 
    libsystem_pthread.dylib`_pthread_start + 66
    frame #5: 0x00007fff5f1c740d 
    libsystem_pthread.dylib`thread_start + 13
  thread #8, name = 'com.apple.NSEventThread'
    frame #0: 0x00007fff5f10921a 
    libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff5f109768 libsystem_kernel.dylib`mach_msg + 
    60
    frame #2: 0x00007fff32feee0e 
    CoreFoundation`__CFRunLoopServiceMachPort + 328
    frame #3: 0x00007fff32fee37c CoreFoundation`__CFRunLoopRun + 
    1612
    frame #4: 0x00007fff32fedade 
    CoreFoundation`CFRunLoopRunSpecific + 455
    frame #5: 0x00007fff305eb4a2 AppKit`_NSEventThread + 175
    frame #6: 0x00007fff5f1c82eb 
    libsystem_pthread.dylib`_pthread_body + 126
    frame #7: 0x00007fff5f1cb249 
    libsystem_pthread.dylib`_pthread_start + 66
    frame #8: 0x00007fff5f1c740d 
    libsystem_pthread.dylib`thread_start + 13
  thread #81
    frame #0: 0x00007fff5f1c73f0 
    libsystem_pthread.dylib`start_wqthread
  thread #86
    frame #0: 0x0000000000000000


In GNU Emacs 28.0.50 (build 4, x86_64-apple-darwin18.7.0, NS 
appkit-1671.60 Version 10.14.6 (Build 18G9216))
 of 2021-08-15 built on Dhamma.local
Repository revision: 31ab12e26168c272b291fe91c009cc53b3e55492
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1671
System Description:  Mac OS X 10.14.6

Configured using:
 'configure --with-sound=no --with-x-toolkit=no --with-json
 --without-compress-install --with-native-compilation'
Configured features:
ACL DBUS GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES 
NATIVE_COMP
NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS 
XIM
ZLIB
Important settings:
  value of $LANG: en_AU.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Info

Minor modes in effect:
  windmove-mode: t
  which-key-mode: t
  vertico-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  display-time-mode: t
  pdf-occur-global-minor-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  ace-window-display-mode: t
  save-place-mode: t
  savehist-mode: t
  show-paren-mode: t
  recentf-mode: t
  minibuffer-depth-indicate-mode: t
  marginalia-mode: t
  isearch-mb-mode: t
  flyspell-lazy-mode: t
  electric-pair-mode: t
  diredfl-global-mode: t
  diff-hl-flydiff-mode: t
  global-diff-hl-mode: t
  global-aggressive-indent-mode: t
  global-so-long-mode: t
  global-display-line-numbers-mode: t
  delete-selection-mode: t
  global-auto-revert-mode: t
  shell-dirtrack-mode: t
  auto-compile-on-load-mode: t
  auto-compile-on-save-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-quote-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-history-mode: t
  tab-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  window-divider-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/matt/.emacs.d/elpa/magit-20210806.2014/magit-section-pkg 
hides 
/Users/matt/.emacs.d/elpa/magit-section-20210806.1607/magit-section-pkg
/Users/matt/.emacs.d/elpa/password-store-20200328.1214/password-store 
hides /usr/local/share/emacs/site-lisp/pass/password-store
/Users/matt/.emacs.d/elpa/transient-20210723.1601/transient hides 
/Applications/Emacs.app/Contents/Resources/lisp/transient

Features:
(shadow epa-file emacsbug em-unix em-term em-script em-prompt 
em-ls
em-hist em-pred em-glob em-dirs esh-var em-cmpl em-basic em-banner
em-alias esh-mode network-stream url-cache magit-extras tabify 
help-fns
radix-tree cl-print misearch multi-isearch reposition tramp-cache
tramp-sh octave-expansions octave lua-mode ol-eww ol-rmail ol-mhe 
ol-irc
ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage 
dframe
ol-docview ol-bibtex bibtex ol-bbdb ol-w3m dired-aux bug-reference
pdf-sync pdf-annot pdf-outline pdf-links pdf-history rng-cmpct
modus-operandi-theme subword-mode-expansions cap-words superword 
subword
debbugs soap-client url-http url-auth url-gw rng-xsd xsd-regexp 
diminish
mfa-bind mfa-ztree ztree ztree-diff ztree-diff-model ztree-dir
ztree-view ztree-protocol ztree-util mfa-xref mfa-windmove 
windmove
mfa-whitespace whitespace mfa-which-key which-key mfa-wgrep 
mfa-vterm
mfa-vertico consult-vertico vertico mfa-vdiff-magit vdiff-magit
magit-ediff mfa-vdiff vdiff hydra lv mfa-undo-tree undo-tree 
mfa-tramp
tramp tramp-loaddefs trampver tramp-integration files-x 
tramp-compat
ls-lisp mfa-tab-bar time mfa-symbol-overlay symbol-overlay mfa-rg 
rg
rg-info-hack rg-menu rg-ibuffer ibuf-macs rg-result wgrep-rg wgrep
rg-history rg-header mfa-pdf-tools pdf-occur ibuf-ext tablist
tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch
let-alist pdf-misc pdf-tools pdf-view pdf-cache pdf-info pdf-util
pdf-macs mfa-password-store mfa-passmm passmm password-store
auth-source-pass mfa-mu4e mu4e mu4e-org mu4e-main mu4e-view
mu4e-view-gnus gnus-art mm-uu mml2015 mm-view mml-smime smime dig
gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud
nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601 
gnus-spec
gnus-int gnus-range gnus-win mu4e-view-common mu4e-headers 
mu4e-compose
mu4e-context mu4e-draft mu4e-actions rfc2368 mu4e-mark mu4e-proc
mu4e-utils mu4e-lists mu4e-message flow-fill hl-line mu4e-vars 
mu4e-meta
mfa-mpv mpv tq org-timer org-clock mfa-modus-themes modus-themes 
mfa-man
man mfa-magit magit-bookmark magit-submodule magit-obsolete 
magit-blame
magit-stash magit-reflog magit-bisect magit-push magit-pull 
magit-fetch
magit-clone magit-remote magit-commit magit-sequence magit-notes
magit-worktree magit-tag magit-merge magit-branch magit-reset
magit-files magit-refs magit-status magit magit-repos magit-apply
magit-wip magit-log magit-diff smerge-mode git-commit log-edit 
add-log
magit-core magit-autorevert magit-margin magit-transient 
magit-process
with-editor magit-mode transient magit-git magit-section benchmark
magit-utils which-func ido crm mfa-info mfa-exwm exwm-systemtray
xcb-systemtray xcb-xembed exwm-randr xcb-randr exwm exwm-input
xcb-keysyms exwm-manage exwm-floating xcb-cursor xcb-render 
exwm-layout
exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xkb xcb-xproto
xcb-types xcb-debug mfa-embark embark-consult embark mfa-elpher 
ffap
socks nsm elpher mfa-elfeed elfeed-show elfeed-search vc-mtn 
vc-bzr
vc-src vc-sccs vc-svn vc-cvs vc-rcs message rmc rfc822 mml mml-sec 
epa
epg epg-config mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader elfeed-csv elfeed elfeed-curl elfeed-log elfeed-db 
elfeed-lib
xml-query mfa-eglot eglot array jsonrpc ert debug backtrace 
flymake-proc
flymake mfa-diacritics mfa-doc-view doc-view jka-compr image-mode 
exif
mfa-desktop desktop frameset mfa-dabbrev dabbrev mfa-consult
consult-xref consult mfa-calendar mfa-avy mfa-ace-window 
ace-window
mfa-ace-link ace-link avy saveplace savehist rotate re-builder
rainbow-delimiters rfc-mode pinentry paren foldout org-noter
prot-orderless orderless nxml-mode-expansions rng-nxml rng-valid 
rng-loc
rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn 
nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-enc xmltok nov 
recentf
tree-widget the-org-mode-expansions org-element avl-tree generator 
org
ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote
org-src ob-comint org-pcomplete org-list org-faces org-entities 
noutline
outline org-version ob-emacs-lisp ob-core ob-eval org-table ol 
org-keys
org-compat org-macs org-loaddefs format-spec cal-menu calendar
cal-loaddefs bookmark esxml-query multiple-cursors
mc-separate-operations rectangular-region-mode mc-mark-pop 
mc-edit-lines
mc-hide-unmatched-lines-mode mc-mark-more mc-cycle-cursors
multiple-cursors-core rect move-text mb-depth mhtml-mode
css-mode-expansions css-mode smie html-mode-expansions sgml-mode
marginalia js-mode-expansions js imenu cc-mode-expansions cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine 
cc-vars
cc-defs isearch-mb impatient-mode htmlize simple-httpd ibuffer
ibuffer-loaddefs hideshow grep gnutls form-feed flyspell-lazy
flyspell-correct flyspell ispell expand-region 
text-mode-expansions
er-basic-expansions expand-region-core expand-region-custom 
prot-eww
prot-pulse pulse prot-common eww xdg url-queue shr kinsoku svg xml 
dom
puny mm-url gnus nnheader gnus-util rmail rmail-loaddefs time-date
eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module
esh-groups esh-util enriched facemenu elec-pair ediff ediff-merg
ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util
dumb-jump popup s xref project display-fill-column-indicator 
diredfl
dired-subtree dired-narrow dired-hacks-utils dash dired-x
diff-hl-flydiff diff diff-hl vc-hg vc-git log-view pcvs-util 
vc-dir ewoc
vc vc-dispatcher diff-mode cus-edit pp cus-load wid-edit calc
calc-loaddefs calc-macs apropos aggressive-indent lisp-mnt 
mail-parse
rfc2231 so-long display-line-numbers delsel autorevert filenotify 
server
anaphora mfa nush nu advice cl nonsense smtpmail sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils regsearch 
thingatpt
aside-dired dired dired-loaddefs aside-context aside-vterm vterm 
derived
face-remap compile text-property-search color term disp-table 
shell
pcomplete ehelp comint ansi-color ring find-func vterm-module 
term/xterm
xterm aside-hook-functions aside edmacro kmacro info package 
browse-url
url url-proxy url-privacy url-expand url-methods url-history 
url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source 
eieio
eieio-core eieio-loaddefs password-cache json map url-vars 
auto-compile
comp comp-cstr warnings subr-x rx cl-seq cl-extra help-mode 
easy-mmode
packed cl-macs pcase cl-loaddefs cl-lib seq byte-opt gv bytecomp
byte-compile cconv iso-transl tooltip eldoc electric uniquify 
ediff-hook
vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize
mule-util term/common-win tool-bar dnd fontset image regexp-opt 
fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch 
easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian 
utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese 
eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic 
indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice 
button
loaddefs faces cus-face macroexp files window text-properties 
overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind kqueue cocoa 
ns
lcms2 multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 3345093 414274)
 (symbols 48 83859 2)
 (strings 32 286646 14922)
 (string-bytes 1 11335765)
 (vectors 16 118575)
 (vector-slots 8 2919333 305282)
 (floats 8 2527 858)
 (intervals 56 446349 1375)
 (buffers 992 130))





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15  2:46 bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer Matt Beshara
@ 2021-08-15  7:36 ` Eli Zaretskii
  2021-08-15  8:37   ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2021-08-15  7:36 UTC (permalink / raw)
  To: Matt Beshara; +Cc: 50061

> From: Matt Beshara <m@mfa.pw>
> Date: Sun, 15 Aug 2021 12:46:09 +1000
> 
> >From emacs -Q:
>  1. M-x eww RET
>  2. mfa.pw/brave-new-world.xml RET
>  3. C-x h
>  4. M-w
>  5. C-x b *scratch* RET
>  6. (require 'savehist) C-j
>  7. (setq savehist-additional-variables '(kill-ring)) C-j
>  8. (savehist-save) C-j
>     At this point ‘savehist-save’ will work as intended, even with 
>     the
>     large amount of XML in the kill ring.
>  9. C-x b *eww* RET
> 10. M-x nxml-mode RET
> 11. C-x h
> 12. M-w
> 13. C-x b *scratch* RET
> 14. (savehist-save) C-j
>     Here is where Emacs hangs.  The Emacs process’s CPU usage goes 
>     to
>     100%, and it starts consuming greater and greater amounts of
>     memory.

nXML puts a lot of its private text properties on the text.  My guess
is that producing a printed representation for that consumes
inordinate amounts of memory.  For me, Emacs runs out of memory even
if I M-w only the initial chunk of the file that ends with "<p>Created
with abbyy2epub (v.1.7.6)</p></div>", and then do this in *scratch*:

  kill-ring C-x C-e





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15  7:36 ` Eli Zaretskii
@ 2021-08-15  8:37   ` Eli Zaretskii
  2021-08-15 10:38     ` Matt Beshara
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2021-08-15  8:37 UTC (permalink / raw)
  To: m; +Cc: 50061

> Date: Sun, 15 Aug 2021 10:36:35 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 50061@debbugs.gnu.org
> 
> nXML puts a lot of its private text properties on the text.  My guess
> is that producing a printed representation for that consumes
> inordinate amounts of memory.

Specifically, it's the 'rng-state' property on the "</p>" that ends a
paragraph.  It's a massive recursive data structure, and printing it
takes a lot of memory.  Maybe nXML could arrange for these properties
to be removed when copying to the kill-ring, but would it get in the
way if you want to paste into an XML buffer?





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15  8:37   ` Eli Zaretskii
@ 2021-08-15 10:38     ` Matt Beshara
  2021-08-15 11:25       ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Matt Beshara @ 2021-08-15 10:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 50061


Eli Zaretskii <eliz@gnu.org> writes:

> Specifically, it's the 'rng-state' property on the "</p>" that 
> ends a
> paragraph.  It's a massive recursive data structure, and 
> printing it
> takes a lot of memory.  Maybe nXML could arrange for these 
> properties
> to be removed when copying to the kill-ring, but would it get in 
> the
> way if you want to paste into an XML buffer?

I haven’t had time to look at the code yet, so I’m not sure what 
information the ‘rng-state’ property contains, and whether it 
would cause any problems (to me) for it to be removed when copied. 
That said, personally, I don’t think there could be any side 
effect of removing that property from copied XML which would be 
more disruptive than savehist causing Emacs to hang completely 
when trying to save my kill ring.  Also, would nXML not be able to 
recreate any missing data it needed from the ‘rng-state’ property 
if the plain text of the XML was then pasted into an nXML buffer 
again?






^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15 10:38     ` Matt Beshara
@ 2021-08-15 11:25       ` Eli Zaretskii
  2021-08-15 11:44         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2021-08-15 11:25 UTC (permalink / raw)
  To: Matt Beshara; +Cc: 50061

> From: Matt Beshara <m@mfa.pw>
> Cc: 50061@debbugs.gnu.org
> Date: Sun, 15 Aug 2021 20:38:04 +1000
> 
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Specifically, it's the 'rng-state' property on the "</p>" that 
> > ends a
> > paragraph.  It's a massive recursive data structure, and 
> > printing it
> > takes a lot of memory.  Maybe nXML could arrange for these 
> > properties
> > to be removed when copying to the kill-ring, but would it get in 
> > the
> > way if you want to paste into an XML buffer?
> 
> I haven’t had time to look at the code yet, so I’m not sure what 
> information the ‘rng-state’ property contains, and whether it 
> would cause any problems (to me) for it to be removed when copied. 
> That said, personally, I don’t think there could be any side 
> effect of removing that property from copied XML which would be 
> more disruptive than savehist causing Emacs to hang completely 
> when trying to save my kill ring.  Also, would nXML not be able to 
> recreate any missing data it needed from the ‘rng-state’ property 
> if the plain text of the XML was then pasted into an nXML buffer 
> again?

Sorry, I don't know enough about nXML to answer those questions.  But
I think patches to remove that property when copying stuff to the
kill-ring will be welcome.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15 11:25       ` Eli Zaretskii
@ 2021-08-15 11:44         ` Lars Ingebrigtsen
  2021-08-15 11:46           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-15 11:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Matt Beshara, 50061

Eli Zaretskii <eliz@gnu.org> writes:

> Sorry, I don't know enough about nXML to answer those questions.  But
> I think patches to remove that property when copying stuff to the
> kill-ring will be welcome.

If I remember correctly from the last time I poked at `nxml-mode', those
properties should be recomputed automatically.

So I guess the mode could add those properties to
`yank-excluded-properties' buffer-locally and that should fix this issue?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15 11:44         ` Lars Ingebrigtsen
@ 2021-08-15 11:46           ` Lars Ingebrigtsen
  2021-08-15 12:16             ` Andreas Schwab
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-15 11:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Matt Beshara, 50061

Lars Ingebrigtsen <larsi@gnus.org> writes:

> So I guess the mode could add those properties to
> `yank-excluded-properties' buffer-locally and that should fix this issue?

Er, no, we want to inhibit those properties from even landing in the
kill ring?  So that doesn't help.  Do we have something in Emacs that
filters the text properties when copying to the kill ring?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15 11:46           ` Lars Ingebrigtsen
@ 2021-08-15 12:16             ` Andreas Schwab
  2021-08-15 13:45               ` Lars Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Andreas Schwab @ 2021-08-15 12:16 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Matt Beshara, 50061

On Aug 15 2021, Lars Ingebrigtsen wrote:

> Do we have something in Emacs that
> filters the text properties when copying to the kill ring?

It is called filter-buffer-substring-function.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15 12:16             ` Andreas Schwab
@ 2021-08-15 13:45               ` Lars Ingebrigtsen
  2021-08-15 14:07                 ` Eli Zaretskii
  2021-08-15 22:39                 ` Matt Beshara
  0 siblings, 2 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-15 13:45 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Matt Beshara, 50061

Andreas Schwab <schwab@linux-m68k.org> writes:

> It is called filter-buffer-substring-function.

Ah, thanks.

I've now pushed a fix using this mechanism, and as far as I can tell, it
seems to work fine (and doesn't seem to lead to any regressions in
nxml-mode).

Matt, can you try updating and see whether this solves the problem for
you, too?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15 13:45               ` Lars Ingebrigtsen
@ 2021-08-15 14:07                 ` Eli Zaretskii
  2021-08-15 14:23                   ` Lars Ingebrigtsen
  2021-08-15 22:39                 ` Matt Beshara
  1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2021-08-15 14:07 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: m, schwab, 50061

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Matt Beshara <m@mfa.pw>,  Eli Zaretskii <eliz@gnu.org>,
>   50061@debbugs.gnu.org
> Date: Sun, 15 Aug 2021 15:45:13 +0200
> 
> Andreas Schwab <schwab@linux-m68k.org> writes:
> 
> > It is called filter-buffer-substring-function.
> 
> Ah, thanks.
> 
> I've now pushed a fix using this mechanism, and as far as I can tell, it
> seems to work fine (and doesn't seem to lead to any regressions in
> nxml-mode).

I see the filter you installed removes the fontified property as well?
Why is that? I don't think we do that anywhere else.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15 14:07                 ` Eli Zaretskii
@ 2021-08-15 14:23                   ` Lars Ingebrigtsen
  2021-08-15 14:31                     ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-15 14:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: m, schwab, 50061

Eli Zaretskii <eliz@gnu.org> writes:

> I see the filter you installed removes the fontified property as well?
> Why is that? I don't think we do that anywhere else.

I thought I vaguely remembered nxml-mode using the font-lock machinery
for some of this stuff, so I wanted (when yanking stuff back into an
nxml-mode buffer) all of the data to be recomputed (if necessary).

But I may be misremembering -- if it's not using font-lock for this,
then removing `fontified' should be unnecessary. 

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15 14:23                   ` Lars Ingebrigtsen
@ 2021-08-15 14:31                     ` Eli Zaretskii
  2021-08-16 11:17                       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2021-08-15 14:31 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: m, schwab, 50061

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: schwab@linux-m68k.org,  m@mfa.pw,  50061@debbugs.gnu.org
> Date: Sun, 15 Aug 2021 16:23:54 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > I see the filter you installed removes the fontified property as well?
> > Why is that? I don't think we do that anywhere else.
> 
> I thought I vaguely remembered nxml-mode using the font-lock machinery
> for some of this stuff, so I wanted (when yanking stuff back into an
> nxml-mode buffer) all of the data to be recomputed (if necessary).
> 
> But I may be misremembering -- if it's not using font-lock for this,
> then removing `fontified' should be unnecessary. 

I think we shouldn't remove that property, because it's unnecessary,
and because filter-buffer-substring-function is used not only for
copying text into the kill-ring.  We should leave there properties
that cause no trouble.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15 13:45               ` Lars Ingebrigtsen
  2021-08-15 14:07                 ` Eli Zaretskii
@ 2021-08-15 22:39                 ` Matt Beshara
  2021-08-16 11:17                   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 15+ messages in thread
From: Matt Beshara @ 2021-08-15 22:39 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 50061


Lars Ingebrigtsen <larsi@gnus.org> writes:

> Matt, can you try updating and see whether this solves the 
> problem for
> you, too?

Works like a charm.  Thanks for your help!





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15 14:31                     ` Eli Zaretskii
@ 2021-08-16 11:17                       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-16 11:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: m, schwab, 50061

Eli Zaretskii <eliz@gnu.org> writes:

> I think we shouldn't remove that property, because it's unnecessary,
> and because filter-buffer-substring-function is used not only for
> copying text into the kill-ring.  We should leave there properties
> that cause no trouble.

OK; removed the removal.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer
  2021-08-15 22:39                 ` Matt Beshara
@ 2021-08-16 11:17                   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-16 11:17 UTC (permalink / raw)
  To: Matt Beshara; +Cc: 50061

Matt Beshara <m@mfa.pw> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Matt, can you try updating and see whether this solves the problem
>> for
>> you, too?
>
> Works like a charm.  Thanks for your help!

Thanks for checking; I'm closing this bug report, then.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-08-16 11:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-15  2:46 bug#50061: 28.0.50; Hang caused by savehist-save when saving kill ring with large amount of data from nxml-mode buffer Matt Beshara
2021-08-15  7:36 ` Eli Zaretskii
2021-08-15  8:37   ` Eli Zaretskii
2021-08-15 10:38     ` Matt Beshara
2021-08-15 11:25       ` Eli Zaretskii
2021-08-15 11:44         ` Lars Ingebrigtsen
2021-08-15 11:46           ` Lars Ingebrigtsen
2021-08-15 12:16             ` Andreas Schwab
2021-08-15 13:45               ` Lars Ingebrigtsen
2021-08-15 14:07                 ` Eli Zaretskii
2021-08-15 14:23                   ` Lars Ingebrigtsen
2021-08-15 14:31                     ` Eli Zaretskii
2021-08-16 11:17                       ` Lars Ingebrigtsen
2021-08-15 22:39                 ` Matt Beshara
2021-08-16 11:17                   ` Lars Ingebrigtsen

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.