From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: Emacs hangs with 100pc CPU during query-replace Date: Sat, 19 Jul 2014 10:02:02 +0200 Message-ID: <87ha2d22v9.fsf@gmail.com> References: <87tx6e2tr1.fsf@gmail.com> <87vbqu1721.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1405756971 30863 80.91.229.3 (19 Jul 2014 08:02:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jul 2014 08:02:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 19 10:02:45 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X8PbR-0001wg-4I for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Jul 2014 10:02:45 +0200 Original-Received: from localhost ([::1]:53430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8PbQ-0007JD-N9 for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Jul 2014 04:02:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8Pb5-0007B1-55 for help-gnu-emacs@gnu.org; Sat, 19 Jul 2014 04:02:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X8Pax-0001OT-GK for help-gnu-emacs@gnu.org; Sat, 19 Jul 2014 04:02:23 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:58486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8Pax-0001OL-6a for help-gnu-emacs@gnu.org; Sat, 19 Jul 2014 04:02:15 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X8Paw-0001iZ-4N for help-gnu-emacs@gnu.org; Sat, 19 Jul 2014 10:02:14 +0200 Original-Received: from e178189084.adsl.alicedsl.de ([85.178.189.84]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Jul 2014 10:02:14 +0200 Original-Received: from tjolitz by e178189084.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Jul 2014 10:02:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 199 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178189084.adsl.alicedsl.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:igZ2SrY2yxTEHarhupzxbnjrhes= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98777 Archived-At: Emanuel Berg writes: > Michael Heerdegen writes: > >> Try sending the Emacs process a SIGUSR2, this forces >> it into the (Lisp level) debugger. Maybe you then >> can see what it "does". > > You mean like this: > > kill -s usr2 4352 > > (get the PID with 'ps -e | grep emacs') > > or, equivalently (?) > > pkill --signal usr2 emacs nice tip, thanks, I hope I remember this! Here is the beginning of the file where I want to replace :resource_id: with :name: by doing=20 ,---- | M-%: resource_id RET name RET `---- Emacs hangs already at the 2nd (piano) entry.=20 #+begin_src org * Instruments ** rhythm-section *** harmony **** guitar :PROPERTIES: :name: guitar :abbrev: g :END: **** piano :PROPERTIES: :name: piano :abbrev: p :END: *** rhythm **** bass :PROPERTIES: :resource_id: bass :abbrev: b :END: **** drums :PROPERTIES: :resource_id: drums :abbrev: dr :END: ** horns :PROPERTIES: :resource_id: horns :abbrev: hrs :END: #+end_src here is the backtrace I get, it seems to be an Org-mode (cache?) problem - should I move this report to the Org mailing list? Debugger entered--Lisp error: (quit) looking-at("^\\(\\*+\\)\\(?: +\\(TODO\\|NEXT\\|DONE\\|WAITING\\|HOLD\\|CA= NCELLED\\|PHONE\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ = ]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ ]*$") org-heading-components() org-element-headline-parser(116 t) org-element--current-element(116 element nil nil) byte-code("\212\214~\210^Hb\210 \205..\306\307!\204..\n\205..\310^H\311\"= .\312^K..\f;\203+.\313\314.\f#\2021.\315\fA@.\"*..\311\211../^K\204`.\316.0= \317 \211.1.2\320.1P.3\321 ,\203V.\311y\210\322\311w\210\323 \210\202?.^H..= U\203\217.\324\325.4\203\211.\326^K..\f;\203^?.\313\314.\f#\202\205.\315\fA= @.\"*\202\212.^K\"\210\202?.\327\316.0\317 \211.1.2\320.1P+..\316#\203\263.= \311y\210\322\311w\210\323 \210\202?.^Kd^HU\203\277.^HS\202\300.^H..5\330^K= ..\f;\203\324.\313\314.\f#\202\332.\315\fA@.\"*\206\340...b\210\331.5..\f;\= 203\364.\313\314.\f#\202\372.\315\fA@.\"*\211.6^HX\205%..6b\205%.\326.5..\f= ;\203..\313\314.\f#\202!.\315\fA@.\"*\211.5)\204\342..5\203>.m\2038..5.\202= >..5.`./*\331\f..\f;\203P.\313\314.\f#\202V.\315\fA@.\"*\206q.\212\316.0\31= 7 \211.1.2\320.1P.3\332 \210,`)\f\311.7.8.6.4\203\251.`^HU\203\215.\324\325= .8\"\210\202\251..9\211.9\205\240.\333 \206\240.\334.9\335 \")\203\251.\324= \336\311\"\210\f\204\370.\337.6\304.7\340.8..\f;\203\305.\313\314.\f#\202\3= 13.\315\fA@.\"*$\211.\326.8.:.\211.;\203\345.\341\f\311..:$\202\362.\fA\342= \fA@..:#\240\210\f+\210\343\f!\210\331\f..\f;\203 .\313\314.\f#\202..\315\f= A@.\"*\f\211.:\204 .\f;\205(.\344\202(.\f@9\205(.\f@).;\211.<^HX\203A.d.\204Q.\324\325\f\"\210\202\376.\330\f..\f;\203b= .\313\314.\f#\202h.\315\fA@.\"*\345\f..\f;\203z.\313\314.\f#\202\200.\315\f= A@.\"*.>.?.4\204\276..?\205\365..>\205\365..?^HW\204\252..?^HU\205\365..;\3= 46>?\205\365..>^HV\204\276..>^HU\205\365.d^HU\205\365../\206\305..?b\210\31= 1./\347.;\350\"\203\326.\351\202\353.\347.;\352\"\203\342.\353\202\353.\347= .;\354\"\205\353.\355.7\f.8.>\211.6*\204\376.\324\325\f\"\210*\311.\202y." = [pos org-element-use-cache orgstruct-mode cached element property derived-m= ode-p org-mode org-element--cache-find nil :begin get-text-property 0 plist= -get t org-get-limited-outline-regexp "^" outline-previous-heading " . \n" = beginning-of-line throw exit :parent re-search-backward :contents-begin :en= d outline-next-heading input-pending-p time-less-p current-time interrupt o= rg-element--current-element :structure org-add-props plist-put org-element-= -cache-put plain-text :contents-end (plain-list table) eql plain-list item = property-drawer node-property table table-row begin next org-called-with-li= mited-levels org-outline-regexp ...] 9) org-element--parse-to(120 t nil) byte-code("^H\306H\307U\203\f.\310\311\215\210^H\306H\312U\203U.^H\307H \= 232\203(.\nA@\306\312I\210\313\314\315\"\210\316^H\312H^H\317H^K#..\203A..\= fW\203A.\313\320\321\"\210\322\f\315..#./^H\323./I\210^H\306\324I\210*^H\30= 7H^H\317H^H\323H.0\307H.1>\204n.\325\326\327\330#\210.0\312H\307H\321C\315\= 321.2.3.4.5./.6.7./\204\227.\331.6!\203\227.\313\314\315\"\210.5\203\251..5= \324H\211.8.9\332.9.:\"\206..\333.9.9.;.9;\203\305.\334\307.;.9#\202\315.\3= 35.9A@.;\"*.<.9\211.9:\204\343..9;\205\355.\336\202\355..9@9\205\355..9@)\3= 37>\203\371..\211.?\250\203B..>\250\2039..?.>W\202T..?.>@X\202T..>= \250\203Q..?@.>W\202T.\341\342\215*\204h..5.4B.4.5\307H.5\202\245..=3D.7.>\= 211.?\250\203\214..>\250\203\203..?.>W\202\236..?.>@X\202\236..>\250\203\23= 3..?@.>W\202\236.\341\342\215*\204\213..=3D \232\203\256.\313\314\315\"\210= .2\204\312...\211..\205\306.\343 \206\306.\344..\345 \")\203\333.^H\307.=3D= I\210^H\323./I\210\313\320\321\"\210\331.6!\204\334..8.6\321.@.6\211.9A@.A.= @\203\376.\346.@>\203..9\211.9:\204...9;\205..\336\202...9@9\205...9@)\347= =3D\203.\335.A\350\"\211.9:\2047..9;\205A.\336\202A..9@9\205A..9@)\351=3D\= 204.\335.A\346\"\321.)\211.B\203~..B@\211.)\211.C\211@.6\\\240\210)\306.)\= 233\211.D\211@.6\\\240\210).BA\211.B\204U.*\352\321.=3D\211.B\205\276..B@.= =3D.@\203\233..=3D.@>\205\241.\335.A.=3D\"\211.E\203\263.\353.A.=3D.6.E\\#\= 210).BA\211.B\204\211.\321..\210\332.8.F\"\321.G\211.B\203\333..B@\211.G\21= 1.HAA)\321.I\211.B\203\321..B@\211.I.6\321.@.6\211.9A@.A.@\203..\346.@>\203= \206..9\211.9:\204...9;\205\".\336\202\"..9@9\205\"..9@)\347=3D\203\206.\33= 5.A\350\"\211.9:\204>..9;\205H.\336\202H..9@9\205H..9@)\351=3D\204\206.\335= .A\346\"\321.)\211.B\203\205..B@\211.)\211.C\211@.6\\\240\210)\306.)\233\21= 1.D\211@.6\\\240\210).BA\211.B\204\\.*\352\321.=3D\211.B\205\305..B@.=3D.@\= 203\242..=3D.@>\205\250.\335.A.=3D\"\211.E\203\272.\353.A.=3D.6.E\\#\210).B= A\211.B\204\220.\321..\210.BA\211.B\204\345.*.BA\211.B\204\320.*\333.8.9.;.= 9;\203\363.\334\307.;.9#\202\373.\335.9A@.;\"*.<./\203O.\354./.9.;.9;\203..= \334\307.;.9#\202\".\335.9A@.;\"*.\2044.\317\320\321\322#\210.\323H\306H\316\211.%.&.'.= '\203W..'\307H\211.(.(\324.(.)\"\206\272.\325.(.(.*.(;\203o.\326\306.*.(#\2= 02w.\327.(A@.*\"*.+.(\211.(:\204\215..(;\205\227.\330\202\227..(@9\205\227.= .(@)\331>\203\243..+T\202\245..+.,.-\203\267.\332.(.,.)#\202\271..,*)\211.,= ^K..\211./\250\203\337...\250\203\326../..W\202\361../..@X\202\361...\250\2= 03\356../@..W\202\361.\333\334\215*\203\376..'\323H.'\202S.^K.,..\211./\250= \203!...\250\203.../..W\2023../..@X\2023...\250\2030../@..W\2023.\333\334\2= 15*\203H..(.&.,.%.'\306H.'\202S..(.&.,.%\316.'*\202A..&\203..\325.&.(.*.(;\= 203s.\326\306.*.(#\202{.\327.(A@.*\"*.0.1\203\275..%.1..\211./\250\203\247.= ..\250\203\236../..W\202\271../..@X\202\271...\250\203\266../@..W\202\271.\= 333\334\215*\203\304..0\nX\202\374..&\211.2\203\371..2 =3D\204\371.\335.2.(= .*.(;\203\352.\326\306.*.(#\202\362.\327.(A@.*\"*\211.2\204\314..2)\203...&= .(\336..(\"\210\337.(.3\")\210\202*.^H\306.%I\210^H\323.0I\210^H\340\323I\2= 10\314\341\316\"\210)\2023.\314\342\343\"\210+\202\f." [request outreach en= d beg time-limit org-element--cache 0 2 4 input-pending-p time-less-p curre= nt-time throw interrupt nil error "%s accessing a non-%s" avl-tree--dummyro= ot avl-tree- 1 gethash :begin get-text-property plist-get plain-text (item = table-row) puthash exit (byte-code "^H\203/. \203/.\302^H \"\203..\303\304\= 305\"\210\202..\302 ^H\"\203&.\303\304\306\"\210\202..^HA. A.\202..^H?\2055= . \207" [a b car-less-than-car throw exit t nil] 3) :parent avl-tree-delete= remhash 6 end-phase quit t cl-struct-avl-tree--tags data-key data node ele= ment org-element--cache-sync-keys property begin key org-element--cache-syn= c-requests b a pos next ...] 5) 1 throw quit t + 3 interrupt nil org-elemen= t--parse-to 5 2 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree-= zerop gethash :begin get-text-property plist-get plain-text (item table-ro= w) puthash exit (byte-code "^H\203/. \203/.\302^H \"\203..\303\304\305\"\21= 0\202..\302 ^H\"\203&.\303\304\306\"\210\202..^HA. A.\202..^H?\2055. \207" = [a b car-less-than-car throw exit t nil] 3) input-pending-p time-less-p cur= rent-time :structure plain-list :parent item (:begin :contents-begin :conte= nts-end :end :post-affiliated) plist-put :end org-add-props time-limit pare= nt org-element--cache cl-struct-avl-tree--tags ...] 8) org-element--cache-process-request([1642 134 123 -7 (property-drawer (:be= gin 57 :end 123 :contents-begin 73 :contents-end 113 :post-blank 1 :post-af= filiated 57 :parent nil)) nil 2] nil 167 nil -7) byte-code("^H\203H.^H@.^HA@.\306 \n\205..\n\307H^K\211?\205^_.\310\311 \f= \".\206$.\307%\210\n\203A.\n\211.\f\312.\f\312H \312H\\I\210)\n\313 \313HI\= 210^HA\211.\204..\306\207" [org-element--cache-sync-requests request next t= hreshold org-element-cache-sync-duration extra org-element--cache-process-r= equest 0 time-add current-time 3 2 v] 8) org-element--cache-sync(# 167 -7) org-element--cache-submit-request(144 167 -7) org-element--cache-after-change(149 153 11) replace-match("name" nil t) replace-match-maybe-edit("name" nil t nil (149 160 #)) perform-replace("resource_id" "name" t nil nil nil nil nil nil) query-replace("resource_id" "name" nil nil nil) call-interactively(query-replace nil nil) --=20 cheers, Thorsten