From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs from head segfaults when run with -nw Date: Mon, 19 Apr 2010 15:31:57 +0300 Message-ID: <83iq7nbp36.fsf@gnu.org> References: <83eiifcdrv.fsf@gnu.org> <834ojacky1.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1271680382 30832 80.91.229.12 (19 Apr 2010 12:33:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Apr 2010 12:33:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sascha Wilde , Juanma Barranquero , ams@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 19 14:32:53 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O3q9k-0008Da-OJ for ged-emacs-devel@m.gmane.org; Mon, 19 Apr 2010 14:32:53 +0200 Original-Received: from localhost ([127.0.0.1]:35560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3q9k-0001Fu-1z for ged-emacs-devel@m.gmane.org; Mon, 19 Apr 2010 08:32:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3q97-00017w-K5 for emacs-devel@gnu.org; Mon, 19 Apr 2010 08:32:13 -0400 Original-Received: from [140.186.70.92] (port=56979 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3q95-000170-EX for emacs-devel@gnu.org; Mon, 19 Apr 2010 08:32:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3q90-0008CG-Lv for emacs-devel@gnu.org; Mon, 19 Apr 2010 08:32:11 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:62104) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3q8x-0008Ai-Sz; Mon, 19 Apr 2010 08:32:04 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L1400K00IRZX000@a-mtaout22.012.net.il>; Mon, 19 Apr 2010 15:31:52 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.69.249]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L1400IBQIT3GU70@a-mtaout22.012.net.il>; Mon, 19 Apr 2010 15:31:52 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123877 Archived-At: > From: Sascha Wilde > Date: Sat, 17 Apr 2010 20:49:20 +0200 > Cc: ams@gnu.org, emacs-devel@gnu.org > > Eli Zaretskii wrote: > >> From: Sascha Wilde > [...] > > Thanks. Can you show more of the backtrace? I'd like to see if we > > are marking a char-table here. > > > >> If it helps I can make an unoptimized build and send more complete > >> debugging output... > > > > It would certainly help, if the unoptimized build crashes as well. > > Took me some time to get the segfault, but finally I succeeded... :-) > Ok, here we go: > > Program received signal SIGSEGV, Segmentation fault. > mark_object (arg=17) at /home/wilde/src/stdsrc/emacs/emacs-wilde.hg/src/alloc.c:5464 > 5464 if (STRING_MARKED_P (ptr)) > (gdb) bt > #0 mark_object (arg=17) at /home/wilde/src/stdsrc/emacs/emacs-wilde.hg/src/alloc.c:5464 > #1 0x081c4da8 in mark_object (arg=139549338) at /home/wilde/src/stdsrc/emacs/emacs-wilde.hg/src/alloc.c:5572 I think I finally nailed it. Thanks to all who offered ideas and backtraces, and suffered silently while I was looking for the reason. And yes, it was my fault :-( Please try again and see if the crashes are gone now. They are for me, on MS-Windows. For the record, here's how I found the culprit: . Start a new Emacs session under GDB with "start -Q -nw". . When it stopped at the beginning of `main', compare the contents of the corrupted entry in the offending char-table between the crashed and the new sessions. Notice that the value in the new session was correct (nil). (As I reported earlier, the value at the same address in the crashed session was like nil, but with one extra bit set.) . Put a hardware watchpoint on the value that was corrupted in the crashed session, and run the newly started session. When the watchpoint was triggered, GDB had my bug staring at me. The rest, as they say, is in the history DAG ;-)