Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Date: Mon, 16 Jul 2001 13:55:58 -0400 From: Jason Tishler To: Greg Smith Cc: Cygwin-Developers Subject: Re: Threaded Cygwin Python Import Problem Message-ID: <20010716135558.F614@dothill.com> Mail-Followup-To: Greg Smith , Cygwin-Developers Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5hNzppoVPzHLtQC2" Content-Disposition: inline In-Reply-To: <3B532077.44582445@trex.rtpnc.epa.gov> User-Agent: Mutt/1.3.18i Organization: Dot Hill Systems Corp. --5hNzppoVPzHLtQC2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Greg, On Mon, Jul 16, 2001 at 01:12:23PM -0400, Greg Smith wrote: > Jason Tishler wrote: > > Yes! (I'm relieved that it was not just me!) If you kill the child, > > then you should see the following: > > > > $ ./python ../nothreads/test.py > > child execvp-ing > > status = 15 > > parent done > > > Yes, this is exactly what I see. Good. > > Instead if you attach to the child, then you should see a stack trace > > like the one in the following: > > Hmmm, gdb attach to the child process didn't cause a stackdump for me... You won't get a stackdump, but you can see a stack trace by doing the following: $ # window number 1 $ ./python ../nothreads/test.py child execvp-ing $ # window number 2 $ ps | fgrep python 90 273 90 236 0 1004 13:32:12 /home/jt/src/Python-2.1/threads/python 382 90 90 382 0 1004 13:32:13 /home/jt/src/Python-2.1/threads/python $ gdb -nw python.exe GNU gdb 5.0 (20010428-1) ... (gdb) attach 382 Attaching to program `/home/jt/src/Python-2.1/threads/python.exe', process 382 [Switching to thread 382.0x19e] (gdb) thread 1 [Switching to thread 1 (thread 382.0x14c)]#0 0x77f6829b in ?? () (gdb) bt #0 0x77f6829b in ?? () #1 0x77f04f41 in ?? () #2 0x6105f14a in pthread_mutex::Lock (this=0xa014e10) at ../../../../src/winsup/cygwin/thread.cc:644 ... > but I haven't compiled Python or Cygwin with -g either, also I am using > the dll built from the 7/4 snapshot. IIRC, Python is compiled with -g by default. However, you will have to build Cygwin yourself to get a non-stripped DLL that corresponds to your source. > Anyway, at least I can produce the hang. I won't be able to do any debugging > until I get home later, but half the work in solving a problem is recreating > the problem !! I'll be back. Agreed! BTW, I was able to reproduce the hang under Windows 2000 SP1 if I invoke python as follows: $ ./python ../nothreads/test.py = {magic = 1886217588}, win32_obj_id = 0x656c6966, condwaits = 0, pshared = 0} --5hNzppoVPzHLtQC2--