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 17:15:10 -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 1448414183 32412 80.91.229.3 (25 Nov 2015 01:16:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Nov 2015 01:16:23 +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 Wed Nov 25 02:16:13 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 1a1Ogs-0002HT-L9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 02:16:10 +0100 Original-Received: from localhost ([::1]:42400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1Ogt-0003Uq-LI for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Nov 2015 20:16:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1Ogq-0003Uc-6P for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2015 20:16:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1Ogl-00049B-6s for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2015 20:16:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1Ogl-000497-2p for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2015 20:16:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a1Ogk-0007gN-LX for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2015 20:16: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: Wed, 25 Nov 2015 01:16:02 +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.144841413329495 (code B ref 21965); Wed, 25 Nov 2015 01:16:02 +0000 Original-Received: (at 21965) by debbugs.gnu.org; 25 Nov 2015 01:15:33 +0000 Original-Received: from localhost ([127.0.0.1]:51885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1OgG-0007fd-B7 for submit@debbugs.gnu.org; Tue, 24 Nov 2015 20:15:32 -0500 Original-Received: from mail-pa0-f53.google.com ([209.85.220.53]:36208) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1Ofv-0007fB-8E for 21965@debbugs.gnu.org; Tue, 24 Nov 2015 20:15:29 -0500 Original-Received: by pacdm15 with SMTP id dm15so39114523pac.3 for <21965@debbugs.gnu.org>; Tue, 24 Nov 2015 17:15:10 -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=NjSqDwbMIk+w///XRCx8K+R5KPNSJpOLgnt38iLwD2I=; b=AMzgogbF93d1lEhl5JFyBG9QOQ3Mv3hK1NfcFV+1GdmafqPo/YkYXV/70SHageF4mP LbR6Yz61fOh1Rr+T+vtRgE9oPsM5LvBDQv2cl+BnzHkXbR8t64zz65lW1yM4uClMi0ld r8P5nBchPJt8bR/+HszdpAKanCczVJ4rwBCd1XhyzSNnNA+4x+yhKw3W5kurwJF2avvk AiGzaJiVtmyxEipQJb7O0yngTeTLgWp+m0H81T6HRrYu5KX49VNm6Fdg67vOz0vNDE/d 91tETtvCzb0/MHV+ozvs9J9hTjbLwXl2HekJEx2jl7xLOrHm2me74Y4ZRmSii90MYfQe 5K5w== X-Received: by 10.98.1.75 with SMTP id 72mr27551936pfb.14.1448414110651; Tue, 24 Nov 2015 17:15:10 -0800 (PST) Original-Received: by 10.66.196.135 with HTTP; Tue, 24 Nov 2015 17:15:10 -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:109209 Archived-At: A disconcerting finding: I could not replicate the bug while briefly commandeering a colleague's machine (a mac which I installed macports emacs onto). I still am uncomfortable with my comprehension of the lldb output but here is 'backtrace all' after triggering the condition (lldb) thread backtrace all * thread #1: tid = 0x7d73b, 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 frame #5: 0x0000000100225c3d emacs`wait_reading_process_output + 3757 frame #6: 0x0000000100008cb6 emacs`sit_for + 582 frame #7: 0x0000000100108f00 emacs`read_char + 4496 frame #8: 0x0000000100104edd emacs`read_key_sequence + 1757 frame #9: 0x0000000100103cec emacs`command_loop_1 + 1212 frame #10: 0x00000001001bf04e emacs`internal_condition_case + 382 frame #11: 0x000000010011ce09 emacs`command_loop_2 + 41 frame #12: 0x00000001001be696 emacs`internal_catch + 342 frame #13: 0x0000000100102ddb emacs`command_loop + 187 frame #14: 0x0000000100102c9f emacs`recursive_edit_1 + 127 frame #15: 0x0000000100102f87 emacs`Frecursive_edit + 327 frame #16: 0x0000000100100fd3 emacs`main + 4387 frame #17: 0x00007fff8707a5c9 libdyld.dylib`start + 1 frame #18: 0x00007fff8707a5c9 libdyld.dylib`start + 1 thread #2: tid = 0x7d73c, 0x00007fff8a8613fa libsystem_kernel.dylib`__select + 10, name = 'gmain' frame #0: 0x00007fff8a8613fa libsystem_kernel.dylib`__select + 10 frame #1: 0x00000001009e8aef libglib-2.0.0.dylib`g_poll + 399 frame #2: 0x00000001009dd667 libglib-2.0.0.dylib`g_main_context_iterate + 326 frame #3: 0x00000001009dd716 libglib-2.0.0.dylib`g_main_context_iteration + 55 frame #4: 0x00000001009de809 libglib-2.0.0.dylib`glib_worker_main + 53 frame #5: 0x00000001009fdcdb libglib-2.0.0.dylib`g_thread_proxy + 90 frame #6: 0x00007fff853b805a libsystem_pthread.dylib`_pthread_body + 131 frame #7: 0x00007fff853b7fd7 libsystem_pthread.dylib`_pthread_start + 176 frame #8: 0x00007fff853b53ed libsystem_pthread.dylib`thread_start + 13 On Tue, Nov 24, 2015 at 5:02 PM, John Wiegley wrote: >>>>>> Maneesh Yadav writes: > >> 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. > > Maneesh, > > Can you show me the full backtrace of all threads when it deadlocks? I just > realized that xg_select is called from wait_reading_process_output, which I > believe means it's callable from multiple threads at once. > > The behavior of g_main_context_acquire is *documented* to never block, but > rather to return FALSE if another thread has the context; if the behavior has > been changed to block on OS X -- and the thread with the context is calling > pselect() and waiting to return -- this would match your experience. > > John