From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#30931: 27.0.50; Crash in "Automatic GC" Date: Mon, 26 Mar 2018 10:20:47 -0400 Message-ID: <87a7uurk8w.fsf@gmail.com> References: <4d245b9b-16be-954e-f98c-c99796e40431@zoho.com> <87d0zrqa2k.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1522073963 14740 195.159.176.226 (26 Mar 2018 14:19:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Mar 2018 14:19:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: 30931@debbugs.gnu.org To: =?UTF-8?Q?Micha=C5=82?= Kondraciuk Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 26 16:19:19 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f0Sxz-0003j2-CK for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Mar 2018 16:19:19 +0200 Original-Received: from localhost ([::1]:56997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0T02-00057X-Gv for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Mar 2018 10:21:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0Szk-00052x-Jv for bug-gnu-emacs@gnu.org; Mon, 26 Mar 2018 10:21:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0Sze-00022j-0i for bug-gnu-emacs@gnu.org; Mon, 26 Mar 2018 10:21:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46577) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f0Szd-00022S-Rh for bug-gnu-emacs@gnu.org; Mon, 26 Mar 2018 10:21:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f0Szd-00083L-Lk for bug-gnu-emacs@gnu.org; Mon, 26 Mar 2018 10:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Mar 2018 14:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30931 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 30931-submit@debbugs.gnu.org id=B30931.152207405830937 (code B ref 30931); Mon, 26 Mar 2018 14:21:01 +0000 Original-Received: (at 30931) by debbugs.gnu.org; 26 Mar 2018 14:20:58 +0000 Original-Received: from localhost ([127.0.0.1]:54474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f0Sza-00082v-Dp for submit@debbugs.gnu.org; Mon, 26 Mar 2018 10:20:58 -0400 Original-Received: from mail-io0-f174.google.com ([209.85.223.174]:32892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f0SzX-00082e-Qp for 30931@debbugs.gnu.org; Mon, 26 Mar 2018 10:20:56 -0400 Original-Received: by mail-io0-f174.google.com with SMTP id l3so23476857iog.0 for <30931@debbugs.gnu.org>; Mon, 26 Mar 2018 07:20:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=jRpl8TouUfTsOQ2q0rMzFlljqmrRhYTUD9qP350rGCM=; b=tvvynseCXwwUcWHbjCVWbWZIJ4X2SM/t21GXbuKphUb4YDBqn8qT9D0lrldnoE6pOP tzqejGe5nLeJjWRBW7ZxVFBBIrNDBOiQD5y9LOxTYBT+yFb1c+PhaQeTT8fKftBf0Kk1 hvRf1W4qDc1345iA2hUcLPe9g0Afsh8Zsel8L10G2FxkM83y5fHMES1muHDfI+86EJMC 6czm6kDWTugkPEVBh+yTLSqGrn94roXOKGvb3RPoSqg0ayFKugj2DF5OdqocYPg+4vh6 pSRcGBR1dnloBCVRrX9jSFZJgk0PmaSp/wobaGgQaf9aiZ67dHxWMI7x9K3V8p45QHBk t0CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=jRpl8TouUfTsOQ2q0rMzFlljqmrRhYTUD9qP350rGCM=; b=csZag/G1tLPG/VV6zE99c05ID7T5MY3mwgYG/eDJVl/rc0KCcIy4mKQLXJ6rN1I9Ba rdvOaTOeWZ6UBhhDd5rOJNWpSIrxLDh+/K7Ii0FHaK91EsMnEdlHlmfkX8HcB0hVcOoI u4Q9J7aN8F8ax8DnVbtuQKPysRzALtIfYeP9SHkgh2BAtLeXOEaUROzDMnKuAGQbOZna NpVJCCpbh9ozF9M53MreoDRZVLyMw159ByjmSu+Y6YGUEFo4d5d1YSOt0jUNX+Is5yVU zFAgxtogGN7ZLnvFkRB0UbdFYwOBQswdhFpZVVFzTZepPVsI2IxuEiDqe7NoNCt4mIJn YbcQ== X-Gm-Message-State: AElRT7HMY5wh6MUBp4gVVQi4jUZ3Jw6wBvKttb2emyrQBoEISLSrhDpK OKFfLeScJ1sT1jGhForEwfc= X-Google-Smtp-Source: AIpwx49W+Ndy9JkanCQyblafCutcSGBSMkD22Dfhtrlcdkk2cY9lJkIx2XKEiQTE2plX+oISAphPwQ== X-Received: by 10.107.222.3 with SMTP id v3mr13827544iog.303.1522074050207; Mon, 26 Mar 2018 07:20:50 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id e142-v6sm11114203ite.3.2018.03.26.07.20.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Mar 2018 07:20:49 -0700 (PDT) In-Reply-To: <87d0zrqa2k.fsf@gmail.com> (Noam Postavsky's message of "Mon, 26 Mar 2018 08:45:55 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144629 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Noam Postavsky writes: > next time it was just mark_stack, but the object being marked still > looks like an undo-list. Here's the gdb evidence of that. I note that the reproduction recipe disables undo via (let ((buffer-undo-list t))...), but looking at its code, I see that yasnippet unconditionally pushes entries onto the undo list anyway. Micha=C5=82, is the binding of buffer-undo-list significant f= or your reproduction (i.e., did the original crash happen in an undo-disabled buffer)? --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=gdb.log Content-Description: gdb session log (gdb) bt 16 #0 terminate_due_to_signal (sig=6, backtrace_limit=40) at ../../src/emacs.c:364 #1 0x00000000005aa0c9 in emacs_abort () at ../../src/sysdep.c:2426 #2 0x0000000000612e7a in mark_object (arg=XIL(0x301c719)) at ../../src/alloc.c:6677 #3 0x0000000000613079 in mark_object (arg=XIL(0x355a503)) at ../../src/alloc.c:6730 #4 0x0000000000613079 in mark_object (arg=XIL(0x355a493)) at ../../src/alloc.c:6730 #5 0x000000000060f229 in mark_maybe_object (obj=XIL(0x355a493)) at ../../src/alloc.c:4846 #6 0x000000000060f4b9 in mark_memory (start=0x7fffffff21e0, end=0x7fffffffe8c8) at ../../src/alloc.c:4990 #7 0x000000000060f4ee in mark_stack (bottom=0x7fffffffe8c8 "a\036h\364\377\177", end=0x7fffffff21e0 "\360!\377\377\377\177") at ../../src/alloc.c:5197 #8 0x00000000006cddb3 in mark_one_thread (thread=0xe103e0 ) at ../../src/thread.c:616 #9 0x00000000006cdf48 in mark_threads_callback (ignore=0x0) at ../../src/thread.c:649 #10 0x000000000060f535 in flush_stack_call_func (func=0x6cdeb5 , arg=0x0) at ../../src/alloc.c:5224 #11 0x00000000006cdf7a in mark_threads () at ../../src/thread.c:656 #12 0x0000000000611502 in garbage_collect_1 (end=0x7fffffff23c0) at ../../src/alloc.c:6001 #13 0x0000000000611bef in Fgarbage_collect () at ../../src/alloc.c:6172 #14 0x00000000005799f8 in maybe_gc () at ../../src/lisp.h:4748 #15 0x000000000063c326 in Ffuncall (nargs=3, args=0x7fffffff2478) at ../../src/eval.c:2751 (More stack frames follow...) (gdb) xbacktrace "Automatic GC" (0x0) "mapcar" (0xffff2480) "yas-active-snippets" (0xffff2958) "yas--place-overlays" (0xffff2e40) "yas--move-to-field" (0xffff33d0) 0x320a050 PVEC_COMPILED "funcall" (0xffff3860) "let" (0xffff3b30) "eval" (0xffff3cf0) "yas-expand-snippet" (0xffff4410) "yas--expand-or-prompt-for-template" (0xffff4910) "yas-expand" (0xffff4da0) "save-restriction" (0xffff5060) "save-current-buffer" (0xffff51e0) "update-fn" (0xffff53c0) "ivy--insert-minibuffer" (0xffff58a0) "ivy--exhibit" (0xffff5e70) "ivy--queue-exhibit" (0xffff6340) "execute-kbd-macro" (0xffff66e0) "progn" (0xffff6880) "if" (0xffff69e0) "while" (0xffff6b90) "let" (0xffff6db0) 0x3407a30 Lisp type 3 "apply" (0xffff7118) "timer-event-handler" (0xffff7688) "input-pending-p" (0xffff7988) "sit-for" (0xffff7e80) "yas-expand-snippet" (0xffff85a0) "yas--expand-or-prompt-for-template" (0xffff8aa0) "yas-expand" (0xffff8f30) "save-restriction" (0xffff91f0) "save-current-buffer" (0xffff9370) "update-fn" (0xffff9550) "ivy--insert-minibuffer" (0xffff9a30) "ivy--exhibit" (0xffffa000) "ivy--minibuffer-setup" (0xffffa510) 0x36bb630 PVEC_COMPILED "read-from-minibuffer" (0xffffae58) "ivy-read" (0xffffb5f0) "condition-case" (0xffffb990) "catch" (0xffffbb60) "while" (0xffffbd10) "let" (0xffffbf30) "let" (0xffffc150) "eval-buffer" (0xffffc440) "load-with-code-conversion" (0xffffc9c8) "load" (0xffffcd40) 0xad83e0 PVEC_COMPILED "command-line" (0xffffdeb8) "normal-top-level" (0xffffe4e0) (gdb) frame 5 #5 0x000000000060f229 in mark_maybe_object (obj=XIL(0x355a493)) at ../../src/alloc.c:4846 4846 mark_object (obj); (gdb) p obj $100 = XIL(0x355a493) (gdb) xxlist Lisp_Cons:(Lisp_String:" " . Lisp_Int0:-36) Lisp_Cons:(Lisp_Misc_Marker . Lisp_Int1:-1) Lisp_Cons:(Lisp_Misc_Free . Lisp_Int1:1) Lisp_Cons:(Lisp_Misc_Overlay . Lisp_Int1:1) Lisp_Cons:(Lisp_Int0:4 . Lisp_Int0:36) Lisp_Cons:(Lisp_String:"ah" . Lisp_Int0:4) Lisp_Cons:(Lisp_Int1:3 . Lisp_Int0:6) Lisp_Symbol:"nil" Lisp_Cons:(Lisp_Symbol:"apply" Lisp_Symbol:"yas--take-care-of-redo" Lisp_Vectorlike: . Lisp_Symbol :"nil") Lisp_Cons:(Lisp_Int0:4 . Lisp_Int0:10) Lisp_Cons:(Lisp_String:"a" . Lisp_Int0:4) Lisp_Cons:(Lisp_Int1:3 . Lisp_Int1:5) Lisp_Cons:(Lisp_Symbol:"apply" Lisp_Symbol:"yas--take-care-of-redo" Lisp_Vectorlike: . Lisp_Symbol :"nil") Lisp_Cons:(Lisp_Int0:4 . Lisp_Int0:10) Lisp_Cons:(Lisp_String:"a" . Lisp_Int0:4) Lisp_Cons:(Lisp_Int1:3 . Lisp_Int1:5) Lisp_Symbol:"nil" Lisp_Cons:(Lisp_Symbol:"apply" Lisp_Symbol:"yas--take-care-of-redo" Lisp_Vectorlike: . Lisp_Symbol :"nil") Lisp_Cons:(Lisp_String:" " . Lisp_Int0:-36) Lisp_Cons:(Lisp_Misc_Marker . Lisp_Int1:-1) ... --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=xxlist.gdb Content-Description: xxlist gdb command define xxlist xgetptr $ set $cons = (struct Lisp_Cons *) $ptr xgetptr Qnil set $nil = $ptr set $i = 0 while $cons != $nil && $i < 20 set $car = $cons->u.s.car # xgettype $car # if $type == Lisp_Cons # printf "(cons " # set $consptr = $ptr # xgetptr $car # set $car_ptr = (struct Lisp_Cons *) $ptr # xpp $car_ptr->u.s.car # xgettype $car_ptr->u.s.u.cdr # if $type == Lisp_Cons # printf "..." # end # set $ptr = $consptr # printf ")" # else xpp $car # end xgetptr $cons->u.s.u.cdr set $cons = (struct Lisp_Cons *) $ptr set $i = $i + 1 printf "\n" end if $cons == $nil printf "nil\n" else printf "...\n" p $ptr end end define xpp xgettype $arg0 if $type != Lisp_Misc output $type printf ":" end if $type == Lisp_String xgetptr $arg0 set $caar_str = (struct Lisp_String *) $ptr xprintstr $caar_str end if $type == Lisp_Misc xgetptr $arg0 output (enum Lisp_Misc_Type) (((struct Lisp_Free *) $ptr)->type) end if $type == Lisp_Int0 || $type == Lisp_Int1 xgetint $arg0 output $int end if $type == Lisp_Symbol xsymname $arg0 xgetptr $symname set $caar_symname = (struct Lisp_String *) $ptr xprintstr $caar_symname end if $type == Lisp_Cons printf "(" xgetptr $arg0 set $xpp_cons = (struct Lisp_Cons *) $ptr while $xpp_cons != $nil set $xpp_car = $xpp_cons->u.s.car # this will likely fail for nested lists. xpp $xpp_car printf " " set $xpp_cdr = $xpp_cons->u.s.u.cdr xgettype $xpp_cdr if $type == Lisp_Cons xgetptr $xpp_cdr set $xpp_cons = (struct Lisp_Cons *) $ptr else printf ". " xpp $xpp_cdr loop_break end end printf ")" end end --=-=-=--