From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Cibrario Bertolotti Newsgroups: gmane.emacs.bugs Subject: bug#23462: 25.0.93; Crash on OS X when suspending main frame Date: Sun, 8 May 2016 18:56:15 +0200 Message-ID: References: <34370B08-B94B-41A9-A9B7-EA3F39EBE900@polito.it> <20160508095303.GA61146@breton.holly.idiocy.org> <83futsee39.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1462726647 27810 80.91.229.3 (8 May 2016 16:57:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 May 2016 16:57:27 +0000 (UTC) Cc: 23462@debbugs.gnu.org, Alan Third To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 08 18:57:14 2016 Return-path: Envelope-to: geb-bug-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 1azS13-0004Yb-IN for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 May 2016 18:57:13 +0200 Original-Received: from localhost ([::1]:37316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azS12-0000yH-Os for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 May 2016 12:57:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azS0v-0000pP-0l for bug-gnu-emacs@gnu.org; Sun, 08 May 2016 12:57:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azS0s-0001Cq-2X for bug-gnu-emacs@gnu.org; Sun, 08 May 2016 12:57:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azS0r-0001Cm-VF for bug-gnu-emacs@gnu.org; Sun, 08 May 2016 12:57:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1azS0r-0004Px-Nd for bug-gnu-emacs@gnu.org; Sun, 08 May 2016 12:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Cibrario Bertolotti Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 May 2016 16:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23462 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23462-submit@debbugs.gnu.org id=B23462.146272659016938 (code B ref 23462); Sun, 08 May 2016 16:57:01 +0000 Original-Received: (at 23462) by debbugs.gnu.org; 8 May 2016 16:56:30 +0000 Original-Received: from localhost ([127.0.0.1]:43403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azS0L-0004P7-P1 for submit@debbugs.gnu.org; Sun, 08 May 2016 12:56:30 -0400 Original-Received: from fm1nodo1.polito.it ([130.192.180.11]:50309 helo=antispam.polito.it) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azS0I-0004Oq-RX for 23462@debbugs.gnu.org; Sun, 08 May 2016 12:56:28 -0400 Original-Received: from polito.it (frontmail2.polito.it [130.192.180.42]) by antispam.polito.it with ESMTP id u48GuKsa032497-u48GuKsc032497 (version=TLSv1.0 cipher=DHE-RSA-AES256-SHA bits=256 verify=CAFAIL); Sun, 8 May 2016 18:56:20 +0200 Original-Received: from [5.170.15.82] (account d011741@polito.it HELO [192.168.1.100]) by polito.it (CommuniGate Pro SMTP 6.1.9) with ESMTPSA id 47629767; Sun, 08 May 2016 18:56:19 +0200 In-Reply-To: <83futsee39.fsf@gnu.org> X-Mailer: Apple Mail (2.3124) X-FEAS-SYSTEM-WL: 130.192.180.42 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:117980 Archived-At: > On 8 May 2016, at 17:58, Eli Zaretskii wrote: >=20 >> Date: Sun, 8 May 2016 10:53:03 +0100 >> From: Alan Third >> Cc: 23462@debbugs.gnu.org >>=20 >> On Thu, May 05, 2016 at 11:25:06PM +0200, Ivan Cibrario Bertolotti = wrote: >>> Emacs crashes when using the suspend-frame command (bound >>> to C-z by default) on the main frame. It works correctly when the = frame >>> is minimized by clicking on the GUI button. >>>=20 >>> Recipe: Start emacs -Q; type C-z; Emacs crashes with: >>> Fatal error 11: Segmentation faultAbort trap: 6 >>=20 >> I can confirm this happens in Emacs 25 and the master branch. >=20 > Thanks. >=20 > Could one of you please show a more detailed backtrace, preferably > from GDB, showing exactly which source line crashed, and perhaps also > what data was invalid and caused the crash? Thank you for your reply. At the bottom of this email there is a = backtrace taken with lldb (case #1), OS X does not have gdb by default. I=E2=80=99m wandering into unfamiliar territory, but it seems to me that = the crash is due to a NULL pointer dereference within GUI-related system = libraries, probably an Objective C object pointer. On occasion, I also get a different kind of crash in the same scenario, = which leads me to suspect a memory corruption issue. The lldb backtrace = is also at the bottom of this email (case #2). In case #2, the = following error message is dumped onto stderr just before crashing: objc[13904]: autorelease pool page 0x101067000 corrupted magic 0x00000000 0x00000000 0x101106c0 0xe0000000 should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341 pthread 0x7fff776e3000 should be 0x7fff776e3000 As you can see, the pre-built executable I=E2=80=99m currently using = does not have symbolic debugging information, I=E2=80=99ll try to build = from sources and get back to you with more information soon. > Also, does iconify-frame at all work on OS X? When invoked manually, from M-x, it works correctly only sometimes. In = other cases, it crashes Emacs as above (case #1). With low probability, = Emacs may also get trapped in a busy loop between itself and the kernel = (they both take about 50% of CPU time). I saw it but, unfortunately, I = was unable to reproduce this issue within lldb so far. Best regards, ICB =20 =E2=80=94 lldb backtrace, case #1 =E2=80=94 Process 13817 stopped * thread #1: tid =3D 0x7ee728, 0x00007fff8584da7a = libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + = 402, queue =3D 'com.apple.main-thread', stop reason =3D EXC_BAD_ACCESS = (code=3D1, address=3D0x10) frame #0: 0x00007fff8584da7a libobjc.A.dylib`(anonymous = namespace)::AutoreleasePoolPage::pop(void*) + 402 libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop: -> 0x7fff8584da7a <+402>: movq 0x10(%rbx), %rax 0x7fff8584da7e <+406>: leaq 0x38(%rbx), %rcx 0x7fff8584da82 <+410>: cmpq %rcx, %rax 0x7fff8584da85 <+413>: jne 0x7fff8584daa7 ; <+447> (lldb) bt all * thread #1: tid =3D 0x7ee728, 0x00007fff8584da7a = libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + = 402, queue =3D 'com.apple.main-thread', stop reason =3D EXC_BAD_ACCESS = (code=3D1, address=3D0x10) * frame #0: 0x00007fff8584da7a libobjc.A.dylib`(anonymous = namespace)::AutoreleasePoolPage::pop(void*) + 402 frame #1: 0x00007fff974c4987 = QuartzCore`CA::Transaction::observer_callback(__CFRunLoopObserver*, = unsigned long, void*) + 87 frame #2: 0x00007fff995f2067 = CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION= __ + 23 frame #3: 0x00007fff995f1fd7 CoreFoundation`__CFRunLoopDoObservers + = 391 frame #4: 0x00007fff995d0ef8 CoreFoundation`CFRunLoopRunSpecific + = 328 frame #5: 0x00007fff84c4571e HIServices`waitForTransaction + 204 frame #6: 0x00007fff92c12b07 AppKit`minimizeItemsMaybeBatching + 89 frame #7: 0x00007fff92c45f29 AppKit`-[NSWindow(NSWindow_Theme) = _minimizeToDock] + 192 frame #8: 0x00000001001a267e Emacs-x86_64-10_9`x_iconify_frame + 430 frame #9: 0x0000000100010587 Emacs-x86_64-10_9`Ficonify_frame + 135 frame #10: 0x0000000100139ec8 Emacs-x86_64-10_9`Ffuncall + 1016 frame #11: 0x00000001001720f5 Emacs-x86_64-10_9`exec_byte_code + = 2277 frame #12: 0x0000000100139d4f Emacs-x86_64-10_9`Ffuncall + 639 frame #13: 0x00000001001720f5 Emacs-x86_64-10_9`exec_byte_code + = 2277 frame #14: 0x0000000100139d4f Emacs-x86_64-10_9`Ffuncall + 639 frame #15: 0x0000000100133faa = Emacs-x86_64-10_9`Ffuncall_interactively + 58 frame #16: 0x0000000100139de7 Emacs-x86_64-10_9`Ffuncall + 791 frame #17: 0x00000001001397f8 Emacs-x86_64-10_9`Fapply + 136 frame #18: 0x00000001001347ba Emacs-x86_64-10_9`Fcall_interactively = + 2042 frame #19: 0x0000000100139efb Emacs-x86_64-10_9`Ffuncall + 1067 frame #20: 0x00000001001720f5 Emacs-x86_64-10_9`exec_byte_code + = 2277 frame #21: 0x0000000100139d4f Emacs-x86_64-10_9`Ffuncall + 639 frame #22: 0x000000010013a57d Emacs-x86_64-10_9`call1 + 45 frame #23: 0x00000001000bd66a Emacs-x86_64-10_9`command_loop_1 + = 1962 frame #24: 0x0000000100138946 = Emacs-x86_64-10_9`internal_condition_case + 70 frame #25: 0x00000001000cdf60 Emacs-x86_64-10_9`command_loop_2 + 48 frame #26: 0x00000001001384a6 Emacs-x86_64-10_9`internal_catch + 54 frame #27: 0x00000001000bc58e Emacs-x86_64-10_9`command_loop + 158 frame #28: 0x00000001000bc4a9 Emacs-x86_64-10_9`recursive_edit_1 + = 105 frame #29: 0x00000001000bc6cc Emacs-x86_64-10_9`Frecursive_edit + = 220 frame #30: 0x00000001000bb3ae Emacs-x86_64-10_9`main + 5854 frame #31: 0x00007fff85d4a5ad libdyld.dylib`start + 1 =E2=80=94 lldb backtrace, case #2 =E2=80=94 objc[13904]: autorelease pool page 0x101067000 corrupted magic 0x00000000 0x00000000 0x101106c0 0xe0000000 should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341 pthread 0x7fff776e3000 should be 0x7fff776e3000 Process 13904 stopped * thread #1: tid =3D 0x7f05cc, 0x00007fff8585be50 = libobjc.A.dylib`_objc_trap(), queue =3D 'com.apple.main-thread', stop = reason =3D EXC_BAD_INSTRUCTION (code=3DEXC_I386_INVOP, subcode=3D0x0) frame #0: 0x00007fff8585be50 libobjc.A.dylib`_objc_trap() libobjc.A.dylib`_objc_trap: -> 0x7fff8585be50 <+0>: ud2 =20 libobjc.A.dylib`__objc_error: 0x7fff8585be52 <+0>: pushq %rbp 0x7fff8585be53 <+1>: movq %rsp, %rbp 0x7fff8585be56 <+4>: subq $0xd0, %rsp (lldb) bt all * thread #1: tid =3D 0x7f05cc, 0x00007fff8585be50 = libobjc.A.dylib`_objc_trap(), queue =3D 'com.apple.main-thread', stop = reason =3D EXC_BAD_INSTRUCTION (code=3DEXC_I386_INVOP, subcode=3D0x0) * frame #0: 0x00007fff8585be50 libobjc.A.dylib`_objc_trap() frame #1: 0x00007fff8585bf90 libobjc.A.dylib`_objc_fatal(char = const*, ...) + 195 frame #2: 0x00007fff85868875 libobjc.A.dylib`(anonymous = namespace)::AutoreleasePoolPage::busted(bool) + 137 frame #3: 0x00007fff8584d92e libobjc.A.dylib`(anonymous = namespace)::AutoreleasePoolPage::pop(void*) + 70 frame #4: 0x00007fff974c4987 = QuartzCore`CA::Transaction::observer_callback(__CFRunLoopObserver*, = unsigned long, void*) + 87 frame #5: 0x00007fff995f2067 = CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION= __ + 23 frame #6: 0x00007fff995f1fd7 CoreFoundation`__CFRunLoopDoObservers + = 391 frame #7: 0x00007fff995d0ef8 CoreFoundation`CFRunLoopRunSpecific + = 328 frame #8: 0x00007fff84c4571e HIServices`waitForTransaction + 204 frame #9: 0x00007fff92c12b07 AppKit`minimizeItemsMaybeBatching + 89 frame #10: 0x00007fff92c45f29 AppKit`-[NSWindow(NSWindow_Theme) = _minimizeToDock] + 192 frame #11: 0x00000001001a267e Emacs-x86_64-10_9`x_iconify_frame + = 430 frame #12: 0x0000000100010587 Emacs-x86_64-10_9`Ficonify_frame + 135 frame #13: 0x0000000100139ec8 Emacs-x86_64-10_9`Ffuncall + 1016 frame #14: 0x00000001001720f5 Emacs-x86_64-10_9`exec_byte_code + = 2277 frame #15: 0x0000000100139d4f Emacs-x86_64-10_9`Ffuncall + 639 frame #16: 0x00000001001720f5 Emacs-x86_64-10_9`exec_byte_code + = 2277 frame #17: 0x0000000100139d4f Emacs-x86_64-10_9`Ffuncall + 639 frame #18: 0x0000000100133faa = Emacs-x86_64-10_9`Ffuncall_interactively + 58 frame #19: 0x0000000100139de7 Emacs-x86_64-10_9`Ffuncall + 791 frame #20: 0x00000001001397f8 Emacs-x86_64-10_9`Fapply + 136 frame #21: 0x00000001001347ba Emacs-x86_64-10_9`Fcall_interactively = + 2042 frame #22: 0x0000000100139efb Emacs-x86_64-10_9`Ffuncall + 1067 frame #23: 0x00000001001720f5 Emacs-x86_64-10_9`exec_byte_code + = 2277 frame #24: 0x0000000100139d4f Emacs-x86_64-10_9`Ffuncall + 639 frame #25: 0x000000010013a57d Emacs-x86_64-10_9`call1 + 45 frame #26: 0x00000001000bd66a Emacs-x86_64-10_9`command_loop_1 + = 1962 frame #27: 0x0000000100138946 = Emacs-x86_64-10_9`internal_condition_case + 70 frame #28: 0x00000001000cdf60 Emacs-x86_64-10_9`command_loop_2 + 48 frame #29: 0x00000001001384a6 Emacs-x86_64-10_9`internal_catch + 54 frame #30: 0x00000001000bc58e Emacs-x86_64-10_9`command_loop + 158 frame #31: 0x00000001000bc4a9 Emacs-x86_64-10_9`recursive_edit_1 + = 105 frame #32: 0x00000001000bc6cc Emacs-x86_64-10_9`Frecursive_edit + = 220 frame #33: 0x00000001000bb3ae Emacs-x86_64-10_9`main + 5854 frame #34: 0x00007fff85d4a5ad libdyld.dylib`start + 1