hang when using python 2.7.3

Bug #1383950 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-swiftclient
New
Undecided
Unassigned

Bug Description

python-swiftclient hangs with python version 2.7.3 (on osx, have not verified on other os).

It seems to be something to do with the way Queues and Threads are used.

To reproduce:

git clone http://github.com/openstack/python-swiftclient
cd python-swiftclient
mkdir foo
virtualenv foo
. foo/bin/activate
pip install -e .

# setup env variables for openstack creds
swift list

It will hang until you ctrl-c

The loop it is stuck in is:

177 def get_from_queue(q, timeout=864000):
178 while True:
179 try:
180 item = q.get(timeout=timeout)
181 return item
182 except QueueEmpty:

in swiftclient/service.py

Revision history for this message
Peter Portante (peter-a-portante) wrote :

Can you explain how that is a bug in python-swiftclient? Is it possible that it is just waiting for a message from the server? Or do you have evidence that it received the message but is failing to process it?

Revision history for this message
Chmouel Boudjnah (chmouel) wrote :

Hello vish, I am not sure i understand the context, is it trying to connect to something that's very slow ?

Revision history for this message
Vish Ishaya (vishvananda) wrote :

Running the exact same code with a newer version of python works fine. This is a python bug, but swiftclient should probably have a workaround because most users will not know to upgrade python and it just hangs indefinitely so one cannot even search the web for a traceback to find a solution.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.