Cinder unittest failures have deep stracebacks due to osprofiler

Bug #1447400 reported by Clark Boylan
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Unassigned
osprofiler
Opinion
Undecided
Unassigned

Bug Description

Logs come from http://logs.openstack.org/95/176095/1/check/gate-cinder-python27/747e8f0/console.html#_2015-04-22_15_27_20_571

When cinder unittests fail they can have very deep stracebacks with a large portion of the traceback being nested osprofiler calls. I think there are possibly two bugs here.

First why is osprofiler enabled when running unittests? Shouldn't we be testing non profiled code with an optional opt in for profiling to do debugging? Mostly thinking that this osprofiler output is noise for typical debug cases and is really only needed when you want that profiling to be done.

Second would it be possible to have osprofiler better annotate its wrapping so that we can see what has been wrapped and where calls are made when we get the stacktraces? as is its a bit of a mess.

Revision history for this message
Clark Boylan (cboylan) wrote :
Download full text (8.5 KiB)

I intended on pasting the logs here for historical reasons and failed. Here they are:

2015-04-22 15:27:20.570 | Captured stderr:
2015-04-22 15:27:20.570 | ~~~~~~~~~~~~~~~~
2015-04-22 15:27:20.571 | Traceback (most recent call last):
2015-04-22 15:27:20.571 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 457, in fire_timers
2015-04-22 15:27:20.571 | timer()
2015-04-22 15:27:20.571 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/eventlet/hubs/timer.py", line 58, in __call__
2015-04-22 15:27:20.571 | cb(*args, **kw)
2015-04-22 15:27:20.571 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main
2015-04-22 15:27:20.571 | result = function(*args, **kwargs)
2015-04-22 15:27:20.571 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-04-22 15:27:20.571 | return f(*args, **kwargs)
2015-04-22 15:27:20.571 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-04-22 15:27:20.572 | return f(*args, **kwargs)
2015-04-22 15:27:20.572 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-04-22 15:27:20.572 | return f(*args, **kwargs)
2015-04-22 15:27:20.572 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-04-22 15:27:20.572 | return f(*args, **kwargs)
2015-04-22 15:27:20.572 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-04-22 15:27:20.572 | return f(*args, **kwargs)
2015-04-22 15:27:20.572 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-04-22 15:27:20.572 | return f(*args, **kwargs)
2015-04-22 15:27:20.572 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-04-22 15:27:20.572 | return f(*args, **kwargs)
2015-04-22 15:27:20.573 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-04-22 15:27:20.573 | return f(*args, **kwargs)
2015-04-22 15:27:20.573 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-04-22 15:27:20.573 | return f(*args, **kwargs)
2015-04-22 15:27:20.573 | File "/home/jenkins/workspace/gate-cinder-python27/.tox/py27/local/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-04-22 1...

Read more...

Revision history for this message
Eric Harney (eharney) wrote :

I agree that we shouldn't be wrapping code with the profiler by default for unit tests.

Changed in cinder:
status: New → Confirmed
Revision history for this message
Yuriy Nesenenko (ynesenenko) wrote :

This bug could not be reproduced.

Changed in cinder:
assignee: nobody → Boris Pavlovic (boris-42)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: Confirmed → In Progress
Changed in cinder:
assignee: Boris Pavlovic (boris-42) → Dina Belova (dbelova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Boris Pavlovic (<email address hidden>) on branch: master
Review: https://review.openstack.org/266288

Revision history for this message
Dina Belova (dbelova) wrote :
Changed in cinder:
assignee: Dina Belova (dbelova) → nobody
Changed in osprofiler:
status: New → Opinion
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

I think the fix referenced in #6 addresses this. Closing.

Changed in cinder:
status: In Progress → Fix Released
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.