RE: AW: DorothyLocker and performance
"Thomas Klaeger" <[email protected]> Sat, 02 Oct 2004 17:17:33 +0200
| Newsgroups | gmane.comp.pythin.pyds.devel |
|---|---|
| Message-ID | <415EE2AD.8055.E8C37@localhost> |
Hello Garth, > So, the unit tests succeeded but there was a failure in PyDS? That's not so > good. What's your operating platform, Thomas? I'm actually working on Win32 with Python 2.3.4, however I never had any problems. It was Georg who had the failure in PyDS, and if I noticed correctly he works on Debian with Python 2.2.2 (Georg correct me if this is wrong) Regards, Thomas > > -----Original Message----- > From: pyds-dev-admin-iYtK5bfT9M//Ad8WF/[email protected] > [mailto:pyds-dev-admin-iYtK5bfT9M//Ad8WF/[email protected]] On Behalf Of Thomas Klaeger > Sent: Friday, 1 October 2004 1:01 AM > To: Garth T Kidd > Cc: 'Bauer, Georg'; 'PyDS Developer List (E-Mail)' > Subject: Re: AW: [Pyds-dev] DorothyLocker and performance > > Hello Garth, > > Garth T Kidd schrieb: > > Did the unit tests show anything before you applied your fix? If I > > need another regression test, I'd like to add it. If not, it looks > > like the code is in pretty good shape. All I need to do now is figure > > out why ignoring self._acquire.func_code wasn't working in situ... > > This was the only indication: > > >>_acquire: > >>Exception exceptions.AssertionError: > >>('/opt/pyds/lib/python2.2/site-packages/PyDS/Tool.py', 1393, > >>'_acquire', 'return self.lock.acquire(blocking)') > >>('/opt/pyds/lib/python2.2/site-packages/PyDS/DorothyLocker.py', 342, > >>'acquire', 'assert result # ... but you can never be too careful.') > > the assert failed! Digging into the python documentation I found that > thread.lock.acquire() returns nothing if called without arguments. The > remaining error messages from below > > >>----------------------- > >>ReleaseOfUnAcquiredLock > >>----------------------- > >>An attempt to release an un-acquired lock. Probably caused by failure > >>to acquire. > >>Detection context: > >> File "/opt/pyds/lib/python2.2/site-packages/PyDS/EventsTool.py", > >>line 93, in _log > >> File "/opt/pyds/lib/python2.2/site-packages/PyDS/EventsTool.py", > >>line 99, in _logVerbose > > ... some stack trace cut off ... > > >>line 290, in __sanity_check > >> raise ReleaseOfUnAcquiredLock, (None, my_context) > >>ReleaseOfUnAcquiredLock: (None, <PyDS.DorothyLocker.CallingContext > >>object at > >>0x8927614>, 'An attempt to release an un-acquired lock. Probably > >>0x8927614>caused by > >>failure to acquire.') > >> > > stems from the fact that the code is written as > > try: > self.lock.acquire() > ... > finally: > self.lock.release() > > which leads to the release of an unacquired lock if the locking itself > fails. > > Regards, > Thomas > > _______________________________________________ > Pyds-dev mailing list > Pyds-dev-iYtK5bfT9M//Ad8WF/[email protected] > http://www.westfalen.de/cgi-bin/mailman/listinfo/pyds-dev > > > _______________________________________________ > Pyds-dev mailing list > Pyds-dev-iYtK5bfT9M//Ad8WF/[email protected] > http://www.westfalen.de/cgi-bin/mailman/listinfo/pyds-dev