X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=hS9ykV1uLn8jRu2K0gqHvw6BYMp1Udb6mKacNSDnOmY auJc2po79/FmHoGDNyIYaUOYasyG+Vz0CmQmZq8I44vusiahoITabKfwCKmX280p bkJBoYddAfqD9f89b1JOXYZUWW8AyUsxlfXCmPiTYfUll+HVYbp1f3ZS2EDQe4MM = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=BW5C3hwDThfnDxd7zKeCG7J6ozA=; b=ka3ElWa+2KHQ7C/3M NLhpoxzEY/KF5QBqn6wca+1Pw5wikjIIVmIMj1OXl9TnMDpQ+XnCqEJnwWsu3R6E Q5ULeUsd21yGt26/B+8AAShbAOdlN8r349QufydCcbLCaR+bkw2HAox9k0nn+IAe EnEyS3ReX0C9iRrMRUjoiihLA4= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD,URIBL_BLACK autolearn=no version=3.3.2 X-HELO: limerock02.mail.cornell.edu X-CornellRouted: This message has been Routed already. Message-ID: <53A2E189.9080203@cornell.edu> Date: Thu, 19 Jun 2014 09:11:37 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: bzr emacs(24.4.50.1) crashes when using auto-revert-tail-mode References: <86mwda6yv6 DOT fsf AT w2139spb DOT ru DOT yotateam DOT com> <53A1D076 DOT 8090109 AT cornell DOT edu> In-Reply-To: <53A1D076.8090109@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On 6/18/2014 1:46 PM, Ken Brown wrote: > On 6/18/2014 11:06 AM, Filipp Gunbin wrote: >> I'm not sure whether this is Cygwin-specific, but I'm not able to test >> it on other OS, so here are the steps to reproduce: >> >> emacs -Q >> C-x C-r > > You mean C-x C-f > >> M-x auto-revert-tail-mode >> wait for few seconds -> emacs crashes > > I can confirm this, but on 32-bit Cygwin only; there's no crash on > 64-bit Cygwin. (This is a refreshing change from the emacs crashes > people have been reporting on 64-bit Cygwin.) > > Here's the backtrace: > > #0 0x00000000 in ?? () > No symbol table info available. > #1 0x610f842f in pthread_mutex::lock (this=0x0) > at /usr/src/debug/cygwin-1.7.30-1/winsup/cygwin/thread.cc:1745 > self = > result = > __PRETTY_FUNCTION__ = "int pthread_mutex::lock()" > #2 0x00000201 in ?? () > No symbol table info available. > > Lisp Backtrace: > "gfile-add-watch" (0x288dc8) > "file-notify-add-watch" (0x2890c8) > "byte-code" (0x289340) > "auto-revert-notify-add-watch" (0x289778) > "auto-revert-buffers" (0x289b4c) > "apply" (0x289b48) > "byte-code" (0x289dc0) > "timer-event-handler" (0x28a1fc) > > I'll look into this. In the meantime, you can work around it by > configuring --with-file-notification=no. I'm afraid I ran into a brick wall trying to debug this. I wanted to see what gfile-add-watch was doing, so I ran emacs under gdb with a breakpoint at Fgfile_add_watch and then a breakpoint at g_file_monitor (a Glib function called by Fgfile_add_watch). When I tried to step through this function, I hit an assertion violation in gdb. This is repeatable. A log of the gdb session is appended below. The problem occurs only on 32-bit Cygwin. On 64-bit Cygwin, I can step through Fgfile_add_watch without a problem. Filipp, do you want to try debugging this yourself? Maybe your debugging skills are better than mine. (You'll need to install glib2.0-debuginfo.) Ken $ gdb /usr/bin/emacs-w32.exe GNU gdb (GDB) 7.6.50.20130728-cvs (cygwin-special) [...] Reading symbols from /usr/bin/emacs-w32.exe...Reading symbols from /usr/lib/debug/usr/bin/emacs-w32.exe.dbg...done. done. (gdb) b Fgfile_add_watch Breakpoint 1 at 0x5f7a3f: file /usr/src/debug/emacs-24.3.91-2/src/gfilenotify.c, line 170. (gdb) r -Q Starting program: /usr/bin/emacs-w32.exe -Q [...] Breakpoint 1, Fgfile_add_watch (file=-2145740495, flags=13798510, callback=-2146880150) at /usr/src/debug/emacs-24.3.91-2/src/gfilenotify.c:170 170 GFileMonitorFlags gflags = G_FILE_MONITOR_NONE; (gdb) b g_file_monitor Breakpoint 2 at 0x6a357e50: file /usr/src/debug/glib2.0-2.38.2-2/gio/gfile.c, line 5338. (gdb) c Continuing. [...] Breakpoint 2, g_file_monitor (file=0x80061530, flags=(G_FILE_MONITOR_WATCH_MOUNTS | G_FILE_MONITOR_SEND_MOVED), cancellable=0x0, error=0x0) at /usr/src/debug/glib2.0-2.38.2-2/gio/gfile.c:5338 5338 { (gdb) n 5339 if (g_file_query_file_type (file, 0, cancellable) == G_FILE_TYPE_DIRECTORY) (gdb) n 5338 { (gdb) n 5339 if (g_file_query_file_type (file, 0, cancellable) == G_FILE_TYPE_DIRECTORY) (gdb) n 5340 return g_file_monitor_directory (file, (gdb) n 5339 if (g_file_query_file_type (file, 0, cancellable) == G_FILE_TYPE_DIRECTORY) (gdb) n 5341 flags & ~G_FILE_MONITOR_WATCH_HARD_LINKS, (gdb) n 5340 return g_file_monitor_directory (file, (gdb) n 5345 } (gdb) n 5340 return g_file_monitor_directory (file, (gdb) n g_file_monitor_directory (file=0x80061530, flags=(G_FILE_MONITOR_WATCH_MOUNTS | G_FILE_MONITOR_SEND_MOVED), cancellable=0x0, error=0x0) at /usr/src/debug/glib2.0-2.38.2-2/gio/gfile.c:5235 5235 { (gdb) n 5238 g_return_val_if_fail (G_IS_FILE (file), NULL); (gdb) n /netrel/src/gdb-7.6.50-4/gdb/infrun.c:1942: internal-error: resume: Assertion `pc_in_thread_step_range (pc, tp)' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple