This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Threaded Cygwin Python Import Problem


Rob,

On Sat, Jul 14, 2001 at 04:30:42AM +1000, Robert Collins wrote:
> ----- Original Message -----
> From: "Jason Tishler" <Jason.Tishler@dothill.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.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com
(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'.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]