Concurrency issues in taglib.py

Iwan Vosloo <[email protected]> Mon, 22 Jan 2007 15:56:20 +0200
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
Hi there,

we're using spyce in a multithreaded process and are getting an
exception in taglib.py:

ValueError: list.remove(x): x not in list

This happens on line 55 in taglib.py:

54:    sys.path.reverse()
55:    sys.path.remove(os.path.dirname(self.stack[-1]._lib.__file__))
56:    sys.path.reverse()

It would seem from our logs that several threads try to manipulate
sys.path, resulting in the exception.

And looking at the code, it will certainly break in such a situation...

Do you agree?  Is this a bug?

-i


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV