Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Fri, 28 Oct 2005 07:40:25 -0400
From: Jason Tishler <jason@tishler.net>
To: Satish Balay <balay@fastmail.fm>
Cc: cygwin@cygwin.com
Subject: Re: python & rebase [Was: cygwin-setup & rebaseall]
Message-ID: <20051028114025.GA2712@tishler.net>
Mail-Followup-To: Satish Balay <balay@fastmail.fm>, cygwin@cygwin.com
References: <SERRANO4A2DreBBsQwY0000021e@SERRANO.CAM.ARTIMI.COM> <Pine.LNX.4.64.0510251143120.10534@asterix> <435EE2BE.86691C8F@dessent.net> <Pine.LNX.4.58.0510260938470.17311@harley.mcs.anl.gov> <435FFA43.ED99088B@dessent.net> <Pine.LNX.4.64.0510271405430.7384@asterix> <20051027193626.GA3900@tishler.net> <Pine.LNX.4.64.0510271501340.4623@asterix>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.LNX.4.64.0510271501340.4623@asterix>
User-Agent: Mutt/1.4.1i
X-IsSubscribed: yes

Satish,

On Thu, Oct 27, 2005 at 03:04:52PM -0500, Satish Balay wrote:
> On Thu, 27 Oct 2005, Jason Tishler wrote:
> > On Thu, Oct 27, 2005 at 02:15:01PM -0500, Satish Balay wrote:
> > > I've tried using python after doing a complete 'reinstall' and so
> > > far It works fine. I'll keep track of any future breakages.
> > > 
> > > It will be great if rebase is not required at all...
> > 
> > The following is a good test:
> > 
> >     $ python /usr/lib/python2.4/test/regrtest.py
> > 
> > Do you get any "unable to remap" errors?
> 
> I don't see any remap errors,

Good.

> but the first time I tried - it gave thread errros. The second time -
> it completed fine.
> sem_init: Resource temporarily unavailable
> Unhandled exception in thread started by <bound method SmallBufferedFileObjectCl
> assTestCase.clientRun of <test.test_socket.SmallBufferedFileObjectClassTestCase
> testMethod=testFullRead>>
> Traceback (most recent call last):
>   File "/tmp/python.572/usr/lib/python2.4/test/test_socket.py", line 121, in cli
> entRun
>   File "/usr/lib/python2.4/threading.py", line 348, in wait
>     self.__cond.wait(timeout)
>   File "/usr/lib/python2.4/threading.py", line 197, in wait

The above is a known problem:

    http://www.cygwin.com/ml/cygwin/2005-07/msg01378.html

> BTW: we disable threads on cygwin+python-2.4. Is this problem likely
> to get fixed?

I can only say that it is on my list.  If this is important to you, then
why not help debug the problem?

> [I'm guessing its upstream issue - where I see sem_xx errors on AIX as
> well]

Actually, Python configure.in has the following:

      # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
      case  $ac_sys_system/$ac_sys_release in
      SunOS/5.6) AC_DEFINE(HAVE_PTHREAD_DESTRUCTOR, 1,
                       Defined for Solaris 2.6 bug in pthread header.)
               ;;
      SunOS/5.8) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
               Define if the Posix semaphores do not work on your system)                      ;;
      esac

So, you can workaround this problem, by the following:

    $ configure
    $ sed 's=/\* #undef HAVE_BROKEN_POSIX_SEMAPHORES \*/=#define HAVE_BROKEN_POSIX_SEMAPHORES 1=' pyconfig.h >foo
    $ mv foo pyconfig.h
    $ make

FWIW, I have tried this and it solves the problem reported in the post
above.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

