From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 9 14:43:05 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5535B1065678 for ; Wed, 9 Jul 2008 14:43:05 +0000 (UTC) (envelope-from asmodai@in-nomine.org) Received: from nexus.in-nomine.org (dhammapada.xs4all.nl [82.95.168.248]) by mx1.freebsd.org (Postfix) with ESMTP id D22048FC1C for ; Wed, 9 Jul 2008 14:43:04 +0000 (UTC) (envelope-from asmodai@in-nomine.org) Received: from localhost (localhost.domini.in-nomine.org [127.0.0.1]) by nexus.in-nomine.org (Postfix) with ESMTP id 5A28BC2DA for ; Wed, 9 Jul 2008 16:23:34 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at in-nomine.org Received: from nexus.in-nomine.org ([127.0.0.1]) by localhost (nexus.domini.in-nomine.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fWdRcqZkXCIT for ; Wed, 9 Jul 2008 16:23:33 +0200 (CEST) Received: by nexus.in-nomine.org (Postfix, from userid 1000) id 0A648C2EA; Wed, 9 Jul 2008 16:23:33 +0200 (CEST) Date: Wed, 9 Jul 2008 16:23:33 +0200 From: Jeroen Ruigrok van der Werven To: freebsd-hackers@freebsd.org Message-ID: <20080709142332.GB68329@nexus.in-nomine.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Organisation: Ninth Circle Enterprises User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Need help debugging Python coredump X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2008 14:43:05 -0000 I can reproduce the problem on both 6.3 and 7.0-STABLE. With the current Python 2.6 SVN trunk I have been getting coredumps for a while now when the curses regression tests get run. When it coredumps it is always a signal 11. Steps to reproduce: 1) get Python from trunk: svn checkout http://svn.python.org/projects/python/trunk python 2) configure: cd python && ./configure --prefix=$HOME/python 3) build: make 4) run: ./python -E -tt Lib/test/regrtest.py -l -ucurses test_curses This test will pass, at least it did for me. 5) run: ./python -E -tt Lib/test/regrtest.py -l -uall -rw This starts all tests in a random order with verbosity on. Suddenly test_curses will coredump. I get two backtraces: #0 0x28553c3a in doupdate () from /lib/libncursesw.so.7 #1 0x28854a50 in PyCurses_doupdate (self=0x0) at /usr/home/asmodai/projects/python/Modules/_cursesmodule.c:1652 #2 0x080d097f in PyEval_EvalFrameEx (f=0x82b66fc, throwflag=0) at Python/ceval.c:3629 #3 0x080d186a in PyEval_EvalFrameEx (f=0x8c1098c, throwflag=0) at Python/ceval.c:3731 #4 0x080d186a in PyEval_EvalFrameEx (f=0x93f1c0c, throwflag=0) at Python/ceval.c:3731 #5 0x080d226a in PyEval_EvalCodeEx (co=0x8a8f3c8, globals=0x8c43e84, locals=0x8c43e84, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2908 #6 0x080d23c7 in PyEval_EvalCode (co=0x8a8f3c8, globals=0x8c43e84, locals=0x8c43e84) at Python/ceval.c:495 #7 0x080e5d3c in PyImport_ExecCodeModuleEx ( name=0xbfbfda83 "test.test_curses", co=0x8a8f3c8, pathname=0xbfbfd177 "/usr/home/asmodai/projects/python/Lib/test/test_curses.pyc") at Python/import.c:680 #0 0x2889840d in PyCurses_getsyx (self=0x0) at /dumpster/home/asmodai/projects/python/Modules/_cursesmodule.c:1770 #1 0x080d06d8 in PyEval_EvalFrameEx (f=0x8f4b95c, throwflag=0) at Python/ceval.c:3635 #2 0x080d1021 in PyEval_EvalFrameEx (f=0x8df8aec, throwflag=0) at Python/ceval.c:3737 #3 0x080d1021 in PyEval_EvalFrameEx (f=0x8daa08c, throwflag=0) at Python/ceval.c:3737 #4 0x080d207a in PyEval_EvalCodeEx (co=0x8d86338, globals=0x9831934, locals=0x9831934, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2914 #5 0x080d21d7 in PyEval_EvalCode (co=0x8d86338, globals=0x9831934, locals=0x9831934) at Python/ceval.c:495 #6 0x080e5b4c in PyImport_ExecCodeModuleEx ( name=0xbfbfdc63 "test.test_curses", co=0x8d86338, pathname=0xbfbfd357 "/dumpster/home/asmodai/projects/python/Lib/test/test_curses.pyc") at Python/import.c:680 Both have got me stumped a bit and I have not been able to progress far to find out why this happens. I cannot reproduce this on Ubuntu 8.04 at all. And they both use the same ncurses library, 5.6. One idea Thomas Dickey had for the last traceback was: curses.setupterm(fd=sys.__stdout__.fileno()) That would have newscr null. The failure might be from closing stdout, e.g., if it was redirected. Any ideas/hints/tips to finally squash this crashdump? -- Jeroen Ruigrok van der Werven / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B When we blindly adopt a religion, a political system, a literary dogma, we become automatons. We cease to grow...