delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/07/13/17:00:36

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Fri, 13 Jul 2001 16:46:24 -0400
From: Jason Tishler <Jason DOT Tishler AT dothill DOT com>
To: Robert Collins <robert DOT collins AT itdomain DOT com DOT au>
Cc: Greg Smith <gsmith AT nc DOT rr DOT com>,
Cygwin-Developers <cygwin-developers AT sources DOT redhat DOT com>
Subject: Re: Threaded Cygwin Python Import Problem
Message-ID: <20010713164623.E282@dothill.com>
Mail-Followup-To: Robert Collins <robert DOT collins AT itdomain DOT com DOT au>,
Greg Smith <gsmith AT nc DOT rr DOT com>,
Cygwin-Developers <cygwin-developers AT sources DOT redhat DOT com>
Mime-Version: 1.0
In-Reply-To: <01a101c10bc9$ed28f160$806410ac@local>
User-Agent: Mutt/1.3.18i
Organization: Dot Hill Systems Corp.

--Mx+MOmLv6lQWkrt6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Rob,

On Sat, Jul 14, 2001 at 04:30:42AM +1000, Robert Collins wrote:
> ----- Original Message -----
> From: "Jason Tishler" <Jason DOT Tishler AT dothill DOT com>
> > [Moved from cygwin-patches to cygwin-developers...]
> 
> Sorry I'm slow getting to this one :[. Time has been against me this last
> month.

Only this month?  You are very lucky -- time has been against me for
years... :,)

> > On Tue, Jul 10, 2001 at 01:24:13PM +1000, Robert Collins wrote:
> > > >     python test.py
> > >
> > > gdb.out: the event handle is clearly wrong. Can you include the output
> > > of print *this ? and list (so I know what the lines actually are :])>
> >
> > See attached gdb.out.

See attached for the latest gdb.out.  Note this time "this" appears to
reference valid memory.

> Thanks. Unfortunately it looks like gcc has optimised out the value for
> this. So no extra info was gained :[. You can access the correct data via
> p *(pthread_mutex *) 0xa010a58

Are you sure about the above syntax?  When I try this I get:

    (gdb) p this
    $8 = (pthread_mutex *) 0xa02b2fc
    (gdb) p *(pthread_mutex *) 0xa02b2fc
    A parse error in expression, near ` 0xa02b2fc'.

Also, the value for "this" is different when displayed by "f" and "p":

    (gdb) f 2
    #2  0x6105f34a in pthread_mutex::Lock (this=0xa010648)
    (gdb) p this
    $8 = (pthread_mutex *) 0xa02b2fc

Am I doing something wrong?

> ditto for the second trace...

Unfortunately (or fortunately), invoking python via "python" or "./python"
nows yields identical stack traces.  Additionally, two times using
"./python" did not hang.

Note that my sandbox has been modified as described by:

    http://www.cygwin.com/ml/cygwin-developers/2001-07/msg00070.html

but otherwise, it is the same as before.

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason DOT Tishler AT dothill DOT com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

--Mx+MOmLv6lQWkrt6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="gdb.out"

(gdb) bt
#0  0x77f6829b in ?? ()
#1  0x77f04f41 in ?? ()
#2  0x6105f34a in pthread_mutex::Lock (this=0xa010648)
    at ../../../../src/winsup/cygwin/thread.cc:644
#3  0x61060e06 in __pthread_mutex_lock (mutex=0xa011e20)
    at ../../../../src/winsup/cygwin/thread.cc:1917
#4  0x6103b3ae in pthread_mutex_lock (mutex=0xa011e20)
    at ../../../../src/winsup/cygwin/pthread.cc:240
#5  0x61d99e37 in PyThread_acquire_lock (lock=0xa011e18, waitflag=0)
    at ../Python/thread_pthread.h:298
#6  0x61d8cebd in lock_import () at ../Python/import.c:159
..
(gdb) f 2
#2  0x6105f34a in pthread_mutex::Lock (this=0xa010648)
    at ../../../../src/winsup/cygwin/thread.cc:644
644       return WaitForSingleObject (win32_obj_id, INFINITE);
(gdb) list
639     }
640     
641     int
642     pthread_mutex::Lock ()
643     {
644       return WaitForSingleObject (win32_obj_id, INFINITE);
645     }
646     
647     int
648     pthread_mutex::TryLock ()
(gdb) p *this
$6 = {<verifyable_object> = {magic = 1886217588}, win32_obj_id = 0x656c6966, 
  condwaits = 0, pshared = 0}
(gdb) p this
$8 = (pthread_mutex *) 0xa02b2fc
(gdb) p *(pthread_mutex *) 0xa010648
A parse error in expression, near ` 0xa010648'.
(gdb) p *(pthread_mutex *) 0xa02b2fc
A parse error in expression, near ` 0xa02b2fc'.

--Mx+MOmLv6lQWkrt6--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019