From unknown Sun Jun 22 22:41:34 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21965 <21965@debbugs.gnu.org> To: bug#21965 <21965@debbugs.gnu.org> Subject: Status: 24.5; Emacs freezes when canceling at open file Reply-To: bug#21965 <21965@debbugs.gnu.org> Date: Mon, 23 Jun 2025 05:41:34 +0000 retitle 21965 24.5; Emacs freezes when canceling at open file reassign 21965 emacs submitter 21965 Maneesh Yadav severity 21965 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 20 16:20:02 2015 Received: (at submit) by debbugs.gnu.org; 20 Nov 2015 21:20:02 +0000 Received: from localhost ([127.0.0.1]:46454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zzt5q-0004sV-QA for submit@debbugs.gnu.org; Fri, 20 Nov 2015 16:20:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35246) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzrCo-0001Z7-Gt for submit@debbugs.gnu.org; Fri, 20 Nov 2015 14:19:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzrCn-0004IL-ER for submit@debbugs.gnu.org; Fri, 20 Nov 2015 14:18:46 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzrCn-0004IH-Bh for submit@debbugs.gnu.org; Fri, 20 Nov 2015 14:18:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzrCl-0001LV-Pd for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2015 14:18:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzrCk-0004I2-HZ for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2015 14:18:43 -0500 Received: from mail-pa0-x236.google.com ([2607:f8b0:400e:c03::236]:35204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzrCk-0004Hy-9R for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2015 14:18:42 -0500 Received: by pacej9 with SMTP id ej9so124724230pac.2 for ; Fri, 20 Nov 2015 11:18:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=uBsT4M6qyAqwYgEq6/WgCW6W0kYb0yMnaLck6SkFcC8=; b=Dfljdrt2tmg5HWD4SxFDdbaehS7pCAeWx0kx2HZyPmhsREZz7guuLsd0KHR35V4V+5 qJO24qsvTehBkb5xHCkOY2zueQgcosF6OXK5mF63kmG0xj+jO9pRS5WndTyV4q2BpaOI yoql14sD5fRFKET1GX9sIWQLStxsh0H/J+EoGmWQVWSMrlvTt6u614fiQp9h+Zfc4F0S HUH0a6OqSVkQVmHB3Waz/TPrywuysMVBSWPMMeS0ZQJc89yGE2ZPNss72e7S2c/V5YVy SAGmrcSmxrJtm97Q0gg2fXgJBhP+6rMnD7DTfDCcPaQagLJR1OKFwbdYZ/95iPxrPTt4 8Y/w== MIME-Version: 1.0 X-Received: by 10.68.196.131 with SMTP id im3mr21587814pbc.59.1448047121188; Fri, 20 Nov 2015 11:18:41 -0800 (PST) Received: by 10.66.196.135 with HTTP; Fri, 20 Nov 2015 11:18:41 -0800 (PST) Date: Fri, 20 Nov 2015 11:18:41 -0800 Message-ID: Subject: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 20 Nov 2015 16:19:41 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) I was experiencing frequent 'freezing' after pressing 'Ctrl-g-g' (I think I have defaulted to pressing twice to make sure I've cancelled out of partial command, seeing "quit" makes me feel happier than "C-x C-g is undefined"). This doesn't seem completely repeatable (but I did just do it on my first try just now): I start 'emacs -Q' and Ctrl-x Ctrl-f to see a prompt in the minibuffer for a file and then Ctrl-g Ctrl-g then emacs freezes (does not respond to Ctrl-g or any keystrokes...I don't think I'm naively invoking an process control key binding (checked with stty-a). Ugh, I am behind on my debug skills, I couldn't find out how to compile my macports version with debug symbols. After I kill with "pkill -USR2 emacs", I get this output (is this useful?): 0 emacs 0x000000010009ebe9 emacs_backtrace + 87 1 emacs 0x0000000100084ffa terminate_due_to_signal + 97 2 emacs 0x000000010009d77b init_baud_rate + 0 3 emacs 0x000000010008e5d3 handle_interrupt + 590 4 emacs 0x000000010009e808 deliver_process_signal + 53 5 libsystem_platform.dylib 0x00007fff8c44df1a _sigtramp + 26 6 ??? 0x0646666406466664 0x0 + 452161392385353316 7 libglib-2.0.0.dylib 0x0000000100888ba1 g_mutex_lock + 26 8 libglib-2.0.0.dylib 0x000000010084c284 g_main_context_acquire + 42 9 emacs 0x00000001001447cc xg_select + 135 10 emacs 0x000000010012dbe2 wait_reading_process_output + 2074 11 emacs 0x00000001000075b5 sit_for + 260 12 emacs 0x000000010008be56 read_char + 5024 13 emacs 0x000000010008918c read_key_sequence + 1526 14 emacs 0x0000000100088973 command_loop_1 + 3983 15 emacs 0x00000001000f251e internal_condition_case + 251 16 emacs 0x00000001000966c9 command_loop_2 + 53 17 emacs 0x00000001000f1f48 internal_catch + 243 18 emacs 0x00000001000871ea recursive_edit_1 + 206 19 emacs 0x000000010008738d Frecursive_edit + 236 20 emacs 0x000000010008648e main + 4658 21 libdyld.dylib 0x00007fff8707a5c9 start + 1 22 ??? 0x0000000000000001 0x0 + 1 In GNU Emacs 24.5.1 (x86_64-apple-darwin14.4.0) of 2015-08-25 on Maneeshs-MacBook-Air.local Configured using: `configure --prefix=/opt/local --without-x --without-dbus --without-gconf --without-libotf --without-m17n-flt --without-gpm --without-gnutls --with-xml2 --infodir /opt/local/share/info/emacs 'CFLAGS=-pipe -Os -arch x86_64' CPPFLAGS=-I/opt/local/include 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-no_pie -arch x86_64'' Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_CTYPE: en_US.UTF-8 value of $LANG: us locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t electric-indent-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... [2 times] Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils help-mode easymenu xterm time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process gfilenotify multi-tty emacs) Memory information: ((conses 16 74606 6954) (symbols 48 16694 0) (miscs 40 32 141) (strings 32 9404 4608) (string-bytes 1 257827) (vectors 16 7133) (vector-slots 8 335922 32343) (floats 8 52 663) (intervals 56 176 13) (buffers 960 12)) From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 20 16:37:57 2015 Received: (at 21965) by debbugs.gnu.org; 20 Nov 2015 21:37:57 +0000 Received: from localhost ([127.0.0.1]:46462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZztNV-0005LF-B9 for submit@debbugs.gnu.org; Fri, 20 Nov 2015 16:37:57 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:33970) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZztNB-0005Kk-84 for 21965@debbugs.gnu.org; Fri, 20 Nov 2015 16:37:55 -0500 Received: by padhx2 with SMTP id hx2so127850791pad.1 for <21965@debbugs.gnu.org>; Fri, 20 Nov 2015 13:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=5MTOBXc/K5JdLcsG2336KG1zPe5EgQo/g7aY5F/zN5E=; b=BGz51/Am0TBCf9/K+Ws/AmR5dDr88K5EYC0qeVHkXSJkbsrgHnJtViqhSYpwXJZkQj B7dYQy/dzXhixG58K9vADlzb29dNAb40XY3FoDHwGVXao+E4nB/o1vFRWr2OiT9Ukhk5 VWlZW55l+Nj0IN41sazI+ibH43ckwU09n1wsE7C1qNrYYbAauMR8A0W0HFi4hw9B1626 WCKGyx2YJJRiK2abzcFW7Y3MH55I92GcrUClshcUMABEoKOrh39B2izXUO4HqQxRRpIA Uwq772mz+2+d9SUflAu/B4Dt/7Ak64tNthozElkZJ56PGSz2Fx5DXVEHwVK6onAK9Mzt febA== X-Received: by 10.68.101.97 with SMTP id ff1mr22397168pbb.166.1448055456528; Fri, 20 Nov 2015 13:37:36 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id sg4sm865873pac.48.2015.11.20.13.37.35 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 20 Nov 2015 13:37:35 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id 0BF1D10A5AD9E; Fri, 20 Nov 2015 13:37:35 -0800 (PST) To: Maneesh Yadav Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-Reply-To: (Maneesh Yadav's message of "Fri, 20 Nov 2015 11:18:41 -0800") Date: Fri, 20 Nov 2015 13:37:22 -0800 Message-ID: References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Maneesh Yadav writes: > I was experiencing frequent 'freezing' after pressing 'Ctrl-g-g' (I think I > have defaulted to pressing twice to make sure I've cancelled out of partial > command, seeing "quit" makes me feel happier than "C-x C-g is undefined"). Only twice? I think my default right now is 10-20 times, just for that extra satisfying feel. > This doesn't seem completely repeatable (but I did just do it on my first > try just now): I start 'emacs -Q' and Ctrl-x Ctrl-f to see a prompt in the > minibuffer for a file and then Ctrl-g Ctrl-g then emacs freezes (does not > respond to Ctrl-g or any keystrokes...I don't think I'm naively invoking an > process control key binding (checked with stty-a). I've experienced deadlocks in the past as well, although recently there have been none. What else are you doing when this happens? Are you using tramp, running any background processes, etc.? John From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 20 16:47:32 2015 Received: (at 21965) by debbugs.gnu.org; 20 Nov 2015 21:47:32 +0000 Received: from localhost ([127.0.0.1]:46466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZztWl-0005aU-Mk for submit@debbugs.gnu.org; Fri, 20 Nov 2015 16:47:32 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:36641) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZztWj-0005aM-SS for 21965@debbugs.gnu.org; Fri, 20 Nov 2015 16:47:30 -0500 Received: by pacdm15 with SMTP id dm15so128004994pac.3 for <21965@debbugs.gnu.org>; Fri, 20 Nov 2015 13:47:29 -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=fR3Dljl7hDRk5Cr3Vow5VJ/+nvTu/PKuPuWRAyrMKiU=; b=0AIQ4qABUKiUgvpQFjHRNs49xe+laFnTAELU24INWnxP28PFn/59U09GMll7kD2ifN TWxshZngS2W/CezB6/yYeWY/vtQumx1EhKh51vb0BZYXd1THt9KnyUlPwhnaGNjVExA/ LcLzEW6Y//z5zlsK9z4ykhbRtB9rij+rkpFWAaHVnS4kJerKsLD3B8eYk4XvaoikKgHE +4LDzh7u5r5bAuRcdlJJxmLfHcrMDOCa3yNOTw+3ArMVxeVjYE6+l46Qxa46kRaKstob mTB6ec+Ge7VfX6NSST7bOOfdHerX2XmgmCMAkT1aYzwMQFAkONR5TJBp6lEOjxzxbscp M3Ew== MIME-Version: 1.0 X-Received: by 10.69.1.9 with SMTP id bc9mr22242216pbd.152.1448056049134; Fri, 20 Nov 2015 13:47:29 -0800 (PST) Received: by 10.66.196.135 with HTTP; Fri, 20 Nov 2015 13:47:29 -0800 (PST) In-Reply-To: References: Date: Fri, 20 Nov 2015 13:47:29 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi John, I'm running in a mac environment with nothing really going on in the background (a web browser, mail, another shell or two open with prompt). No tramp or fancy filesystem stuff or anything (even without -Q I think my startup is fairly modest). I should correct my replication path, I believe I am pressing Ctrl-g-g...but I've replicated the bug with mashing Ctrl-gs when the minibuffer is waiting for input, not clear that the minibuffer is the only context this happens. Thanks so much for your fast response, I hope this is real bug. I held off on reporting it for awhile since I wanted to be sure it wasn't something idiotic I am doing. > This doesn't seem completely repeatable (but I did just do it on my first > try just now): I start 'emacs -Q' and Ctrl-x Ctrl-f to see a prompt in the > minibuffer for a file and then Ctrl-g-g then emacs freezes (does not > respond to Ctrl-g or any keystrokes...I don't think I'm naively invoking an > process control key binding (checked with stty-a). On Fri, Nov 20, 2015 at 1:37 PM, John Wiegley wrote: >>>>>> Maneesh Yadav writes: > >> I was experiencing frequent 'freezing' after pressing 'Ctrl-g-g' (I think I >> have defaulted to pressing twice to make sure I've cancelled out of partial >> command, seeing "quit" makes me feel happier than "C-x C-g is undefined"). > > Only twice? I think my default right now is 10-20 times, just for that extra > satisfying feel. > >> This doesn't seem completely repeatable (but I did just do it on my first >> try just now): I start 'emacs -Q' and Ctrl-x Ctrl-f to see a prompt in the >> minibuffer for a file and then Ctrl-g Ctrl-g then emacs freezes (does not >> respond to Ctrl-g or any keystrokes...I don't think I'm naively invoking an >> process control key binding (checked with stty-a). > > I've experienced deadlocks in the past as well, although recently there have > been none. What else are you doing when this happens? Are you using tramp, > running any background processes, etc.? > > John From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 20 16:56:24 2015 Received: (at 21965) by debbugs.gnu.org; 20 Nov 2015 21:56:24 +0000 Received: from localhost ([127.0.0.1]:46470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZztfL-0005nA-Qd for submit@debbugs.gnu.org; Fri, 20 Nov 2015 16:56:24 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:33637) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zztf0-0005mb-GE for 21965@debbugs.gnu.org; Fri, 20 Nov 2015 16:56:21 -0500 Received: by pabfh17 with SMTP id fh17so132050075pab.0 for <21965@debbugs.gnu.org>; Fri, 20 Nov 2015 13:56:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=hjaWc8b6JUX/pSXejQPLpsQSCRutQaO54AkrUg/lwUo=; b=YUzngxmhLI1lPilcJuJM4zjFVvuHCZFfCeHX5Y/wGmC4R53VwWIFmYSqa88xRczRFz 17zCTnNuwHvICjjut7R/02WfyFjvme/c0mCuXxf/jEHf2SO3QMzGGdFWowW0W6U6NPT1 oJqe02zkfMv5txmwMyO2QlhMfUCIHKIicolN+06ZDfKVZNkcYf7CLlEK7Tm1trcvX5VG MNBpoMW5VZ8cOC4s6mYFMEXGbI8GbhZ5jnt6vxRFnsrNcZmUR3ZNJuZzAwILzXYKujZ6 z19g4NuBM4t5EECJa/n9HzR9rsuVa5bpzCJkJ4AThk0hjaw6rcPKUza44qMjtW6c3iTY t9sA== X-Received: by 10.98.80.22 with SMTP id e22mr2027136pfb.34.1448056561549; Fri, 20 Nov 2015 13:56:01 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id mj1sm918476pab.34.2015.11.20.13.56.00 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 20 Nov 2015 13:56:01 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id 40CCA10A5B316; Fri, 20 Nov 2015 13:56:00 -0800 (PST) To: Maneesh Yadav Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-Reply-To: (Maneesh Yadav's message of "Fri, 20 Nov 2015 13:47:29 -0800") Date: Fri, 20 Nov 2015 13:55:58 -0800 Message-ID: References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Maneesh Yadav writes: > Thanks so much for your fast response, I hope this is real bug. I held off > on reporting it for awhile since I wanted to be sure it wasn't something > idiotic I am doing. I'm pretty sure it's a real bug, since I've encountered it before too. I was forced to "kill -9 PID" to restart Emacs. It used to happen to me at least once a day, and always after having left Emacs idle for a while. I wonder, does it also happen if you try the 'Mac port' version of Carbon Emacs, by Yamamoto Matsuhiro? See: ftp://ftp.math.s.chiba-u.ac.jp/emacs/ I think that may have been how I resolved it here, and I haven't switched back to Cocoa yet. John From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 20 17:02:11 2015 Received: (at 21965) by debbugs.gnu.org; 20 Nov 2015 22:02:11 +0000 Received: from localhost ([127.0.0.1]:46475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zztkw-0005xf-RZ for submit@debbugs.gnu.org; Fri, 20 Nov 2015 17:02:11 -0500 Received: from mtaout24.012.net.il ([80.179.55.180]:38330) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zztku-0005xU-0H for 21965@debbugs.gnu.org; Fri, 20 Nov 2015 17:02:09 -0500 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NY400I00V2SWB00@mtaout24.012.net.il> for 21965@debbugs.gnu.org; Fri, 20 Nov 2015 23:55:00 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NY400IZIVJOH810@mtaout24.012.net.il>; Fri, 20 Nov 2015 23:55:00 +0200 (IST) Date: Sat, 21 Nov 2015 00:01:54 +0200 From: Eli Zaretskii Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-reply-to: X-012-Sender: halo1@inter.net.il To: Maneesh Yadav Message-id: <834mgg5nzh.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21965 Cc: 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Fri, 20 Nov 2015 11:18:41 -0800 > From: Maneesh Yadav > > This doesn't seem completely repeatable (but I did just do it on my > first try just now): I start 'emacs -Q' and Ctrl-x Ctrl-f to see a > prompt in the minibuffer for a file and then Ctrl-g Ctrl-g then emacs > freezes (does not respond to Ctrl-g or any keystrokes...I don't think > I'm naively invoking an process control key binding (checked with stty-a). Not reproducible here (but I'm not on Darwin). From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 20 17:08:19 2015 Received: (at 21965) by debbugs.gnu.org; 20 Nov 2015 22:08:20 +0000 Received: from localhost ([127.0.0.1]:46479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zztqt-00066n-KR for submit@debbugs.gnu.org; Fri, 20 Nov 2015 17:08:19 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:34889) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZztqZ-00065x-Ah for 21965@debbugs.gnu.org; Fri, 20 Nov 2015 17:08:17 -0500 Received: by pacej9 with SMTP id ej9so128339401pac.2 for <21965@debbugs.gnu.org>; Fri, 20 Nov 2015 14:07:58 -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=lGsigJUhBKO0fLW/rniYVAbghXXYM4gnZ6ojq0YJ/OU=; b=FD39pEuU4d3EfMMboJ/O/+nXjZmy+w/ndsiLNuQw0Z4XXdCB19XTVlFDmHm8435JXK TVcCnWg9pArRDQiVTBoIpeLVFLKCppQ1CI4WTCvPDHaSPCqMMNKh2ojZFRys+QNhFrEn M5tdoKL/Wq0o5N5K/100TrYrBdutiilGJgp/oyaXqPvd7cHhZpIniiNkAE7DLDcvWg3v F3avNB8k3TJCh8lM+eCWavxLyNivAAelZI/9WZe0DrkAGGQ7H6FlJLppbmku7OSfsaXX ZMLEO/qV1yjZv1pXDYVbw/g1OcRdXVTpgMCintsXoCHuIYzlDNknhIupAkD7e23I8W58 5ayQ== MIME-Version: 1.0 X-Received: by 10.66.218.225 with SMTP id pj1mr21735485pac.40.1448057278672; Fri, 20 Nov 2015 14:07:58 -0800 (PST) Received: by 10.66.196.135 with HTTP; Fri, 20 Nov 2015 14:07:58 -0800 (PST) In-Reply-To: References: Date: Fri, 20 Nov 2015 14:07:58 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Indeed, I run into it frequently enough it causes pain. When I replicated the bug for this report, I did it right after emacs started (and I was in scratch buffer) FWIW; so idling (in this case) wasn't necessary. I'll try one of the other mac emacs versions. I've tried it a few times just now and haven't been able to make it occur again (though it happens on its own often enough that I know I'll see it again soon). On Fri, Nov 20, 2015 at 1:55 PM, John Wiegley wrote: >>>>>> Maneesh Yadav writes: > >> Thanks so much for your fast response, I hope this is real bug. I held off >> on reporting it for awhile since I wanted to be sure it wasn't something >> idiotic I am doing. > > I'm pretty sure it's a real bug, since I've encountered it before too. I was > forced to "kill -9 PID" to restart Emacs. It used to happen to me at least > once a day, and always after having left Emacs idle for a while. > > I wonder, does it also happen if you try the 'Mac port' version of Carbon > Emacs, by Yamamoto Matsuhiro? See: > > ftp://ftp.math.s.chiba-u.ac.jp/emacs/ > > I think that may have been how I resolved it here, and I haven't switched back > to Cocoa yet. > > John From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 20 17:45:45 2015 Received: (at 21965) by debbugs.gnu.org; 20 Nov 2015 22:45:45 +0000 Received: from localhost ([127.0.0.1]:46515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzuR7-00073f-9O for submit@debbugs.gnu.org; Fri, 20 Nov 2015 17:45:45 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:35791) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzuQm-00073A-2j for 21965@debbugs.gnu.org; Fri, 20 Nov 2015 17:45:43 -0500 Received: by pacej9 with SMTP id ej9so129101469pac.2 for <21965@debbugs.gnu.org>; Fri, 20 Nov 2015 14:45:23 -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=fAkoihnvmzhbecAaQv70f5ZBsYi8IyHR0j6NznF8xMQ=; b=FUwmqvuE0jxRQjTfsdxobE421hZrKrRpKgj046dulMyYnW4/Fo4kLEoZ2CD+QhQKcp C+qRTXSuokMewT6AAIuS2n7ho4P5oEWt7QFtZDq395shHRrccy4laPo3Qw7zZuo1Jr8D zhAgNY09LrFNkT/Q6Lw5cHpQyzA+/yAbtpoJixRkAvaOD9L1ALncBdeKSKIfDFnjVPC0 pysuoanaBTJzCyx4xRBO1hfT1xmVEcUyCusjyZzRj1M5BF6wRtOo6BdrWeyUL4qzZ537 OXs8rrrjx6hEIYaDhdeOQIYGiQx7NpOik+/5CYQ/L3xnqxvvC7wshO9KBiMksmKY8CGx k7Ng== MIME-Version: 1.0 X-Received: by 10.98.71.157 with SMTP id p29mr2235873pfi.152.1448059523207; Fri, 20 Nov 2015 14:45:23 -0800 (PST) Received: by 10.66.196.135 with HTTP; Fri, 20 Nov 2015 14:45:23 -0800 (PST) In-Reply-To: References: Date: Fri, 20 Nov 2015 14:45:23 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Ok I just did it again had to mash Ctrl-g a little (still not sure if it is Ctrl-g-g or Ctrl-g Ctrl-g that triggers it) but a similar backtrace. Just confirming I could replicate it 'on command' (sort of). emacs -Q Auto-save? (y or n) n Abort (and dump core)? (y or n) y Fatal error 6: Abort trap Backtrace: 0 emacs 0x000000010009ebe9 emacs_backtrace + 87 1 emacs 0x0000000100084ffa terminate_due_to_signal + 97 2 emacs 0x000000010009d77b init_baud_rate + 0 3 emacs 0x000000010008e5d3 handle_interrupt + 590 4 emacs 0x000000010009e808 deliver_process_signal + 53 5 libsystem_platform.dylib 0x00007fff8c44df1a _sigtramp + 26 6 ??? 0x0000000000000000 0x0 + 0 7 libglib-2.0.0.dylib 0x0000000100888ba1 g_mutex_lock + 26 8 libglib-2.0.0.dylib 0x000000010084c284 g_main_context_acquire + 42 9 emacs 0x00000001001447cc xg_select + 135 10 emacs 0x000000010012dbe2 wait_reading_process_output + 2074 11 emacs 0x00000001000075b5 sit_for + 260 12 emacs 0x000000010008be56 read_char + 5024 13 emacs 0x000000010008918c read_key_sequence + 1526 14 emacs 0x0000000100088973 command_loop_1 + 3983 15 emacs 0x00000001000f251e internal_condition_case + 251 16 emacs 0x00000001000966c9 command_loop_2 + 53 17 emacs 0x00000001000f1f48 internal_catch + 243 18 emacs 0x00000001000871ea recursive_edit_1 + 206 19 emacs 0x000000010008738d Frecursive_edit + 236 20 emacs 0x000000010008648e main + 4658 21 libdyld.dylib 0x00007fff8707a5c9 start + 1 On Fri, Nov 20, 2015 at 2:07 PM, Maneesh Yadav wrote: > Indeed, I run into it frequently enough it causes pain. > > When I replicated the bug for this report, I did it right after emacs > started (and I was in scratch buffer) FWIW; so idling (in this case) > wasn't necessary. I'll try one of the other mac emacs versions. > > > I've tried it a few times just now and haven't been able to make it > occur again (though it happens on its own often enough that I know > I'll see it again soon). > > On Fri, Nov 20, 2015 at 1:55 PM, John Wiegley wrote: >>>>>>> Maneesh Yadav writes: >> >>> Thanks so much for your fast response, I hope this is real bug. I held off >>> on reporting it for awhile since I wanted to be sure it wasn't something >>> idiotic I am doing. >> >> I'm pretty sure it's a real bug, since I've encountered it before too. I was >> forced to "kill -9 PID" to restart Emacs. It used to happen to me at least >> once a day, and always after having left Emacs idle for a while. >> >> I wonder, does it also happen if you try the 'Mac port' version of Carbon >> Emacs, by Yamamoto Matsuhiro? See: >> >> ftp://ftp.math.s.chiba-u.ac.jp/emacs/ >> >> I think that may have been how I resolved it here, and I haven't switched back >> to Cocoa yet. >> >> John From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 20 18:27:30 2015 Received: (at 21965) by debbugs.gnu.org; 20 Nov 2015 23:27:30 +0000 Received: from localhost ([127.0.0.1]:46521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zzv5V-00083w-Vn for submit@debbugs.gnu.org; Fri, 20 Nov 2015 18:27:30 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:36070) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zzv5B-00083X-QS for 21965@debbugs.gnu.org; Fri, 20 Nov 2015 18:27:28 -0500 Received: by pacdm15 with SMTP id dm15so130048688pac.3 for <21965@debbugs.gnu.org>; Fri, 20 Nov 2015 15:27:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=Ewd+6Sth0O/APsfTLGEGfI+2ftBRgzOagTO4pLb+jnM=; b=p7BJjmhcINl5Gm5QTZUZ5PYI+NzyzqcEqAFP4HJ/587k76K/18GzDDOiDAj906oG+D yZSkZoJxgEDcvoZBtCod0cUEX9uG6SP7hX1n2WAdmrUPY5E33PTvRxLRWU5/Y+xq2eIc S5PD7t63hv04g2TaepR1Dlv4o4KDs7fRbVL9/QfG4gwzdgUAwUy7bR65/WEx/wDnqxxl PtAfpZVZ/tj4pyZkV5dm0gsa0/kgGY6Z93ek4UUc1vGwDNOZfmoC0oECx0v7QoX5p5cl jDcEgymCFM6vnKBWwgIsHG5GqTSslAhOhJ/WOSjbEDC3q9oP1qmuOGNFu5VUVdp2QE83 TRMA== X-Received: by 10.66.228.137 with SMTP id si9mr22553378pac.63.1448062029025; Fri, 20 Nov 2015 15:27:09 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id h28sm646309pfd.70.2015.11.20.15.27.07 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 20 Nov 2015 15:27:07 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id 0F2F210A5C75B; Fri, 20 Nov 2015 15:27:07 -0800 (PST) To: Maneesh Yadav Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-Reply-To: (Maneesh Yadav's message of "Fri, 20 Nov 2015 14:45:23 -0800") Date: Fri, 20 Nov 2015 15:26:10 -0800 Message-ID: References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Maneesh Yadav writes: > Ok I just did it again had to mash Ctrl-g a little (still not sure if it is > Ctrl-g-g or Ctrl-g Ctrl-g that triggers it) but a similar backtrace. Just > confirming I could replicate it 'on command' (sort of). Ok, the next step will be to build you Emacs with debugging, and see if that adds more to the trace. We may need to start adding some print statements, to find out if `wait_reading_process_output' is really the blocking call. John From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 20 18:32:39 2015 Received: (at 21965) by debbugs.gnu.org; 20 Nov 2015 23:32:39 +0000 Received: from localhost ([127.0.0.1]:46525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzvAU-0008Ch-O4 for submit@debbugs.gnu.org; Fri, 20 Nov 2015 18:32:38 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35964) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzvAT-0008Ca-7z for 21965@debbugs.gnu.org; Fri, 20 Nov 2015 18:32:37 -0500 Received: by pacdm15 with SMTP id dm15so130157366pac.3 for <21965@debbugs.gnu.org>; Fri, 20 Nov 2015 15:32:36 -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=BcLx7140ZzDD7OXwyE2WWoep8Xu666wnk7Bc5+LY708=; b=WLL1nJQBkNEu5MrGT/2NIUkXnf2KRfXSbVItLvsyrjmWUN2cWnQw/Da8RtCRtGgzW2 eFrowWy5vay/BmNwfJu+3H9pBuk8aELsZIWxPG4kSEVwEv+gMvQisOggmwGNQsSg8nop wUV0Ee+iSV6V3Z99PL3DN5Dhp3eLDYfDL/roSBhXNfW0j/Yr7HX8FmvJrKTbt4wwWsLr QPEJzvnn9c/dWT+uFrGQdThR0/CLuqKLRFeb3yhiY+wRKmbjk747BU4A0rKF9WbN/mTn iaXV9fmOIvAUw4lOo5orJy5bCbikhDgN51vso9e3Jirv2bngjgZXGZMTdT51ADKoUyII u5fg== MIME-Version: 1.0 X-Received: by 10.98.42.148 with SMTP id q142mr2430200pfq.0.1448062356521; Fri, 20 Nov 2015 15:32:36 -0800 (PST) Received: by 10.66.196.135 with HTTP; Fri, 20 Nov 2015 15:32:36 -0800 (PST) In-Reply-To: References: Date: Fri, 20 Nov 2015 15:32:36 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Apologies for the debug newbieness...this shows that the debug symbols are in there, correct? maneeshyadav$ otool -Iv /opt/local/bin/emacs /opt/local/bin/emacs: Indirect symbols for (__TEXT,__stubs) 256 entries address index name 0x0000000100151d60 6480 _htmlReadMemory 0x0000000100151d66 6610 _xmlCheckVersion 0x0000000100151d6c 6611 _xmlCleanupParser 0x0000000100151d72 6612 _xmlDocGetRootElement 0x0000000100151d78 6613 _xmlFreeDoc 0x0000000100151d7e 6614 _xmlReadMemory 0x0000000100151d84 6588 _tgetent 0x0000000100151d8a 6589 _tgetflag 0x0000000100151d90 6590 _tgetnum 0x0000000100151d96 6591 _tgetstr 0x0000000100151d9c 6592 _tgoto 0x0000000100151da2 6596 _tparm 0x0000000100151da8 6597 _tputs 0x0000000100151dae 6352 __NSGetEnviron 0x0000000100151db4 6353 ___assert_rtn On Fri, Nov 20, 2015 at 3:26 PM, John Wiegley wrote: >>>>>> Maneesh Yadav writes: > >> Ok I just did it again had to mash Ctrl-g a little (still not sure if it is >> Ctrl-g-g or Ctrl-g Ctrl-g that triggers it) but a similar backtrace. Just >> confirming I could replicate it 'on command' (sort of). > > Ok, the next step will be to build you Emacs with debugging, and see if that > adds more to the trace. We may need to start adding some print statements, to > find out if `wait_reading_process_output' is really the blocking call. > > John From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 20 18:54:46 2015 Received: (at 21965) by debbugs.gnu.org; 20 Nov 2015 23:54:46 +0000 Received: from localhost ([127.0.0.1]:46531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzvVt-0000Fu-PM for submit@debbugs.gnu.org; Fri, 20 Nov 2015 18:54:45 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:35242) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzvVr-0000Fl-JZ for 21965@debbugs.gnu.org; Fri, 20 Nov 2015 18:54:44 -0500 Received: by pacej9 with SMTP id ej9so130475102pac.2 for <21965@debbugs.gnu.org>; Fri, 20 Nov 2015 15:54:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=lQGGmABvsndKYW/GQ738aRM6d7xpcLR+4dk634VRM/w=; b=pZCfxjqTiTfNqidBOkbCg6ME2V0eue6OCsP++lCGfzcD20sLtZBBKRBMPRVDE0AitQ Yd23AgbmGwEvKmCTCDnaWq1nPQH5zpZyQI1NdZB1Hy/dU0EdxqYPPuznAmEPV2qCzlxT QO/1Vgy7S/+9AAPyDmpFBZMklJNyQonIbjkZZxgVAbFdNif7W3ra1yRWJUIVDLFUuGZj jFL+DNgoGXLEWVO7SjOmK07KBC2aZujoXyDL4a6VopqVM0fKOUiIi5VK070Qro0rs1MX OhkC0ykHuqjeqV2neIQckBOXUz1wSWV8nTm8tQL6V2VnFMnqD0dc8/+KTsG1AMipE5Al aJTg== X-Received: by 10.68.99.34 with SMTP id en2mr12838579pbb.31.1448063682779; Fri, 20 Nov 2015 15:54:42 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id in6sm1092371pbd.86.2015.11.20.15.54.41 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 20 Nov 2015 15:54:41 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id 93C7210A5C8E8; Fri, 20 Nov 2015 15:54:40 -0800 (PST) To: Maneesh Yadav Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-Reply-To: (Maneesh Yadav's message of "Fri, 20 Nov 2015 15:32:36 -0800") Date: Fri, 20 Nov 2015 15:54:39 -0800 Message-ID: References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Maneesh Yadav writes: > Apologies for the debug newbieness...this shows that the debug symbols are > in there, correct? Only the symbol table is there (i.e., it hasn't been stripped), not the debug info (i.e., -g) that correlates TEXT addresses with file and line numbers. John From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 20 20:47:08 2015 Received: (at 21965) by debbugs.gnu.org; 21 Nov 2015 01:47:08 +0000 Received: from localhost ([127.0.0.1]:46557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzxGd-0002sf-Og for submit@debbugs.gnu.org; Fri, 20 Nov 2015 20:47:07 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35262) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzxGJ-0002rj-8w for 21965@debbugs.gnu.org; Fri, 20 Nov 2015 20:47:06 -0500 Received: by pacej9 with SMTP id ej9so132641262pac.2 for <21965@debbugs.gnu.org>; Fri, 20 Nov 2015 17:46:46 -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=ePF2f9hyVutKflW+DCETrLmxd8qdkJ+u5L+8XGeJ3MM=; b=IwN4FwsM1ur4f/OfTbbVw56zsadUvGC1WBqWJ9ymQssHjmBu3mxElNeDjzwbURm3Rb gi2p/rCNF2JqOMgF0iOzAjUSY7z8pxvJdUHK4Bb+GZ2MuPqo4kQkJJjuCNJTNdQrMpGY PdldURuEufEcGjAQafu//317DmwOLTfIUNWK3s7OLfsDDgRZZkBRV0sEtOBaKOrYtDoT 0KVpXW8L9b9ClSRykFVvlAKf9e5qEb9xX5CgVvBNwpB2aUHM/DopFpgZ/km3VcxqJxyU 0KMeugLzrD4DTQOBuWWUv+XI2+anxdiqiAu4eD690+GOQN2A9P77QFXi9pPXuKDxy0ot UHOA== MIME-Version: 1.0 X-Received: by 10.67.23.166 with SMTP id ib6mr22898896pad.82.1448070406252; Fri, 20 Nov 2015 17:46:46 -0800 (PST) Received: by 10.66.196.135 with HTTP; Fri, 20 Nov 2015 17:46:46 -0800 (PST) In-Reply-To: References: Date: Fri, 20 Nov 2015 17:46:46 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Ugh, this is not a part of emacs, but for the sake of anyone else who has to to do the same in the future. Does anyone have hints as to building the debug version of macport emacs? I did: port dir emacs (backed up original portfile) added compiler flags -O0 and -g *not quite sure where how to to run dsym... Assuming I can edit the portfile properly then I should be able to building the debug emacs binary. If anyone already has a clever way of doing this, please let me know otherwise I will trudge through macports. On Fri, Nov 20, 2015 at 3:54 PM, John Wiegley wrote: >>>>>> Maneesh Yadav writes: > >> Apologies for the debug newbieness...this shows that the debug symbols are >> in there, correct? > > Only the symbol table is there (i.e., it hasn't been stripped), not the debug > info (i.e., -g) that correlates TEXT addresses with file and line numbers. > > John From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 21 02:31:16 2015 Received: (at 21965) by debbugs.gnu.org; 21 Nov 2015 07:31:17 +0000 Received: from localhost ([127.0.0.1]:46603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a02dg-0002li-H9 for submit@debbugs.gnu.org; Sat, 21 Nov 2015 02:31:16 -0500 Received: from mtaout27.012.net.il ([80.179.55.183]:51750) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a02dL-0002l1-Ku for 21965@debbugs.gnu.org; Sat, 21 Nov 2015 02:31:15 -0500 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NY500B00LTIQJ00@mtaout27.012.net.il> for 21965@debbugs.gnu.org; Sat, 21 Nov 2015 09:24:30 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NY5003GALWUTE70@mtaout27.012.net.il>; Sat, 21 Nov 2015 09:24:30 +0200 (IST) Date: Sat, 21 Nov 2015 09:29:22 +0200 From: Eli Zaretskii Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-reply-to: X-012-Sender: halo1@inter.net.il To: Maneesh Yadav Message-id: <8337vz6ca5.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21965 Cc: jwiegley@gmail.com, 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Fri, 20 Nov 2015 14:45:23 -0800 > From: Maneesh Yadav > Cc: 21965@debbugs.gnu.org > > Ok I just did it again had to mash Ctrl-g a little (still not sure if > it is Ctrl-g-g or Ctrl-g Ctrl-g that triggers it) but a similar > backtrace. Just confirming I could replicate it 'on command' (sort > of). > > emacs -Q > Auto-save? (y or n) n > Abort (and dump core)? (y or n) y > Fatal error 6: Abort trap > > Backtrace: > 0 emacs 0x000000010009ebe9 emacs_backtrace + 87 > 1 emacs 0x0000000100084ffa > terminate_due_to_signal + 97 > 2 emacs 0x000000010009d77b init_baud_rate + 0 > 3 emacs 0x000000010008e5d3 > handle_interrupt + 590 > 4 emacs 0x000000010009e808 > deliver_process_signal + 53 > 5 libsystem_platform.dylib 0x00007fff8c44df1a _sigtramp + 26 > 6 ??? 0x0000000000000000 0x0 + 0 > 7 libglib-2.0.0.dylib 0x0000000100888ba1 g_mutex_lock + 26 > 8 libglib-2.0.0.dylib 0x000000010084c284 > g_main_context_acquire + 42 > 9 emacs 0x00000001001447cc xg_select + 135 > 10 emacs 0x000000010012dbe2 > wait_reading_process_output + 2074 > 11 emacs 0x00000001000075b5 sit_for + 260 > 12 emacs 0x000000010008be56 read_char + 5024 > 13 emacs 0x000000010008918c > read_key_sequence + 1526 This backtrace simply says that Emacs called 'abort'. And it did so because the user told it so. We need to know where it hangs or infloops prior to that. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 22 00:13:12 2015 Received: (at 21965) by debbugs.gnu.org; 22 Nov 2015 05:13:12 +0000 Received: from localhost ([127.0.0.1]:47558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0Mxc-00010Y-B9 for submit@debbugs.gnu.org; Sun, 22 Nov 2015 00:13:12 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:35474) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0MxH-0000zf-47 for 21965@debbugs.gnu.org; Sun, 22 Nov 2015 00:13:10 -0500 Received: by pacej9 with SMTP id ej9so157639379pac.2 for <21965@debbugs.gnu.org>; Sat, 21 Nov 2015 21:12:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=WZhWyxZK/MZwXQEOQCAE1qMcKEYg9hYRgC8b3CmhHWM=; b=CoTDvJMM4swUa1MUuglnZRl/wgtcKIjBXU8tzh1Pfr2p/T2H70DQ0ptVceeOkWTKmL YQymzuOJQNG8DZX/zTdTFaC6CyBhWirSh7UsqMkNepjNomEWJvSdCO7FEt1HroHXpIFd ofM0iu5lwbbl6DOJ+XBzCvJB0TJwXuKorT/g7r49ggOvEUuuezV002qjEV5n0UWIKCH+ v8bHWQGjhBQfDh38gQvK6kR4uOg7YQKEwC6VpQtt5V8ej5AppouTMlaz0k3HIUiQxbUS WWEqzyxLOLqnL+TU+J5V86+iwRplHlLMIPZiLS+/djHqSZRlUiiXSUzOqoXnaTEfJZHo ajAw== X-Received: by 10.98.10.197 with SMTP id 66mr8731401pfk.37.1448169170424; Sat, 21 Nov 2015 21:12:50 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id pq1sm5361649pbb.91.2015.11.21.21.12.49 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 21 Nov 2015 21:12:49 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id 1CCB310A6420C; Sat, 21 Nov 2015 21:12:49 -0800 (PST) To: Eli Zaretskii Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-Reply-To: <8337vz6ca5.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 Nov 2015 09:29:22 +0200") Date: Sat, 21 Nov 2015 21:11:11 -0800 Message-ID: References: <8337vz6ca5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Maneesh Yadav , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Eli Zaretskii writes: >> 7 libglib-2.0.0.dylib 0x0000000100888ba1 g_mutex_lock + 26 >> 8 libglib-2.0.0.dylib 0x000000010084c284 g_main_context_acquire + 42 >> 9 emacs 0x00000001001447cc xg_select + 135 >> 10 emacs 0x000000010012dbe2 wait_reading_process_output + 2074 >> 11 emacs 0x00000001000075b5 sit_for + 260 >> 12 emacs 0x000000010008be56 read_char + 5024 >> 13 emacs 0x000000010008918c read_key_sequence + 1526 > This backtrace simply says that Emacs called 'abort'. And it did so > because the user told it so. It might also be saying that Emacs deadlocked trying to obtain a mutex. John From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 22 00:15:05 2015 Received: (at 21965) by debbugs.gnu.org; 22 Nov 2015 05:15:05 +0000 Received: from localhost ([127.0.0.1]:47564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0MzQ-00014A-Rc for submit@debbugs.gnu.org; Sun, 22 Nov 2015 00:15:05 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:35926) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0MzO-000142-Ic for 21965@debbugs.gnu.org; Sun, 22 Nov 2015 00:15:03 -0500 Received: by pacdm15 with SMTP id dm15so157849995pac.3 for <21965@debbugs.gnu.org>; Sat, 21 Nov 2015 21:15:02 -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=/mCcXFEo+7q7PrclAsQLp+q2crONmkIBjrUxFq/zcOA=; b=ZpRWg559JFucTGi/n5uGTMT/ApyTV/uLX5EVEaoPKYB2NUZqwP3UccWUoQyrPzPW22 4eLHaYLmEzrx/jL9tjbOCHw9m0lS+gz0kVeNrAHBeUZhMWhUhRB40CydbQk+kXpAQoBj fVzqCyk985uwPI+Gx4/mZnSTK1ne1U2BdmeyNI3JmqF0+iZXoGh54a7mIHO97zez5XcF GrgxPVxkIITNHTLwFkTdDnax935WUQjzwBr/Nk7yhcj49M34YJPGwlaAtQ9zfC3uF4Sv Hd1HoiPDzwFrqFTvUaHKfwSH5/DDJHD96Ch5ynMMMSqK/3DLO1k6HxWddVwSsErTB+81 aNIw== MIME-Version: 1.0 X-Received: by 10.98.71.157 with SMTP id p29mr8873627pfi.152.1448169302110; Sat, 21 Nov 2015 21:15:02 -0800 (PST) Received: by 10.66.196.135 with HTTP; Sat, 21 Nov 2015 21:15:02 -0800 (PST) In-Reply-To: References: <8337vz6ca5.fsf@gnu.org> Date: Sat, 21 Nov 2015 21:15:02 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) The trace is what what I saw after I sent pkill -USR2 emacs, I don't know quite know how to read it (other than the vague references to mutexs...no idea if that is actually relevant). Still trying to figure out how to get macports to compile debug emacs...hopefully will figure it out this w/e. On Sat, Nov 21, 2015 at 9:11 PM, John Wiegley wrote: >>>>>> Eli Zaretskii writes: > >>> 7 libglib-2.0.0.dylib 0x0000000100888ba1 g_mutex_lock + 26 >>> 8 libglib-2.0.0.dylib 0x000000010084c284 g_main_context_acquire + 42 >>> 9 emacs 0x00000001001447cc xg_select + 135 >>> 10 emacs 0x000000010012dbe2 wait_reading_process_output + 2074 >>> 11 emacs 0x00000001000075b5 sit_for + 260 >>> 12 emacs 0x000000010008be56 read_char + 5024 >>> 13 emacs 0x000000010008918c read_key_sequence + 1526 > >> This backtrace simply says that Emacs called 'abort'. And it did so >> because the user told it so. > > It might also be saying that Emacs deadlocked trying to obtain a mutex. > > John From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 23 16:29:27 2015 Received: (at 21965) by debbugs.gnu.org; 23 Nov 2015 21:29:27 +0000 Received: from localhost ([127.0.0.1]:49952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0yfu-0001jd-Hy for submit@debbugs.gnu.org; Mon, 23 Nov 2015 16:29:27 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:33878) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0yfs-0001jV-US for 21965@debbugs.gnu.org; Mon, 23 Nov 2015 16:29:25 -0500 Received: by padhx2 with SMTP id hx2so203038294pad.1 for <21965@debbugs.gnu.org>; Mon, 23 Nov 2015 13:29:24 -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=Vh+yKs7Q+16v2647XuQPauWHflvklfBNMzQPIkF9Zic=; b=i099FcabFGe7crq8MMYMLb/UDOnF4tih8tnV07IWN/fAzlX8MgMyQ1nnlzkRyAJm1Z IABntUB1Nrwgi9Y/5iGOFhCXXoEwcQnsC3mmaqD2hYye9UUuD3P9NEoiXTck8sKQ9XpE HMDXIz9Rbo5x0YQIoE+CFBFK+xuwObpdsPr/lyIaxxucQ/bWUBGdXMpdGIAtNXLBPgVy va7XsraW60tO/UDLhlf0lVgo88vvMKyF5M+9R285Gw2fi2RVrl6vDJVhhWgz9ZSly62O fN9mNwD25V5Xq0mztCNQJIo2mGrQ+p1Fkp63uIItMiotpE5Z7PAo6muMmtDwmyp9/0Ng QLcw== MIME-Version: 1.0 X-Received: by 10.69.1.9 with SMTP id bc9mr38421024pbd.152.1448314164121; Mon, 23 Nov 2015 13:29:24 -0800 (PST) Received: by 10.66.196.135 with HTTP; Mon, 23 Nov 2015 13:29:24 -0800 (PST) In-Reply-To: References: <8337vz6ca5.fsf@gnu.org> Date: Mon, 23 Nov 2015 13:29:24 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Flog me if I am not doing this right. Seems that +debug on macports is the easy to make debug compiles (an old thread seemed to suggest that macports rejected this idea...but I guess it was eventually accepted). So installed emacs +debug and reproduced the crash, attached to emacs via lldb and got this backtrace (which looks a lot like the previous, can I provide better info somehow?): (lldb) process attach --name emacs Process 23166 stopped * thread #1: tid = 0x4d18b, 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 Executable module set to "/opt/local/bin/emacs". Architecture set to: x86_64h-apple-macosx. (lldb) thread backtrace * thread #1: tid = 0x4d18b, 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 On Sat, Nov 21, 2015 at 9:15 PM, Maneesh Yadav wrote: > The trace is what what I saw after I sent pkill -USR2 emacs, I don't > know quite know how to read it (other than the vague references to > mutexs...no idea if that is actually relevant). Still trying to > figure out how to get macports to compile debug emacs...hopefully will > figure it out this w/e. > > On Sat, Nov 21, 2015 at 9:11 PM, John Wiegley wrote: >>>>>>> Eli Zaretskii writes: >> >>>> 7 libglib-2.0.0.dylib 0x0000000100888ba1 g_mutex_lock + 26 >>>> 8 libglib-2.0.0.dylib 0x000000010084c284 g_main_context_acquire + 42 >>>> 9 emacs 0x00000001001447cc xg_select + 135 >>>> 10 emacs 0x000000010012dbe2 wait_reading_process_output + 2074 >>>> 11 emacs 0x00000001000075b5 sit_for + 260 >>>> 12 emacs 0x000000010008be56 read_char + 5024 >>>> 13 emacs 0x000000010008918c read_key_sequence + 1526 >> >>> This backtrace simply says that Emacs called 'abort'. And it did so >>> because the user told it so. >> >> It might also be saying that Emacs deadlocked trying to obtain a mutex. >> >> John From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 23 17:17:34 2015 Received: (at 21965) by debbugs.gnu.org; 23 Nov 2015 22:17:35 +0000 Received: from localhost ([127.0.0.1]:49995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0zQU-0003Bp-G7 for submit@debbugs.gnu.org; Mon, 23 Nov 2015 17:17:34 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:35778) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0zQR-0003BT-Bt for 21965@debbugs.gnu.org; Mon, 23 Nov 2015 17:17:31 -0500 Received: by pacej9 with SMTP id ej9so204045709pac.2 for <21965@debbugs.gnu.org>; Mon, 23 Nov 2015 14:17:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=8dLSIugvYM0x4Cx4a2JFBM9WCf8BgEGord3STvzobuk=; b=URdfe9xMKV9FzkUd0DSxvud8j7ZzUykrGwmgYgQcZ7i9BGQ/a2uaa93/OSN62802Db PD3+NsSQhKlP6XJSFziWUob8tbDl2oPkb9AcJsRybgNis6Frwg2Z2rhh9nJcjT3VqaCS QEUI+5ucCFRrrDOQMF+IgFlgFf3S2144Wh/PykIH9BHoSj8t/rNMbZBR1wH8qhMzAOms RK+VrVd+PBEtjwdkTB6sR+w8+6ilvsZpLWo+D7ZEEWzjPMKMtKu3cvTOrMxVRZjRT/a0 FfE6vzWHZZGhMy+l8M6t11bmbjNlM0yQZs5Ui3kcaVBbvZzjhonIXrlSa7KH3UJE7dJ7 yYTQ== X-Received: by 10.98.67.76 with SMTP id q73mr18731039pfa.73.1448317050951; Mon, 23 Nov 2015 14:17:30 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id tm4sm9991363pab.3.2015.11.23.14.17.26 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 23 Nov 2015 14:17:29 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id 6388710ABDF3A; Mon, 23 Nov 2015 14:17:26 -0800 (PST) To: Maneesh Yadav Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-Reply-To: (Maneesh Yadav's message of "Mon, 23 Nov 2015 13:29:24 -0800") Date: Mon, 23 Nov 2015 14:17:17 -0800 Message-ID: References: <8337vz6ca5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Maneesh Yadav writes: > Flog me if I am not doing this right. Seems that +debug on macports is the > easy to make debug compiles (an old thread seemed to suggest that macports > rejected this idea...but I guess it was eventually accepted). So installed > emacs +debug and reproduced the crash, attached to emacs via lldb and got > this backtrace (which looks a lot like the previous, can I provide better > info somehow?): We're still missing file and line numbers for the Emacs code, which is odd. But not terribly important, since the lockup is happening inside glib, it appears. > frame #3: 0x00000001009db284 > libglib-2.0.0.dylib`g_main_context_acquire + 42 So, here's that function, more or less: gboolean g_main_context_acquire (GMainContext *context) { gboolean result = FALSE; GThread *self = G_THREAD_SELF; if (context == NULL) context = g_main_context_default (); LOCK_CONTEXT (context); /* ... */ } We're blocked waiting on the context. The question then being: who else has that context? Is it another Emacs thread? Eli, does this ring any bells? John From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 23 19:31:20 2015 Received: (at 21965) by debbugs.gnu.org; 24 Nov 2015 00:31:21 +0000 Received: from localhost ([127.0.0.1]:50065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a11Vw-00007G-Ii for submit@debbugs.gnu.org; Mon, 23 Nov 2015 19:31:20 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:33718) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a11Vd-00006X-21 for 21965@debbugs.gnu.org; Mon, 23 Nov 2015 19:31:19 -0500 Received: by pabfh17 with SMTP id fh17so1572404pab.0 for <21965@debbugs.gnu.org>; Mon, 23 Nov 2015 16:31:00 -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=kakkzjLKtfs+YRow+uQNNhpwnW6r4dxVlFyaleJEZ4c=; b=xZNvaM7tqoknRKI7DvknK25bP6DTyv/LIBbZKn/dE84ypZFdk80WrGIY1b5RHM/z6j jVxwiWTedKai2tcAF/pc22hHxmalF5rpItNrrX38C8ObVibMw7VwuugtGsvEIOqGCluf ZTMhPlMFq6Ou7l85a3mo9pnJSMTSi6+u0p//KkVxvCVbwVF0o/Pq+9xFrlJJiUfyVChD +ebEaRPzNBGU0pIE3KiP0cxQJGLk+ZrhulKZVRMN7ZEBnSQcVAUQTfkWymoM5T001nV3 AFFdXRnuercmAuyXRIl/aO3AbMyOCGfGqBLFoQUH2qngaFwdHcKQkkhKSkUVCjWt0WXr XMKA== MIME-Version: 1.0 X-Received: by 10.68.196.131 with SMTP id im3mr39278361pbc.59.1448325060068; Mon, 23 Nov 2015 16:31:00 -0800 (PST) Received: by 10.66.196.135 with HTTP; Mon, 23 Nov 2015 16:30:59 -0800 (PST) In-Reply-To: References: <8337vz6ca5.fsf@gnu.org> Date: Mon, 23 Nov 2015 16:30:59 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) I don't understand the apple framework/glib event handling structure and I doubt this is terribly informative, but for the sake of completeness the output of 'thread list' is pasted below: (lldb) thread list Process 23166 stopped * thread #1: tid = 0x4d18b, 0x00007fff8a861166 libsystem_kernel.dylib`__psynch_mutexwait + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP thread #2: tid = 0x4d18c, 0x00007fff8a8613fa libsystem_kernel.dylib`__select + 10, name = 'gmain' (lldb) On Mon, Nov 23, 2015 at 2:17 PM, John Wiegley wrote: >>>>>> Maneesh Yadav writes: > >> Flog me if I am not doing this right. Seems that +debug on macports is the >> easy to make debug compiles (an old thread seemed to suggest that macports >> rejected this idea...but I guess it was eventually accepted). So installed >> emacs +debug and reproduced the crash, attached to emacs via lldb and got >> this backtrace (which looks a lot like the previous, can I provide better >> info somehow?): > > We're still missing file and line numbers for the Emacs code, which is odd. > But not terribly important, since the lockup is happening inside glib, it > appears. > >> frame #3: 0x00000001009db284 >> libglib-2.0.0.dylib`g_main_context_acquire + 42 > > So, here's that function, more or less: > > gboolean > g_main_context_acquire (GMainContext *context) > { > gboolean result = FALSE; > GThread *self = G_THREAD_SELF; > > if (context == NULL) > context = g_main_context_default (); > > LOCK_CONTEXT (context); > /* ... */ > } > > We're blocked waiting on the context. The question then being: who else has > that context? Is it another Emacs thread? > > Eli, does this ring any bells? > > John From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 23 22:35:02 2015 Received: (at 21965) by debbugs.gnu.org; 24 Nov 2015 03:35:02 +0000 Received: from localhost ([127.0.0.1]:50142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a14Nh-0004u8-BT for submit@debbugs.gnu.org; Mon, 23 Nov 2015 22:35:01 -0500 Received: from mtaout24.012.net.il ([80.179.55.180]:52324) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a14Nf-0004ty-1k for 21965@debbugs.gnu.org; Mon, 23 Nov 2015 22:34:59 -0500 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NYA00L00UFXTU00@mtaout24.012.net.il> for 21965@debbugs.gnu.org; Tue, 24 Nov 2015 05:27:46 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYA00MCJUYAJ310@mtaout24.012.net.il>; Tue, 24 Nov 2015 05:27:46 +0200 (IST) Date: Tue, 24 Nov 2015 05:34:55 +0200 From: Eli Zaretskii Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-reply-to: X-012-Sender: halo1@inter.net.il To: John Wiegley Message-id: <83io4sysrk.fsf@gnu.org> References: <8337vz6ca5.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21965 Cc: maneeshkyadav@gmail.com, 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: John Wiegley > Cc: Eli Zaretskii , 21965@debbugs.gnu.org > Date: Mon, 23 Nov 2015 14:17:17 -0800 > > We're still missing file and line numbers for the Emacs code, which is odd. > But not terribly important, since the lockup is happening inside glib, it > appears. > > > frame #3: 0x00000001009db284 > > libglib-2.0.0.dylib`g_main_context_acquire + 42 > > So, here's that function, more or less: > > gboolean > g_main_context_acquire (GMainContext *context) > { > gboolean result = FALSE; > GThread *self = G_THREAD_SELF; > > if (context == NULL) > context = g_main_context_default (); > > LOCK_CONTEXT (context); > /* ... */ > } > > We're blocked waiting on the context. The question then being: who else has > that context? Is it another Emacs thread? > > Eli, does this ring any bells? 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. If this is really what happens, and Emacs cannot acquire a mutex, that would mean someone is holding that mutex, and the question is who that someone is. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 23 22:39:29 2015 Received: (at 21965) by debbugs.gnu.org; 24 Nov 2015 03:39:29 +0000 Received: from localhost ([127.0.0.1]:50146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a14S1-00050q-CH for submit@debbugs.gnu.org; Mon, 23 Nov 2015 22:39:29 -0500 Received: from mtaout25.012.net.il ([80.179.55.181]:38628) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a14Rz-00050g-0P for 21965@debbugs.gnu.org; Mon, 23 Nov 2015 22:39:27 -0500 Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NYA00C00V6K9O00@mtaout25.012.net.il> for 21965@debbugs.gnu.org; Tue, 24 Nov 2015 05:36:44 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYA00C73VD7SS00@mtaout25.012.net.il>; Tue, 24 Nov 2015 05:36:44 +0200 (IST) Date: Tue, 24 Nov 2015 05:39:22 +0200 From: Eli Zaretskii Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-reply-to: X-012-Sender: halo1@inter.net.il To: Maneesh Yadav Message-id: <83fuzwysk5.fsf@gnu.org> References: <8337vz6ca5.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21965 Cc: jwiegley@gmail.com, 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Mon, 23 Nov 2015 16:30:59 -0800 > From: Maneesh Yadav > Cc: Eli Zaretskii , 21965@debbugs.gnu.org > > I don't understand the apple framework/glib event handling structure > and I doubt this is terribly informative, but for the sake of > completeness the output of 'thread list' is pasted below: > > (lldb) thread list > > Process 23166 stopped > > * thread #1: tid = 0x4d18b, 0x00007fff8a861166 > libsystem_kernel.dylib`__psynch_mutexwait + 10, queue = > 'com.apple.main-thread', stop reason = signal SIGSTOP > > thread #2: tid = 0x4d18c, 0x00007fff8a8613fa > libsystem_kernel.dylib`__select + 10, name = 'gmain' > > (lldb) Where did that STOP signal come from? Could that be the debugger itself? From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 23 22:40:46 2015 Received: (at 21965) by debbugs.gnu.org; 24 Nov 2015 03:40:47 +0000 Received: from localhost ([127.0.0.1]:50153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a14Sy-00052p-Ah for submit@debbugs.gnu.org; Mon, 23 Nov 2015 22:40:46 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:35311) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a14Se-00052C-VI for 21965@debbugs.gnu.org; Mon, 23 Nov 2015 22:40:27 -0500 Received: by pacej9 with SMTP id ej9so6739753pac.2 for <21965@debbugs.gnu.org>; Mon, 23 Nov 2015 19:40:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=XuEcUaPpxOA+ymOpnqA4MJDr8Pv+mRSou98xrryGvCA=; b=s187M0opGoSGHOwdq03BUwZR+KkHcZHHzdszCROtP+dWvLEXte6U1yfHd3JgAqyo0c 9Z9oxFOLiaZUARiBmUGUFj4ueI1bGSTTT2l2demJWHdts+rVy5HZCqaz3jIKoerQsh1j kv3ChQPNa6MU7nrbTSifENrjl+83mC+GyXJe6q+MMs/S8Fgk24iK0hknmJAleY0w+S5E J6aZxH2W+3UnYBzBNj9IzDut6T61esTOZC5eItvsC7gzNBYl8OZbAINCo262iAvg4MoI R4vR1oO7o+DjeiYwzDRpBq6wks34wLV1JHIlzBV51JQ2L0r28JuUcUOhe6VNFrT9k747 K2jA== X-Received: by 10.66.122.105 with SMTP id lr9mr40203382pab.8.1448336408495; Mon, 23 Nov 2015 19:40:08 -0800 (PST) Received: from Hermes-2.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id c5sm12155072pbu.18.2015.11.23.19.40.06 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 23 Nov 2015 19:40:06 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Hermes-2.local (Postfix, from userid 501) id 6EE7649BAE26; Mon, 23 Nov 2015 19:40:05 -0800 (PST) To: Eli Zaretskii Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-Reply-To: <83io4sysrk.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Nov 2015 05:34:55 +0200") Date: Mon, 23 Nov 2015 19:39:46 -0800 Message-ID: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: maneeshkyadav@gmail.com, 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 17:52:18 2015 Received: (at 21965) by debbugs.gnu.org; 24 Nov 2015 22:52:18 +0000 Received: from localhost ([127.0.0.1]:51793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1MRe-0003x3-54 for submit@debbugs.gnu.org; Tue, 24 Nov 2015 17:52:18 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36415) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1MRK-0003wL-4x for 21965@debbugs.gnu.org; Tue, 24 Nov 2015 17:52:16 -0500 Received: by pacdm15 with SMTP id dm15so35678215pac.3 for <21965@debbugs.gnu.org>; Tue, 24 Nov 2015 14:51:57 -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=u/v+u0odmc90Ff2q2o2Ifdwp0Vr0ALf9TL/kM/Q5ItE=; b=k6WtyYX3Hxd3Hd6zbJAgZC2Xu+mz/z8G1ueNv4O6lp9GNGI3jaGQ9Jrlk2jUiPH+L1 xMPx8oxMRjGvUDFZKY/4ElalZZr9EVCkF6L8lcsJQUL8DXxvCj8PXXyIYqBSQPAloEu6 kq4MDoQ6D0m7PZlwfB3NOYKCL9DrpX1dhECbACWk1c1VN2bE77sWvydqGHRJ7zhDcZ1a Uu1rKP5ZfcAl7njSRjnPXyTFOLJ9HP++6Js/T1KB7dmXCqwPnlgkW3mOmbaK5Du2lOZF UlWRqO3PlMTd4/cw7X4BHGR3CYsH1qGBt1bUwoBU/QKr26ncz8Z1EoM4R9arFh8IvFOn Msdw== MIME-Version: 1.0 X-Received: by 10.98.87.83 with SMTP id l80mr26577483pfb.126.1448405517220; Tue, 24 Nov 2015 14:51:57 -0800 (PST) Received: by 10.66.196.135 with HTTP; Tue, 24 Nov 2015 14:51:57 -0800 (PST) In-Reply-To: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> Date: Tue, 24 Nov 2015 14:51:57 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 17:58:16 2015 Received: (at 21965) by debbugs.gnu.org; 24 Nov 2015 22:58:16 +0000 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 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 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== MIME-Version: 1.0 X-Received: by 10.66.217.166 with SMTP id oz6mr17671909pac.96.1448405891093; Tue, 24 Nov 2015 14:58:11 -0800 (PST) Received: by 10.66.196.135 with HTTP; Tue, 24 Nov 2015 14:58:11 -0800 (PST) In-Reply-To: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> Date: Tue, 24 Nov 2015 14:58:11 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 20:03:19 2015 Received: (at 21965) by debbugs.gnu.org; 25 Nov 2015 01:03:19 +0000 Received: from localhost ([127.0.0.1]:51862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1OUQ-0007M8-Tg for submit@debbugs.gnu.org; Tue, 24 Nov 2015 20:03:19 -0500 Received: from mail-vk0-f46.google.com ([209.85.213.46]:33980) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1OU6-0007LK-FA for 21965@debbugs.gnu.org; Tue, 24 Nov 2015 20:03:17 -0500 Received: by vkbs1 with SMTP id s1so24787614vkb.1 for <21965@debbugs.gnu.org>; Tue, 24 Nov 2015 17:02:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=Gwd4/UOLMgfnT7Q0tbcyE1ioacaN9JvumgOyu4G/Zg8=; b=mAST5Z08Hx5LkpAKVfNNH+LLW2bG5WfSodwZch3fZU6qzHRm4Yk7KzKqDI+Xl0d32c 2NsGIqgyMNRI5fdFMDyaZt9HgmWjP+OG//Vp4kDSZHPGGKBaDJZMcnxr0LY+D0+F0gE3 kOTiR+OefhA63MCW9o+9Bmv7wm0mNTH/6EQgDn4TQzhSGP3YXGfPQYr8B1o0W6he1hHX Upy9GEPgL3yLy8InQEWyZAcskvklzC594BTouhCpamJOMIZbBZPANCEofxrZjwC05Vvt U3lxaiSY7CC8GaXdjfT0so+riWgJOKtX4FUXYuMivHyPhJOYD5mrtESDC8R6IvvNCsZQ +MkQ== X-Received: by 10.31.58.142 with SMTP id h136mr30425204vka.115.1448413377576; Tue, 24 Nov 2015 17:02:57 -0800 (PST) Received: from Hermes-2.local (mail.johnwiegley.com. [208.82.103.192]) by smtp.gmail.com with ESMTPSA id w125sm16744808vke.13.2015.11.24.17.02.56 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Nov 2015 17:02:56 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Hermes-2.local (Postfix, from userid 501) id 9C5D449CE942; Tue, 24 Nov 2015 17:02:53 -0800 (PST) To: Maneesh Yadav Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-Reply-To: (Maneesh Yadav's message of "Tue, 24 Nov 2015 14:58:11 -0800") Date: Tue, 24 Nov 2015 17:02:51 -0800 Message-ID: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 20:15:32 2015 Received: (at 21965) by debbugs.gnu.org; 25 Nov 2015 01:15:33 +0000 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 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 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== MIME-Version: 1.0 X-Received: by 10.98.1.75 with SMTP id 72mr27551936pfb.14.1448414110651; Tue, 24 Nov 2015 17:15:10 -0800 (PST) Received: by 10.66.196.135 with HTTP; Tue, 24 Nov 2015 17:15:10 -0800 (PST) In-Reply-To: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> Date: Tue, 24 Nov 2015 17:15:10 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 20:38:34 2015 Received: (at 21965) by debbugs.gnu.org; 25 Nov 2015 01:38:34 +0000 Received: from localhost ([127.0.0.1]:51894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1P2X-0008F6-RO for submit@debbugs.gnu.org; Tue, 24 Nov 2015 20:38:34 -0500 Received: from mail-vk0-f49.google.com ([209.85.213.49]:34494) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1P2C-0008Ef-Ul for 21965@debbugs.gnu.org; Tue, 24 Nov 2015 20:38:31 -0500 Received: by vkbs1 with SMTP id s1so25233932vkb.1 for <21965@debbugs.gnu.org>; Tue, 24 Nov 2015 17:38:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=Tir2UDSWbC2co33xeiHbOKKfWy7hG5HNCShLwxaiK/Q=; b=RZh5Pv0UEREwM4uy0GkYyRf9WXaJdpb66YzlRv9Mej7LKkXycG3b9PV7nFOxqz7xq2 MHABgAX6hfAQOMFmww2Q96TdDXuYVtejV/x6nX18/H+kPOQmYv2GRzikzvETwbbr+N76 Q6l9UME6TavDw11ysXtBf7qWulVCysIEMN32iCVgIuvDUxFl3hm1wPkFgk0WC3uH5NRr zHDJmd+ihUkjM+XFdsZoCWe3kFiGI2LDRuDWGEfhJBuOsAKrUI0QS4pXnh8FAT1U37+C +VlFkNykcT1jpgpKjiZvmWUM9VD6u/vVW/0sLciEz+LZZ57csuyxZOJCMDzklGtjZc3d cG+w== X-Received: by 10.31.16.86 with SMTP id g83mr28797457vki.138.1448415492290; Tue, 24 Nov 2015 17:38:12 -0800 (PST) Received: from Hermes-2.local (mail.johnwiegley.com. [208.82.103.192]) by smtp.gmail.com with ESMTPSA id c190sm16823178vkc.16.2015.11.24.17.38.10 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Nov 2015 17:38:10 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Hermes-2.local (Postfix, from userid 501) id 07DD949CF86D; Tue, 24 Nov 2015 17:38:08 -0800 (PST) To: Maneesh Yadav Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-Reply-To: (Maneesh Yadav's message of "Tue, 24 Nov 2015 17:15:10 -0800") Date: Tue, 24 Nov 2015 17:38:06 -0800 Message-ID: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Maneesh Yadav writes: > I still am uncomfortable with my comprehension of the lldb output but here > is 'backtrace all' after triggering the condition Ok! Now we know what the deadlock situation is: Thread #2: > frame #3: 0x00000001009dd716 libglib-2.0.0.dylib`g_main_context_iteration + 55 ... > frame #0: 0x00007fff8a8613fa libsystem_kernel.dylib`__select + 10 Thread #1: > frame #3: 0x00000001009db284 libglib-2.0.0.dylib`g_main_context_acquire + 42 It turns out that both g_main_context_acquire and g_main_context_iteration (when called with NULL) call LOCK_CONTEXT on the "default context". Now, I *think* the context should be different between these two threads: one should be the default context, and one should be the worker context. But it _looks_ like Thread #1 is being locked out by Thread #2. In fact, reading the glib code, if the call to g_once_init_enter returns FALSE within g_get_worker_context, then the worker context will be NULL! Which seems like a subtle bug waiting to happen, and might be what's biting us. To go deeper, we may need to build a separate copy of glib and start putting some print statements in to find out why there is lock contention. Would you be up for that? I'd like to know if this is happening in g_get_worker_context. John From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 20:46:05 2015 Received: (at 21965) by debbugs.gnu.org; 25 Nov 2015 01:46:05 +0000 Received: from localhost ([127.0.0.1]:51903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1P9p-0008Qo-AF for submit@debbugs.gnu.org; Tue, 24 Nov 2015 20:46:05 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:34664) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1P9m-0008QQ-QR for 21965@debbugs.gnu.org; Tue, 24 Nov 2015 20:46:03 -0500 Received: by padhx2 with SMTP id hx2so40047506pad.1 for <21965@debbugs.gnu.org>; Tue, 24 Nov 2015 17:46:02 -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=WFs/+NvIT1pozgcbPnPnRgKG2AGc7yMUCsn7Zx3oUa8=; b=ETN3JgDDHiyxRehkrX9y9e7LLOnyOSTv8e9PxZD2fzl77R1gI8sCX7tE0DsSteQUV/ nJyNrEiBOdzukZuj/fvDaSt7hzZiYmiNgvxeKxrmt9CBT09JaIlbCWYH5eqRPOQw/xDc HVNtd88EdTq752DoCTiCrcpeb9KqiKazjkZv0jA0hCInRCzjfpCLfUJ7YOKjXGaRYRCn ISRZKIkvLUbr7YTaIyzBKmcpT6nez1gkodfpi67iHkxswhVnnTcHCWh6kVCnyXQL1jWY LctEz1MrUkpgtagNJURyTDfDVrm6ghCsPRLkhirfReAspiGPjiwxnhNZOnuGhE4Uec65 wKgQ== MIME-Version: 1.0 X-Received: by 10.98.71.157 with SMTP id p29mr27649629pfi.152.1448415962074; Tue, 24 Nov 2015 17:46:02 -0800 (PST) Received: by 10.66.196.135 with HTTP; Tue, 24 Nov 2015 17:46:01 -0800 (PST) In-Reply-To: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> Date: Tue, 24 Nov 2015 17:46:01 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) For sure...let me make sure I can insert print statements into glib in the context of my macports install (and get a little better understanding of the glib event loop). Will write back once that is up. On Tue, Nov 24, 2015 at 5:38 PM, John Wiegley wrote: >>>>>> Maneesh Yadav writes: > >> I still am uncomfortable with my comprehension of the lldb output but here >> is 'backtrace all' after triggering the condition > > Ok! Now we know what the deadlock situation is: > > Thread #2: > >> frame #3: 0x00000001009dd716 libglib-2.0.0.dylib`g_main_context_iteration + 55 > ... >> frame #0: 0x00007fff8a8613fa libsystem_kernel.dylib`__select + 10 > > Thread #1: > >> frame #3: 0x00000001009db284 libglib-2.0.0.dylib`g_main_context_acquire + 42 > > It turns out that both g_main_context_acquire and g_main_context_iteration > (when called with NULL) call LOCK_CONTEXT on the "default context". > > Now, I *think* the context should be different between these two threads: one > should be the default context, and one should be the worker context. But it > _looks_ like Thread #1 is being locked out by Thread #2. > > In fact, reading the glib code, if the call to g_once_init_enter returns FALSE > within g_get_worker_context, then the worker context will be NULL! Which seems > like a subtle bug waiting to happen, and might be what's biting us. > > To go deeper, we may need to build a separate copy of glib and start putting > some print statements in to find out why there is lock contention. Would you > be up for that? I'd like to know if this is happening in g_get_worker_context. > > John From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 20:51:09 2015 Received: (at 21965) by debbugs.gnu.org; 25 Nov 2015 01:51:09 +0000 Received: from localhost ([127.0.0.1]:51911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1PEi-00006h-Rz for submit@debbugs.gnu.org; Tue, 24 Nov 2015 20:51:09 -0500 Received: from mail-vk0-f53.google.com ([209.85.213.53]:34059) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1PEO-00005y-VE for 21965@debbugs.gnu.org; Tue, 24 Nov 2015 20:51:07 -0500 Received: by vkbs1 with SMTP id s1so25383681vkb.1 for <21965@debbugs.gnu.org>; Tue, 24 Nov 2015 17:50:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=jFjIXLODr1M5z9Ve1l12adKdVKqTG2GA7BH5aun3seg=; b=1IBTC5P0GvAImQDTKsXVNOfu7omaKDSA6wTW0O8uTzUPNA0RUmBNLfGKq4LZ4sWFbj tE3AXNvGCcgbvXQeWCcmnygWelZqbZ6CVEA6xuLHk4aODuEWi1GAzrfa1B+FGlmM1bjE h4scUyOieUtBhZgZpzJI39m2JUaJdO6LOLX7FGmQOI1oRrWoG5CHu2PWnILmzTakqLN8 l6rCd9JYOiDfKXZBuA/93pUaBfj7RIUa+F/rff+YHimvsNfgOKQTdeM0ykfwrbqciSXM 7ApOny2v7w6ZtyPB0sl6cnoh1xHeXvwVnOX8H2I+ZiawZ6dfZXr2sqgNdHsSHyOLg9UB NZjA== X-Received: by 10.31.50.13 with SMTP id y13mr29699952vky.128.1448416248582; Tue, 24 Nov 2015 17:50:48 -0800 (PST) Received: from Hermes-2.local (mail.johnwiegley.com. [208.82.103.192]) by smtp.gmail.com with ESMTPSA id 79sm16902444vkj.21.2015.11.24.17.50.47 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Nov 2015 17:50:47 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Hermes-2.local (Postfix, from userid 501) id 71F0A49CF9A3; Tue, 24 Nov 2015 17:50:45 -0800 (PST) To: Maneesh Yadav Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-Reply-To: (Maneesh Yadav's message of "Tue, 24 Nov 2015 17:46:01 -0800") Date: Tue, 24 Nov 2015 17:50:44 -0800 Message-ID: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Maneesh Yadav writes: >> To go deeper, we may need to build a separate copy of glib and start >> putting some print statements in to find out why there is lock contention. >> Would you be up for that? I'd like to know if this is happening in >> g_get_worker_context. I've read further, and since "static gsize initialised;" must initialize to zero, it's for me to see how this code could be wrong just from reading it. I'd like to find every line of code in glib that calls LOCK_CONTEXT or UNLOCK_CONTEXT, and print out: Function, file, line, lock or unlock, pointer value of context That should help us narrow it down. John From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 25 13:49:54 2015 Received: (at 21965) by debbugs.gnu.org; 25 Nov 2015 18:49:54 +0000 Received: from localhost ([127.0.0.1]:53104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1f8b-0005RI-ET for submit@debbugs.gnu.org; Wed, 25 Nov 2015 13:49:53 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34289) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1f8H-0005QF-92 for 21965@debbugs.gnu.org; Wed, 25 Nov 2015 13:49:52 -0500 Received: by padhx2 with SMTP id hx2so65186276pad.1 for <21965@debbugs.gnu.org>; Wed, 25 Nov 2015 10:49:29 -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=YEAuPJ5Qx0UFXUFyKudtfoAWckAv8jMEs8+ypoFgVcw=; b=hBS3TytL2ZErKCX2XFHjMGCLTn4rPek45h5aZL0HGVi0M41lvyiQ1NF6q9/ekvf4rA MsQibRmRYQmHP5IS6pZtGsoyA8rzARarVUSnSBBn4TXqhtld9GeLCvXqOAUAzOWdegiH Cl5wmKObf22nEXK13e75xgwwtn+qkcEUHiTg9bKUcRE+ggeQAyotQy8DyAxQOm1xBAwq d2ZHrrH1ktKggxu3qrp5o0QLCDUiUqAFshsHzHeOhbq5GDiIVViJYrKqV5bqJ6rWR2tl bgzAUfMYv9dUx2v5a/4rHcJ/0v9ov5hR55Tq3rm7hkf4Z4dNEsscVr8BTbouGtqMxBgk /Nog== MIME-Version: 1.0 X-Received: by 10.98.87.83 with SMTP id l80mr33740053pfb.126.1448477369239; Wed, 25 Nov 2015 10:49:29 -0800 (PST) Received: by 10.66.196.135 with HTTP; Wed, 25 Nov 2015 10:49:29 -0800 (PST) In-Reply-To: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> Date: Wed, 25 Nov 2015 10:49:29 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Weird. I patched glib2 this way (just overriding the macros (and removing semicolons on macro invocations...seemed to be the best way to deal with if statements that didn't wrap in curly braces...just realized my strings don't reflect "UN"LOCK/LOCK....not a big deal since line numbers are there...fixed for next time): #define LOCK_CONTEXT(context) g_mutex_lock (&context->mutex) #define LOCK_CONTEXT(context) {printf("MANEESH GLIB DEBUG: About to LOCK: %s, %d, %s\n", __FILE__, __LINE__, __FUNCTION__); g_mutex_lock (&context->mutex);} #define UNLOCK_CONTEXT(context) g_mutex_unlock (&context->mutex) #define UNLOCK_CONTEXT(context) {printf("MANEESH GLIB DEBUG: About to LOCK: %s, %d, %s\n", __FILE__, __LINE__, __FUNCTION__); g_mutex_unlock (&context->mutex);} Grabbing the output (emacs -Q > test.out) shows the stall mid print: MANEESH GLIB DEBUG: About to LOCK: gmain.c, 3208, g_main_context_acquire MANEESH GLIB DEBUG: About to LOCK: gmain.c, 3222, g_main_context_acquire MANEESH GLIB DEBUG: About to LOCK: gmain.c, 3801, g_main_context_iterate MANEESH GLIB DEBUG: About to LOCK: gmain.c, 3812, g_main_context_iterate MANEESH GLIB DEBUG: About to LOCK: gmain.c, 3376, g_main_context_prepare MANEESH GLIB DEBUG: About to LOCK: gmain.c, 3501, g_main_context_prepare MANEESH GLIB DEBUG gmain.c 3501 region: if (timeout) { *timeout = context->timeout; if (*timeout != 0) context->time_is_fresh = FALSE; } UNLOCK_CONTEXT (context) return n_poll; Nothing terribly different from the lldb backtrace (for completeness): (lldb) thread backtrace all * thread #1: tid = 0x9bb3c, 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: 0x0000000100a17b78 libglib-2.0.0.dylib`g_mutex_lock + 26 frame #3: 0x00000001009da551 libglib-2.0.0.dylib`g_main_context_acquire + 78 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 = 0x9bb48, 0x00007fff8a8613fa libsystem_kernel.dylib`__select + 10, name = 'gmain' frame #0: 0x00007fff8a8613fa libsystem_kernel.dylib`__select + 10 frame #1: 0x00000001009e8bed libglib-2.0.0.dylib`g_poll + 399 frame #2: 0x00000001009dd303 libglib-2.0.0.dylib`g_main_context_iterate + 627 frame #3: 0x00000001009dd40e libglib-2.0.0.dylib`g_main_context_iteration + 104 frame #4: 0x00000001009de7c6 libglib-2.0.0.dylib`glib_worker_main + 53 frame #5: 0x00000001009fde09 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 Everything is terrible. On Tue, Nov 24, 2015 at 5:50 PM, John Wiegley wrote: >>>>>> Maneesh Yadav writes: > >>> To go deeper, we may need to build a separate copy of glib and start >>> putting some print statements in to find out why there is lock contention. >>> Would you be up for that? I'd like to know if this is happening in >>> g_get_worker_context. > > I've read further, and since "static gsize initialised;" must initialize to > zero, it's for me to see how this code could be wrong just from reading it. > > I'd like to find every line of code in glib that calls LOCK_CONTEXT or > UNLOCK_CONTEXT, and print out: > > Function, file, line, lock or unlock, pointer value of context > > That should help us narrow it down. > > John From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 25 14:00:00 2015 Received: (at 21965) by debbugs.gnu.org; 25 Nov 2015 19:00:00 +0000 Received: from localhost ([127.0.0.1]:53118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1fIO-0005hz-2i for submit@debbugs.gnu.org; Wed, 25 Nov 2015 14:00:00 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:32874) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1fI3-0005hT-71 for 21965@debbugs.gnu.org; Wed, 25 Nov 2015 13:59:57 -0500 Received: by pabfh17 with SMTP id fh17so67334038pab.0 for <21965@debbugs.gnu.org>; Wed, 25 Nov 2015 10:59:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=D3q/wC1NTOMCq1KfiVGg/qP0H5YV7z0jqcp7OEJjSK4=; b=p0ljioFS5TcPyP5iBKecEN2xiUulRq5DqjMxrXV9OGz5VBKm8IOtQU+kH4OlVID1p5 mzq3rKItGd8a1cnXamBqiW2zeu/bmUTfNZxN4Wcd0mL1g+OhY5UiI6S/FqAJht554xN7 r96g3aKHu8iNJ8bTs83sCI5u0fFEIsFgF05tAXYGP0LNudY+nIut8pGVkuuz7Bbjrs9p D14Ee61A+beJjwPLjeFkEiOL2WZWp+LrcUqjA0Srs2TfTuyIvdwONBgX6eB8PrGHg0+/ CCSHMAdudZxOsavbu/fIONaRBXLZdiea1jmBvFYZ5+32PhWy4eE0uEacjP8G8CZgmQo6 4ITw== X-Received: by 10.98.42.148 with SMTP id q142mr34360630pfq.0.1448477978384; Wed, 25 Nov 2015 10:59:38 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id a23sm22387087pfj.46.2015.11.25.10.59.37 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 25 Nov 2015 10:59:37 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id C38F610AD4358; Wed, 25 Nov 2015 10:59:36 -0800 (PST) To: Maneesh Yadav Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-Reply-To: (Maneesh Yadav's message of "Wed, 25 Nov 2015 10:49:29 -0800") Date: Wed, 25 Nov 2015 10:59:35 -0800 Message-ID: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Maneesh Yadav writes: > I patched glib2 this way (just overriding the macros (and removing > semicolons on macro invocations...seemed to be the best way to deal > with if statements that didn't wrap in curly braces...just realized my > strings don't reflect "UN"LOCK/LOCK....not a big deal since line > numbers are there...fixed for next time): Nice, this is much closer. I just need you to add a %p formatting string, and then print the value of the "context": #define LOCK_CONTEXT(context) {printf("MANEESH GLIB DEBUG: About to LOCK %p: %s, %d, %\n", context, __FILE__, __LINE__, __FUNCTION__); g_mutex_lock (&context->mutex);} John From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 18 16:46:21 2016 Received: (at 21965) by debbugs.gnu.org; 18 Feb 2016 21:46:21 +0000 Received: from localhost ([127.0.0.1]:33275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWWOz-0006Kf-1T for submit@debbugs.gnu.org; Thu, 18 Feb 2016 16:46:21 -0500 Received: from mail-pf0-f176.google.com ([209.85.192.176]:33937) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWWOx-0006KR-8p for 21965@debbugs.gnu.org; Thu, 18 Feb 2016 16:46:19 -0500 Received: by mail-pf0-f176.google.com with SMTP id x65so38395887pfb.1 for <21965@debbugs.gnu.org>; Thu, 18 Feb 2016 13:46:19 -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=FW3IhjnABZuUFGptPFbnmTQIcz/VmE9rf5q9swfRT/g=; b=N//1LSyk01yLtZ7MfGGoQQ9N0ANXQFIvi75ICdZOsQgJLV23TdVcjLE3zZsiNqa9sj iZHfwSRQu6UHPf4bcARpzTmDiCPcLLwgrgw9/8D4ZZYQFqHr7i5W2JWnqyo7SJdN0gSN ku9/UcNVB2BSptCglTxG81NZCDgATmxkwfthy2GLDJ/eaj7/DXAFeIEFrkN2l3N+W03Y 7nnYjAvJAtza5jBDpCRqiHNf+jvcwBzObd7Xcf6Hg9tIQ5T7MqK1Fmb6kxVBtaGwj+LZ e+phHKByCjeu5G5I1HADpcXXiOWnCy1YWz82UwOlpNPrISdjtZDfSxDJ9G90h75stMJf cNWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=FW3IhjnABZuUFGptPFbnmTQIcz/VmE9rf5q9swfRT/g=; b=Y7sY/WPxSj/odimTnFdIGQRwQRsD9T6UMGOny/AgQfBeJgLwx4Fb8EhWd/+mCSIOY0 I4wumj/Oxju2+8OaoLkzeGpWoONYltWW0Bgtb7/6JhdiTcz9ho2Wdrz4YeB7R63MyhWu FyQ6HwVDV/gE2Z+qIQzVnjeMD3XjYcaC+d0EFa7xpAbmLklvDUZCuFbjeV04H5EUSqG6 uGwBaT3qxlvNpmnTNgDm/3BvjMfM5dLBuKDIFgphvTZwA4H/lwgQlJJQNpQ2zGutcOx7 bmtfB92VsRLapb1puo3p3HQgEdkjVrkLBM1Gb6Yp10wH/3aQMI84UyQjFflFk70Ksw0N nseQ== X-Gm-Message-State: AG10YORqL4iNVjcDSHYLZ9UnLG0xTpZA/DU5JyMPyDS7HEi8vRCOEo6opGex49RspYL/lEqcJpHaZK9yp/GKKA== MIME-Version: 1.0 X-Received: by 10.98.9.27 with SMTP id e27mr13490754pfd.59.1455831973210; Thu, 18 Feb 2016 13:46:13 -0800 (PST) Received: by 10.66.236.71 with HTTP; Thu, 18 Feb 2016 13:46:13 -0800 (PST) In-Reply-To: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> Date: Thu, 18 Feb 2016 13:46:13 -0800 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file From: Maneesh Yadav To: John Wiegley Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Apologies to all I haven't ben able to follow up on this more thoroughly, part of the problem was trying to get the crash to replicate. I could do it in a few minutes while I was originally posting, then as I was getting all the right debug statements in it got harder and harder. I decided to just revert to normal use and wait for it to happen. Just happened again and I've put all the debugging info I can here and will try to trace through glib and figure out what is going on, just putting everything here for reference. overrided the following macros in gmain.c (and had to add some curly braces): #define LOCK_CONTEXT(context) g_mutex_lock (&context->mutex) #define LOCK_CONTEXT(context) {fprintf(stderr, "MANEESH GLIB DEBUG: About to LOCK: %p, %s, %d, %s, %p\n", context, __FILE__, __LINE__, __FUNCTION__,g_thread_self()); g_mutex_lock (&context->mutex);} #define UNLOCK_CONTEXT(context) g_mutex_unlock (&context->mutex) #define UNLOCK_CONTEXT(context) {fprintf(stderr, "MANEESH GLIB DEBUG: About to UNLOCK: %p, %s, %d, %s, %p\n", context, __FILE__, __LINE__, __FUNCTION__, g_thread_self()); g_mutex_unlock (&context->mutex);} At the time of crash, an abbreviated summary of stderr: ... MANEESH GLIB DEBUG: About to UNLOCK: 0x100f00e20, gmain.c, 4128, g_main_context_poll, 0x102001c00 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to UNLOCK: 0x100d8a3a0, gmain.c, 3222, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3538, g_main_context_query, 0x100da5800 MANEESH GLIB DEBUG: About to UNLOCK: 0x100d8a3a0, gmain.c, 3583, g_main_context_query, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3859, g_main_context_pending, 0x100da5800 MANEESH GLIB DEBUG: About to UNLOCK: 0x100d8a3a0, gmain.c, 3782, g_main_context_iterate, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to UNLOCK: 0x100d8a3a0, gmain.c, 3222, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3801, g_main_context_iterate, 0x100da5800 MANEESH GLIB DEBUG: About to UNLOCK: 0x100d8a3a0, gmain.c, 3812, g_main_context_iterate, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3376, g_main_context_prepare, 0x100da5800 MANEESH GLIB DEBUG: About to UNLOCK: 0x100d8a3a0, gmain.c, 3501, g_main_context_prepare, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3538, g_main_context_query, 0x100da5800 MANEESH GLIB DEBUG: About to UNLOCK: 0x100d8a3a0, gmain.c, 3583, g_main_context_query, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 4124, g_main_context_poll, 0x100da5800 MANEESH GLIB DEBUG: About to UNLOCK: 0x100d8a3a0, gmain.c, 4128, g_main_context_poll, 0x100da5800 ... MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3242, g_main_context_release, 0x100da5800 MANEESH GLIB DEBUG: About to UNLOCK: 0x100d8a3a0, gmain.c, 3265, g_main_context_release, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 MANEESH GLIB DEBUG: About to LOCK: 0x100d8a3a0, gmain.c, 3208, g_main_context_acquire, 0x100da5800 lldb traces: (lldb) attach emacs Process 79773 stopped * thread #1: tid = 0x6c3b4f, 0x00007fff8deb9166 libsystem_kernel.dylib`__psynch_mutexwait + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP frame #0: 0x00007fff8deb9166 libsystem_kernel.dylib`__psynch_mutexwait + 10 libsystem_kernel.dylib`__psynch_mutexwait: -> 0x7fff8deb9166 <+10>: jae 0x7fff8deb9170 ; <+20> 0x7fff8deb9168 <+12>: movq %rax, %rdi 0x7fff8deb916b <+15>: jmp 0x7fff8deb4c53 ; cerror_nocancel 0x7fff8deb9170 <+20>: retq Executable module set to "/opt/local/bin/emacs". Architecture set to: x86_64h-apple-macosx. (lldb) thread backtrace all * thread #1: tid = 0x6c3b4f, 0x00007fff8deb9166 libsystem_kernel.dylib`__psynch_mutexwait + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP * frame #0: 0x00007fff8deb9166 libsystem_kernel.dylib`__psynch_mutexwait + 10 frame #1: 0x00007fff88a0d696 libsystem_pthread.dylib`_pthread_mutex_lock + 480 frame #2: 0x0000000100a17b48 libglib-2.0.0.dylib`g_mutex_lock + 26 frame #3: 0x00000001009d9b53 libglib-2.0.0.dylib`g_main_context_acquire + 109 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: 0x00007fff8a6d25c9 libdyld.dylib`start + 1 frame #18: 0x00007fff8a6d25c9 libdyld.dylib`start + 1 thread #2: tid = 0x6c3b6b, 0x00007fff8deb93fa libsystem_kernel.dylib`__select + 10, name = 'gmain' frame #0: 0x00007fff8deb93fa libsystem_kernel.dylib`__select + 10 frame #1: 0x00000001009e8bbd libglib-2.0.0.dylib`g_poll + 399 frame #2: 0x00000001009dd07c libglib-2.0.0.dylib`g_main_context_iterate + 845 frame #3: 0x00000001009dd1b1 libglib-2.0.0.dylib`g_main_context_iteration + 127 frame #4: 0x00000001009de796 libglib-2.0.0.dylib`glib_worker_main + 53 frame #5: 0x00000001009fddd9 libglib-2.0.0.dylib`g_thread_proxy + 90 frame #6: 0x00007fff88a1005a libsystem_pthread.dylib`_pthread_body + 131 frame #7: 0x00007fff88a0ffd7 libsystem_pthread.dylib`_pthread_start + 176 frame #8: 0x00007fff88a0d3ed libsystem_pthread.dylib`thread_start + 13 Inkscape is the only other binary linked to glib that is running, I think: Maneeshs-MacBook-Air:~ maneeshyadav$ ps PID TTY TIME CMD 49116 ttys000 0:00.14 -bash 79773 ttys000 2:16.74 emacs 49772 ttys001 0:01.80 -bash 63245 ttys002 0:00.56 -bash 65082 ttys002 0:00.01 /bin/bash /Applications/ChemAxon/MarvinBeans/bin/msketch 65087 ttys002 18:31.79 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java chemaxon.marvin.Sketch 81099 ttys002 1:06.60 inkscape On Wed, Nov 25, 2015 at 10:49 AM, Maneesh Yadav wrote: > Weird. > > I patched glib2 this way (just overriding the macros (and removing > semicolons on macro invocations...seemed to be the best way to deal > with if statements that didn't wrap in curly braces...just realized my > strings don't reflect "UN"LOCK/LOCK....not a big deal since line > numbers are there...fixed for next time): > > #define LOCK_CONTEXT(context) g_mutex_lock (&context->mutex) > > #define LOCK_CONTEXT(context) {printf("MANEESH GLIB DEBUG: About to > LOCK: %s, %d, %s\n", __FILE__, __LINE__, __FUNCTION__); g_mutex_lock > (&context->mutex);} > > #define UNLOCK_CONTEXT(context) g_mutex_unlock (&context->mutex) > > #define UNLOCK_CONTEXT(context) {printf("MANEESH GLIB DEBUG: About to > LOCK: %s, %d, %s\n", __FILE__, __LINE__, __FUNCTION__); g_mutex_unlock > (&context->mutex);} > > > Grabbing the output (emacs -Q > test.out) shows the stall mid print: > > MANEESH GLIB DEBUG: About to LOCK: gmain.c, 3208, g_main_context_acquire > > MANEESH GLIB DEBUG: About to LOCK: gmain.c, 3222, g_main_context_acquire > > MANEESH GLIB DEBUG: About to LOCK: gmain.c, 3801, g_main_context_iterate > > MANEESH GLIB DEBUG: About to LOCK: gmain.c, 3812, g_main_context_iterate > > MANEESH GLIB DEBUG: About to LOCK: gmain.c, 3376, g_main_context_prepare > > MANEESH GLIB DEBUG: About to LOCK: gmain.c, 3501, g_main_context_prepare > > MANEESH GLIB DEBUG > > > > gmain.c 3501 region: > > if (timeout) > > { > > *timeout = context->timeout; > > if (*timeout != 0) > > context->time_is_fresh = FALSE; > > } > > > > UNLOCK_CONTEXT (context) > > > return n_poll; > > > Nothing terribly different from the lldb backtrace (for completeness): > > > (lldb) thread backtrace all > > * thread #1: tid = 0x9bb3c, 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: 0x0000000100a17b78 libglib-2.0.0.dylib`g_mutex_lock + 26 > > frame #3: 0x00000001009da551 libglib-2.0.0.dylib`g_main_context_acquire + 78 > > 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 = 0x9bb48, 0x00007fff8a8613fa > libsystem_kernel.dylib`__select + 10, name = 'gmain' > > frame #0: 0x00007fff8a8613fa libsystem_kernel.dylib`__select + 10 > > frame #1: 0x00000001009e8bed libglib-2.0.0.dylib`g_poll + 399 > > frame #2: 0x00000001009dd303 > libglib-2.0.0.dylib`g_main_context_iterate + 627 > > frame #3: 0x00000001009dd40e > libglib-2.0.0.dylib`g_main_context_iteration + 104 > > frame #4: 0x00000001009de7c6 libglib-2.0.0.dylib`glib_worker_main + 53 > > frame #5: 0x00000001009fde09 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 > > > Everything is terrible. > > On Tue, Nov 24, 2015 at 5:50 PM, John Wiegley wrote: >>>>>>> Maneesh Yadav writes: >> >>>> To go deeper, we may need to build a separate copy of glib and start >>>> putting some print statements in to find out why there is lock contention. >>>> Would you be up for that? I'd like to know if this is happening in >>>> g_get_worker_context. >> >> I've read further, and since "static gsize initialised;" must initialize to >> zero, it's for me to see how this code could be wrong just from reading it. >> >> I'd like to find every line of code in glib that calls LOCK_CONTEXT or >> UNLOCK_CONTEXT, and print out: >> >> Function, file, line, lock or unlock, pointer value of context >> >> That should help us narrow it down. >> >> John From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 19 21:42:31 2016 Received: (at 21965) by debbugs.gnu.org; 20 Feb 2016 02:42:31 +0000 Received: from localhost ([127.0.0.1]:34396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWxV9-0001y3-AU for submit@debbugs.gnu.org; Fri, 19 Feb 2016 21:42:31 -0500 Received: from mail-pf0-f174.google.com ([209.85.192.174]:35600) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWxV7-0001xl-AY for 21965@debbugs.gnu.org; Fri, 19 Feb 2016 21:42:29 -0500 Received: by mail-pf0-f174.google.com with SMTP id c10so62613231pfc.2 for <21965@debbugs.gnu.org>; Fri, 19 Feb 2016 18:42:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:reply-to:mime-version:content-type; bh=weNTEc0BVYLhPscNuYx76MHalJeVC7U2vb35Ni6z9HY=; b=QbDDsC6QRK1icZE5UcoDh3tH1OfbVpzqkmF14sgWoI7LzYBxyk9VK7l/tLCNMbaSam AZh9tUxnsm0IUv1bHxr2NH5RANFr32KERD5FqjfDA8XJO1XPH3iqsfsrra1SE4+jTWV1 lEYpt04hEcDwN2I8/KzcZbvkgqXKRo2FH22f+6hCrzURU0R5eT/9gZLQxFSlbgbcnBdi bhQ4hyI6yCxQbIADaqJKukuTgUHRGigpWGotez1Rs4QrRduH4CxeeD7UFDIHlawbiAaH NPlO2X5uiZVyfSnkRz21zOdLQQXz7HFYzFuggAIHizXQBH05Vinwtl0bFgpMKUlj1mfh Ckqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:reply-to:mime-version:content-type; bh=weNTEc0BVYLhPscNuYx76MHalJeVC7U2vb35Ni6z9HY=; b=Gg4hocgZgxovL2wYNbn89wYkUwBgQuRYjc/YnbYRncMWYdaqZ4y5bAiEfOCqcBsSdB loBXWcJginah95BoGebrb/FBmkj3A9pBQEFxSCiWeSPU8iHofjuLraXiUygQaNVseSKu 7ARMapOpiGsqPjIpIERBH9vcYv3Qz/9s3rRmXSbrmq0+UtQ+I/dORsyBaAUajQAYz38Y Qoorglte6lfGU+YAbTdeDAuGHwbKs9xzSvzVAfXMCZjgRJBH1mZm/fID+WCwpTx5pyg9 Nvwx+dxDsJySkFLtn3qE2I96Tpm7MiQXj5TlwbesLswqHCWLs6Wr2sMCLjr388lmDExk y3tw== X-Gm-Message-State: AG10YOQsS9jiBE8dkYkB+9pjWEV8veObyxiG87lVHdyo2Ce1Y8RqifiFVwpPWXFcYN3jrQ== X-Received: by 10.98.33.199 with SMTP id o68mr22382434pfj.125.1455936143349; Fri, 19 Feb 2016 18:42:23 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id tb10sm20770156pab.22.2016.02.19.18.42.21 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 19 Feb 2016 18:42:22 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id 6AB61130D9DBA; Fri, 19 Feb 2016 18:42:21 -0800 (PST) To: Maneesh Yadav Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file In-Reply-To: (Maneesh Yadav's message of "Thu, 18 Feb 2016 13:46:13 -0800") Date: Fri, 19 Feb 2016 18:40:06 -0800 Message-ID: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21965 Cc: Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: John Wiegley Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Maneesh Yadav writes: > Apologies to all I haven't ben able to follow up on this more thoroughly, > part of the problem was trying to get the crash to replicate. I could do it > in a few minutes while I was originally posting, then as I was getting all > the right debug statements in it got harder and harder. I decided to just > revert to normal use and wait for it to happen. Just happened again and I've > put all the debugging info I can here and will try to trace through glib and > figure out what is going on, just putting everything here for reference. That sure looks like a lot of locks for the same context. Now, I wonder how could allow that code path to recur without intervening unlocks, as there were before the hang? -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 30 22:11:52 2020 Received: (at 21965) by debbugs.gnu.org; 31 Aug 2020 02:11:52 +0000 Received: from localhost ([127.0.0.1]:51082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCZIW-00067N-7q for submit@debbugs.gnu.org; Sun, 30 Aug 2020 22:11:52 -0400 Received: from mail-ej1-f44.google.com ([209.85.218.44]:46155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCZIU-00067B-Tz for 21965@debbugs.gnu.org; Sun, 30 Aug 2020 22:11:51 -0400 Received: by mail-ej1-f44.google.com with SMTP id d11so6336982ejt.13 for <21965@debbugs.gnu.org>; Sun, 30 Aug 2020 19:11:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=YK2sDUXVbi7PN0uOuuUki+7btT0Elg8m9d8/WedJ/zU=; b=GSKmhRaYPPIqVULy9UYPanyAFtP56Q1EZmAYyUlwv+J/Rgm63WYID1lLQRSNuKg30p d9rMGvGktNliDx6z25m/XT+8oLD65AInuoNivLuRDaAgFSQoHzh1fKh3+IwDgxDUmFwr xJvLZXItxIQKvfmyZDqcrplntxmWDIKKbyur5zSfb3NF14kB9F3Ftn/A+AGQ1R8JxcE7 6yy8RyeIj7HFmUh2boLrvsanwZLBKMAR7VDK2dja5MMGt0t8/uhVsKAAuN7giHRGGBNP 56jCw2Zpg87svTBukMaragPGffK4O3m7yDvVHbo0NEfBoY0cdp4EzwH5TitRXFdJk/5v jv2g== X-Gm-Message-State: AOAM530dCiDuHTl3vMFLT4Dslc3dwtj/kjQsgE1baP3z1+r11g6bzLF6 Te2tK3TxU8Tt2gsH1sBBrIT5dlDjBEFOv5d4aYBSPzLT X-Google-Smtp-Source: ABdhPJx4Pj3zJaHg1ROSDkUpdHNxwbveOqUMNtdqQlX4uvcWPsqGVYBP7puDHBzJ0G/HdYKTD8VK6z5yAzPgOlLCuuw= X-Received: by 2002:a17:906:e0c2:: with SMTP id gl2mr9806969ejb.160.1598839905393; Sun, 30 Aug 2020 19:11:45 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 31 Aug 2020 02:11:45 +0000 From: Stefan Kangas In-Reply-To: (Maneesh Yadav's message of "Thu, 18 Feb 2016 13:46:13 -0800") References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Mon, 31 Aug 2020 02:11:44 +0000 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file To: Maneesh Yadav Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21965 Cc: John Wiegley , Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Maneesh Yadav writes: > Apologies to all I haven't ben able to follow up on this more > thoroughly, part of the problem was trying to get the crash to > replicate. I could do it in a few minutes while I was originally > posting, then as I was getting all the right debug statements in it > got harder and harder. I decided to just revert to normal use and > wait for it to happen. Just happened again and I've put all the > debugging info I can here and will try to trace through glib and > figure out what is going on, just putting everything here for > reference. (That was five years ago.) Were you ever able to get any further in debugging this? Are you still seeing this on a recent version of Emacs? Thanks in advance. Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 30 22:26:02 2020 Received: (at 21965) by debbugs.gnu.org; 31 Aug 2020 02:26:03 +0000 Received: from localhost ([127.0.0.1]:51095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCZWE-0000G0-M3 for submit@debbugs.gnu.org; Sun, 30 Aug 2020 22:26:02 -0400 Received: from mail-il1-f170.google.com ([209.85.166.170]:33272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCZWC-0000FV-LS for 21965@debbugs.gnu.org; Sun, 30 Aug 2020 22:26:01 -0400 Received: by mail-il1-f170.google.com with SMTP id o16so5232659ilq.0 for <21965@debbugs.gnu.org>; Sun, 30 Aug 2020 19:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HdJKQqvWNqzXd3NZJY7l0PN8ASq68iKHVNuxKBlcqH8=; b=cN6xFpp7C0UMqZnb0a3hpNcoP7Omxy6wf28U8p4Zv3b9HUUqBLMmV2KIDJuNPCz8XP X8WYM8Lol/4sH+Ljo7llwcG2jECf2XPo+GdgqTfLv+xTUsFtvZhMfRo0+YPhwnhs/3LF 5/SMYG0eBKEqZLVHODA7h4wFLGhLVUmkzjGB9QWGtrvUxmPK5MWaqXyzR8VDMQta9it1 lPutomSPwnQaTHbRW4dUFbBK1R4uVcZMUtD1mvahhzeQHWBH3/hTscuTz3esG4BO2gFm 9fCcpaHUng0eO9W1N7UFKgtspKAXkZtO85cpUYfkKPmS3xLqurDO8Vi6aMPtakiL8yGI b3+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HdJKQqvWNqzXd3NZJY7l0PN8ASq68iKHVNuxKBlcqH8=; b=WA9gSrqgMc/eJDjFI5qAWhoYUeuGz+eEByc2+Y68weonYVmHtO65aIyw6TSGBqQ1Vn 1zVE+EjdGLPp1DxHSpFr1BoBt+fTUN7pp58hsH3Q589mWG7X0KDtO6dYgawVwIwW54Ir utInjn4obmQ8euUaujUsb82bk16ftEq2ewmhpuve9H+xxvAlf2m/WN4V3UWkCzBpJhDU 8uGie4YIo5DrCQ9mQIT07Jfd5m5r7hI1WAuWjpsrxBpY7xC3FkFZ6jhUiLwMs3dSMChr nJ526fPqhX2+5KCDcSgQ7Pd+HGhLJcHLxIfpOP0NoRRLUS6V2Ao50nV72xxaCy+rcq+r sHZQ== X-Gm-Message-State: AOAM531zJlILQeG14MBSFNFixfOiB+0ZHpcRusFkBzmR7df6r3IA9XJ4 Odj4zpsVqCkLdGTO9PTMFiu/SxOZq8LNLV6q/IY= X-Google-Smtp-Source: ABdhPJyvnOtFKJWaPgZprb8/+GhqqZzuzYpBu8ESA9pAaxxh43c4VAFSAsUY8O+QN+SywyN1NcZs/05pRU6x8zReYFM= X-Received: by 2002:a05:6e02:ef2:: with SMTP id j18mr7494007ilk.2.1598840755117; Sun, 30 Aug 2020 19:25:55 -0700 (PDT) MIME-Version: 1.0 References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> In-Reply-To: From: Maneesh Yadav Date: Sun, 30 Aug 2020 19:25:43 -0700 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file To: Stefan Kangas Content-Type: multipart/alternative; boundary="00000000000042e3b505ae231f95" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21965 Cc: John Wiegley , Eli Zaretskii , 21965@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000042e3b505ae231f95 Content-Type: text/plain; charset="UTF-8" Indeed. Fwiw haven't run into it since that era. On Sun, Aug 30, 2020, 7:11 PM Stefan Kangas wrote: > Maneesh Yadav writes: > > > Apologies to all I haven't ben able to follow up on this more > > thoroughly, part of the problem was trying to get the crash to > > replicate. I could do it in a few minutes while I was originally > > posting, then as I was getting all the right debug statements in it > > got harder and harder. I decided to just revert to normal use and > > wait for it to happen. Just happened again and I've put all the > > debugging info I can here and will try to trace through glib and > > figure out what is going on, just putting everything here for > > reference. > > (That was five years ago.) > > Were you ever able to get any further in debugging this? Are you still > seeing this on a recent version of Emacs? > > Thanks in advance. > > Best regards, > Stefan Kangas > --00000000000042e3b505ae231f95 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Indeed. Fwiw haven't run into it since that era.
On Su= n, Aug 30, 2020, 7:11 PM Stefan Kangas <stefan@marxist.se> wrote:
Maneesh Yadav <maneeshkyadav@gmail.com> writes:

