From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Maneesh Yadav Newsgroups: gmane.emacs.bugs Subject: bug#21965: 24.5; Emacs freezes when canceling at open file Date: Tue, 24 Nov 2015 14:58:11 -0800 Message-ID: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1448405969 11592 80.91.229.3 (24 Nov 2015 22:59:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Nov 2015 22:59:29 +0000 (UTC) Cc: 21965@debbugs.gnu.org To: John Wiegley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 24 23:59:10 2015 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 1a1MYG-0000fK-IV for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Nov 2015 23:59:08 +0100 Original-Received: from localhost ([::1]:41871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1MYH-0001wN-SE for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Nov 2015 17:59:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1MYE-0001w6-Ii for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2015 17:59:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1MYA-0001qS-8R for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2015 17:59:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1MYA-0001qB-4s for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2015 17:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a1MYA-00046v-1L for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2015 17:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Maneesh Yadav Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Nov 2015 22:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21965 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21965-submit@debbugs.gnu.org id=B21965.144840589615745 (code B ref 21965); Tue, 24 Nov 2015 22:59:01 +0000 Original-Received: (at 21965) by debbugs.gnu.org; 24 Nov 2015 22:58:16 +0000 Original-Received: from localhost ([127.0.0.1]:51797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1MXQ-00045s-13 for submit@debbugs.gnu.org; Tue, 24 Nov 2015 17:58:16 -0500 Original-Received: from mail-pa0-f44.google.com ([209.85.220.44]:34684) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1MXM-00045i-02 for 21965@debbugs.gnu.org; Tue, 24 Nov 2015 17:58:14 -0500 Original-Received: by padhx2 with SMTP id hx2so35933829pad.1 for <21965@debbugs.gnu.org>; Tue, 24 Nov 2015 14:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OyzCoJ68xe6nnnJTVTl3RPwGNXafRJ32puFB6PYieMU=; b=nW37Mdzl6BG1RoXklOTB/OhbLwNzfwbJ7tPPtQFToSLbNm5sgmbbFlTRpRNfSX/7cT fBN7t3HdNq4foLApH3C+IAp7fIE5mcyVuw95S3F+dS2Rbkl7WaHIfZfxNGLGhYZHefez SXQBE9E66hkd16UgTjeJIidIkaTQcfj11UDIGdQM+gext4fBNz0GBusRHS+fjyFQPR6Z DNaUPxWhSKttTRaevy4vKOoH64Xrr/JkfSpQUXvcgmn6yCCbhYIZkCM79EaEKe35Rnwu O0ve02PwJdwVtwnHMyWH2sE0jpHVC/NPFWLi+NOdvh2K8MJerSyjiBtAUYElqnu3Ms2F KECA== X-Received: by 10.66.217.166 with SMTP id oz6mr17671909pac.96.1448405891093; Tue, 24 Nov 2015 14:58:11 -0800 (PST) Original-Received: by 10.66.196.135 with HTTP; Tue, 24 Nov 2015 14:58:11 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109204 Archived-At: lldb "thread continue" runs after, but emacs remains unresponsive 'thread step-in" does increment the instruction counter (output below)...but not really sure what that implies. (lldb) thread step-in Process 25251 stopped * thread #1: tid = 0x746f0, 0x00007fff8a861168 libsystem_kernel.dylib`__psynch_mutexwait + 12, queue = 'com.apple.main-thread', stop reason = instruction step into frame #0: 0x00007fff8a861168 libsystem_kernel.dylib`__psynch_mutexwait + 12 libsystem_kernel.dylib`__psynch_mutexwait: -> 0x7fff8a861168 <+12>: movq %rax, %rdi 0x7fff8a86116b <+15>: jmp 0x7fff8a85cc53 ; cerror_nocancel 0x7fff8a861170 <+20>: retq 0x7fff8a861171 <+21>: nop (lldb) thread step-in Process 25251 stopped * thread #1: tid = 0x746f0, 0x00007fff8a86116b libsystem_kernel.dylib`__psynch_mutexwait + 15, queue = 'com.apple.main-thread', stop reason = instruction step into frame #0: 0x00007fff8a86116b libsystem_kernel.dylib`__psynch_mutexwait + 15 libsystem_kernel.dylib`__psynch_mutexwait: -> 0x7fff8a86116b <+15>: jmp 0x7fff8a85cc53 ; cerror_nocancel 0x7fff8a861170 <+20>: retq 0x7fff8a861171 <+21>: nop 0x7fff8a861172 <+22>: nop (lldb) thread step-in Process 25251 stopped * thread #1: tid = 0x746f0, 0x00007fff8a85cc53 libsystem_kernel.dylib`cerror_nocancel, queue = 'com.apple.main-thread', stop reason = instruction step into frame #0: 0x00007fff8a85cc53 libsystem_kernel.dylib`cerror_nocancel libsystem_kernel.dylib`cerror_nocancel: -> 0x7fff8a85cc53 <+0>: movl %edi, -0x14ad19d9(%rip) ; errno 0x7fff8a85cc59 <+6>: movq %gs:0x8, %rax 0x7fff8a85cc62 <+15>: testq %rax, %rax 0x7fff8a85cc65 <+18>: je 0x7fff8a85cc69 ; <+22> On Tue, Nov 24, 2015 at 2:51 PM, Maneesh Yadav wrote: > FWIW I just triggered the condition 3 times in a row (I seem to be > getting better at triggering it), attached with lldb output > (backtraces looks the same as before as well). Looks like the same > instruction? > > > #1 > > > > Process 25176 stopped > > * thread #1: tid = 0x7369a, 0x00007fff8a861166 > libsystem_kernel.dylib`__psynch_mutexwait + 10, queue = > 'com.apple.main-thread', stop reason = signal SIGSTOP > > frame #0: 0x00007fff8a861166 libsystem_kernel.dylib`__psynch_mutexwait + 10 > > libsystem_kernel.dylib`__psynch_mutexwait: > > -> 0x7fff8a861166 <+10>: jae 0x7fff8a861170 ; <+20> > > 0x7fff8a861168 <+12>: movq %rax, %rdi > > 0x7fff8a86116b <+15>: jmp 0x7fff8a85cc53 ; cerror_nocancel > > 0x7fff8a861170 <+20>: retq > > > (lldb) thread backtrace > > * thread #1: tid = 0x7369a, 0x00007fff8a861166 > libsystem_kernel.dylib`__psynch_mutexwait + 10, queue = > 'com.apple.main-thread', stop reason = signal SIGSTOP > > * frame #0: 0x00007fff8a861166 libsystem_kernel.dylib`__psynch_mutexwait + 10 > > frame #1: 0x00007fff853b5696 > libsystem_pthread.dylib`_pthread_mutex_lock + 480 > > frame #2: 0x0000000100a17ba1 libglib-2.0.0.dylib`g_mutex_lock + 26 > > frame #3: 0x00000001009db284 libglib-2.0.0.dylib`g_main_context_acquire + 42 > > frame #4: 0x000000010024fc47 emacs`xg_select + 231 > ... > > > > #2 > > Process 25238 stopped > > * thread #1: tid = 0x742be, 0x00007fff8a861166 > libsystem_kernel.dylib`__psynch_mutexwait + 10, queue = > 'com.apple.main-thread', stop reason = signal SIGSTOP > > frame #0: 0x00007fff8a861166 libsystem_kernel.dylib`__psynch_mutexwait + 10 > > libsystem_kernel.dylib`__psynch_mutexwait: > > -> 0x7fff8a861166 <+10>: jae 0x7fff8a861170 ; <+20> > > 0x7fff8a861168 <+12>: movq %rax, %rdi > > 0x7fff8a86116b <+15>: jmp 0x7fff8a85cc53 ; cerror_nocancel > > 0x7fff8a861170 <+20>: retq > > > > #3 > > Process 25251 stopped > > * thread #1: tid = 0x746f0, 0x00007fff8a861166 > libsystem_kernel.dylib`__psynch_mutexwait + 10, queue = > 'com.apple.main-thread', stop reason = signal SIGSTOP > > frame #0: 0x00007fff8a861166 libsystem_kernel.dylib`__psynch_mutexwait + 10 > > libsystem_kernel.dylib`__psynch_mutexwait: > > -> 0x7fff8a861166 <+10>: jae 0x7fff8a861170 ; <+20> > > 0x7fff8a861168 <+12>: movq %rax, %rdi > > 0x7fff8a86116b <+15>: jmp 0x7fff8a85cc53 ; cerror_nocancel > 0x7fff8a861170 <+20>: retq > > > On Mon, Nov 23, 2015 at 7:39 PM, John Wiegley wrote: >>>>>>> Eli Zaretskii writes: >> >>> No. And I'm not even convinced that's where we are blocked. It could be that >>> this is part of a loop that Emacs is waiting in. To prove that we are >>> blocked there, one needs to attach the debugger many times and see that the >>> debugger finds Emacs at _exactly_ the same instruction. Or, after attaching, >>> step Emacs and see that it cannot move even a single instructions. >> >> Fair enough. The docs for g_main_context_acquire do say that it should return >> immediately, if no other thread is holding the lock. >> >> John