PicklingError: Can't pickle <type 'thread.lock'>

Bug #1548956 reported by Sumant Murke
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
python-gnocchiclient
Confirmed
Undecided
zhangguoqing

Bug Description

Unable use gnocchi benchmark metric show API. Client returns a PicklingError

for more info:
http://paste.openstack.org/show/487932/

Step to reproduce:
gnocchi benchmark metric show --count 1 {metric ID or name}

Revision history for this message
Julien Danjou (jdanjou) wrote :

Works fine here, what kind of OS are you using?

Changed in python-gnocchiclient:
status: New → Incomplete
Revision history for this message
Sumant Murke (sumant-murke) wrote :

OS: ubuntu 14.04
gnocchi version : 2.0.0

Note: Running gnocchi on devstack

Revision history for this message
sleter (sleterrier-us) wrote :

We are running in the same issue with gnocchi benchmark metric create.

gnocchi benchmark --verbose metric create -w 2 -n 100
Creating metrics
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/queues.py", line 266, in _feed
    send(obj)
PicklingError: Can't pickle <type 'thread.lock'>: attribute lookup thread.lock failed
0/100, total: 0.02 seconds, rate: 0.00 create/second
0/100, total: 1.02 seconds, rate: 0.00 create/second
0/100, total: 2.02 seconds, rate: 0.00 create/second
0/100, total: 3.02 seconds, rate: 0.00 create/second

CentOS 7.1
Python 2.7.5

Babel==2.3.2
cliff==2.0.0
futurist==0.13.0
gnocchi==2.0.2
gnocchiclient==2.2.0
keystoneauth1==2.5.0
oslo.i18n==3.5.0
oslo.serialization==2.4.0
oslo.utils==3.8.0
six==1.10.0

Julien Danjou (jdanjou)
summary: - unable to use benchamark metric show API.
+ PicklingError: Can't pickle <type 'thread.lock'>
Revision history for this message
gordon chung (chungg) wrote :

see this in Fedora22 as well with master

Changed in python-gnocchiclient:
status: Incomplete → Confirmed
Revision history for this message
gordon chung (chungg) wrote :
Revision history for this message
Lawrance (jing) wrote :

thanks gordon, it works for me

use `futurist.ProcessPoolExecutor` rather than `futurist.ThreadPoolExecutor`

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-gnocchiclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/341406

Changed in python-gnocchiclient:
assignee: nobody → zhangguoqing (474751729-o)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-gnocchiclient (master)

Change abandoned by zhangguoqing (zhang.guoqing@99cloud.net) on branch: master
Review: https://review.openstack.org/341406
Reason: should rewrite the benchmark tool!

Revision history for this message
Gaëtan Trellu (goldyfruit) wrote :

Guys,

Even with the master I still having this issue.

# gnocchi benchmark metric create --count 10
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/queues.py", line 266, in _feed
    send(obj)
PicklingError: Can't pickle <type 'thread.lock'>: attribute lookup thread.lock failed

# gnocchi --version
gnocchi 2.6.0

# python -V
Python 2.7.5

I'm running gnocchi in a virtualenv.

Julien Danjou (jdanjou)
Changed in python-gnocchiclient:
status: In Progress → Incomplete
Revision history for this message
jazeltq (jazeltq-k) wrote :

# gnocchi --version
gnocchi 2.8.2

python 2.7.5
also met this issue。。。

Changed in python-gnocchiclient:
status: Incomplete → Confirmed
Revision history for this message
jazeltq (jazeltq-k) wrote :

This is because the bug in python2, use python 3 will fix it...

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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