> Apologies to all I haven't ben able to follow up on this more
> thoroughly, part of the problem was trying to get the crash to
> replicate.=C2=A0 I could do it in a few minutes while I was originally=
> posting, then as I was getting all the right debug statements in it > got harder and harder.=C2=A0 I decided to just revert to normal use an= d
> wait for it to happen.=C2=A0 Just happened again and I've put all = the
> debugging info I can here and will try to trace through glib and
> figure out what is going on, just putting everything here for
> reference.

(That was five years ago.)

Were you ever able to get any further in debugging this?=C2=A0 Are you stil= l
seeing this on a recent version of Emacs?

Thanks in advance.

Best regards,
Stefan Kangas
--00000000000042e3b505ae231f95-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 31 09:55:00 2020 Received: (at 21965-done) by debbugs.gnu.org; 31 Aug 2020 13:55:00 +0000 Received: from localhost ([127.0.0.1]:51868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCkGy-0007Lx-2b for submit@debbugs.gnu.org; Mon, 31 Aug 2020 09:55:00 -0400 Received: from mail-ej1-f48.google.com ([209.85.218.48]:37069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCkGw-0007Lj-28 for 21965-done@debbugs.gnu.org; Mon, 31 Aug 2020 09:54:59 -0400 Received: by mail-ej1-f48.google.com with SMTP id nw23so7207271ejb.4 for <21965-done@debbugs.gnu.org>; Mon, 31 Aug 2020 06:54:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=YDFRfIYYgFWBtosbT6egV9bOpNJVB/Qd2MGQl7XPxrM=; b=r88x17btfkTRwNeJLTuLISwb7at8c+2OLrwf7G2QQoWmY8Qwx7CCv1rD7hNl6CsLmp uaB9CesOqynMxMSEQr2XZNFHlReNQQ1mrn9M+GQ16QLsdxLiLtuKfaEN+TwJW5JQ15VO 7fk2etUiDZ5/6cal/6l9Grcf1Uf1/s93lqTQa9a3VV6ZOfci2tdcnLXltXL7MDQISSzm hBdTzRs07LVjH+4IsrMdjAE++2Ou2ZYeCI4vz1pRinvSyBuYYVED6MO4Yj7aPzX8ftpj h1U+AhKIqLsHur0SuMswLhKh3iUVW3nzWccabo6SWXrsvXuRi9IEJ6mFrGM5GdL4gyB8 sMAQ== X-Gm-Message-State: AOAM531xPOnIhKeV6XvvRaDgdm/S/kMslH/tJ5ImV9Ur+jgcrV07K+Uf ZI7fZPCYUzmuxyy7i7E1lfCD0k3pd+Yr23IeeoE= X-Google-Smtp-Source: ABdhPJyFW2Xr+D4NDSgGykrT2CUFyOsAV7tuT45Sxeodb6rJvG8tYWVMSj89TrT/lxVDn8x23mu65Qp/lkFzNYaqMZc= X-Received: by 2002:a17:906:e0c2:: with SMTP id gl2mr1258088ejb.160.1598882092024; Mon, 31 Aug 2020 06:54:52 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 31 Aug 2020 13:54:51 +0000 From: Stefan Kangas In-Reply-To: References: <8337vz6ca5.fsf@gnu.org> <83io4sysrk.fsf@gnu.org> MIME-Version: 1.0 Date: Mon, 31 Aug 2020 13:54:51 +0000 Message-ID: Subject: Re: bug#21965: 24.5; Emacs freezes when canceling at open file To: Maneesh Yadav Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21965-done Cc: John Wiegley , Eli Zaretskii , 21965-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Maneesh Yadav writes: > Indeed. Fwiw haven't run into it since that era. Thanks. I'm therefore closing this bug report. If you see something like this again, please open a new bug. From unknown Sun Jun 22 22:41:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 29 Sep 2020 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator